From 16e556492fd0d8c9dd54cdd9a2ec4a2d7fb8aeb0 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 16:25:44 +0400 Subject: [PATCH 01/27] Fix Asset Hub naming in code and release notes (#71) Cleans up some usage of old naming conventions. I noticed also in the [last release](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.0.0) the old naming conventions are used. I believe we should refer to these chains as Asset Hub now? - Update Oct 24: Updated the release notes generation to replace "Statemint" and "Statemine" with "Polkadot Asset Hub (previous Statemint) and "Kusama Asset Hub (previously Statemine)". Release built with updated script: https://github.com/liamaharon/runtimes/releases/tag/v1.0.0 --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .github/workflows/release.yml | 15 +++++++++++++-- .../asset-hubs/asset-hub-kusama/tests/tests.rs | 2 +- .../asset-hubs/asset-hub-polkadot/tests/tests.rs | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 373d14f949..d19cbe550c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,9 +114,20 @@ jobs: EOF for JSON in $(<<<$CONTEXT sort -sr) - do tee -a DRAFT <<-EOF + do + SPEC_NAME=$(WASM 'core_version.specName') + # Check for spec names and adjust the heading accordingly + if [[ "$SPEC_NAME" == "statemint" ]]; then + HEADING="Asset Hub Polkadot (previously Statemint)" + elif [[ "$SPEC_NAME" == "statemine" ]]; then + HEADING="Asset Hub Kusama (previously Statemine)" + else + HEADING=$(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")') + fi - ### $(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")') + tee -a DRAFT <<-EOF + + ### $HEADING ~~~ 🏋️ Runtime Size: $(numfmt --to iec-i --format "%.2f" $(WASM size)) ($(WASM size) bytes) 🗜 Compressed: $(WASM 'compression | if .compressed then "Yes: \(1 - .size_compressed / .size_decompressed | . * 10000 | round / 100)%" else "No" end') diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 7d49b56e46..20477cb24e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Tests for the Statemine (Kusama Assets Hub) chain. +//! Tests for the Kusama Asset Hub (previously known as Statemine) chain. use asset_hub_kusama_runtime::xcm_config::{ AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 7200ebc16a..5af2c63c18 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Tests for the Statemint (Polkadot Assets Hub) chain. +//! Tests for the Polkadot Asset Hub (previously known as Statemint) chain. use asset_hub_polkadot_runtime::xcm_config::{ AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation, From b8df4b06c78fb2fb2d0f081c76e30569f12363c6 Mon Sep 17 00:00:00 2001 From: Muharem Date: Fri, 1 Dec 2023 16:57:14 +0100 Subject: [PATCH 02/27] Fellowship entities get free xcm execution (#107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fellowship entities get free xcm execution. Same as the Fellowship entities allowed to pass `UnpaidExecution` command to bypass the fees charged by `Trader` impl, we include the Fellowship locations to `WaivedLocations` to not be charged by `FeeManager` impl. Co-authored-by: Bastian Köcher --- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 8 ++++++-- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 664a2df5fd..92776aa1dc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -414,8 +414,12 @@ match_types! { /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, + FellowsPlurality, + FellowshipSalaryPallet, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index f92b9adbf0..be8f1dfa00 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -210,8 +210,11 @@ match_types! { /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, + FellowsPlurality, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// - DOT with the parent Relay Chain and sibling parachains. From 2b3024339b1a5f81157af827cde36b19f9ddc505 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 7 Dec 2023 23:18:55 +0100 Subject: [PATCH 03/27] [ci/cd] Split Test pipeline according to `runtime-benchmarks` feature (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Based on original [issue](https://github.com/paritytech/ci_cd/issues/864 ) from @gilescope related to the monorepo: > Currently the tests have started to be run with the `runtime-benchmarks` feature enabled ( E.g. https://github.com/paritytech/polkadot-sdk/blob/aabed6757e26e21ce06dd59946a17b72f349185e/.gitlab/pipeline/test.yml#L37 ). This was done so that the autogenerated tests that the benchmark macros create get run (but it seems that we already have a short-benchmark CI job... - do the additional tests give us anything extra? EDIT: the short-benchmarks only test 3 relay chains so not comprehensive enough). > However, this is inherently dangerous as not everything will be in a production like state when it is being tested. > For safety's sake we should be running without the `runtime-benchmarks` feature enabled. Assuming the CI system can take it, we should set up another job that runs the tests with the runtime-benchmarks feature enabled. (if we did not do this we would catch any problems later when the weights are rerun for the runtime release builds). ## Proposed solution Split [test pipeline](https://github.com/polkadot-fellows/runtimes/blob/main/.github/workflows/test.yml#L44) to the two pipelines: - one without `runtime-benchmarks` feature - one with `runtime-benchmarks` feature Co-authored-by: Bastian Köcher --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3c294071f..2672bc2b00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,8 +51,14 @@ jobs: - name: Fetch cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + - name: Test + run: cargo test --workspace --release --locked -q --features=runtime-metrics,try-runtime + env: + RUSTFLAGS: "-C debug-assertions -D warnings" + SKIP_WASM_BUILD: 1 + - name: Test all features run: cargo test --workspace --release --locked -q --features=runtime-benchmarks,runtime-metrics,try-runtime env: RUSTFLAGS: "-C debug-assertions -D warnings" - SKIP_WASM_BUILD: 1 + SKIP_WASM_BUILD: 1 \ No newline at end of file From d67b905dc8126dee16de042971feedb510e015b7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 8 Dec 2023 13:14:50 +0100 Subject: [PATCH 04/27] Various backports and alignments with `polkadot-sdk` (which does not depend on crates.io versions) (#45) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This PR proposes several changes. - The alignment of the terminology used for "common-good" and "system" parachains in the Polkadot ecosystem, as discussed in [PR#1406](https://github.com/paritytech/polkadot-sdk/pull/1406). - Additionally, it suggests the removal of the `ChildSystemParachainAsSuperuser` feature from the Kusama runtime, as mentioned in a comment on the same PR [comment link](https://github.com/paritytech/polkadot-sdk/pull/1406#issuecomment-1708218715). - Relax `force_default_xcm_version` in `SafeCallFilter` for system parachains - based on https://github.com/paritytech/polkadot-sdk/pull/2385 - Add `Storage` item to `PolkadotXcm` pallet definition for BridgeHubs (now we cannot see storage items for `pallet_xcm` in polkadot.js) - based on https://github.com/paritytech/polkadot-sdk/pull/2385 ## Explanation A significant [change of PR#1406](https://github.com/paritytech/polkadot-sdk/pull/1406/files#diff-0b7b4f5b962a18ce980354592b55ab2a27b5a2e9f6f8089ec803ca73853e8583L202-R224) is the redefinition of what constitutes a "system" parachain. Previously, a "system" parachain was identified with `para_id <= 1000`. However, the [PR#1406](https://github.com/paritytech/polkadot-sdk/pull/1406) changed a definition, considering a "system" parachain to have `para_id <= 1999`. One consequence of this change is the reconsideration of the [`ChildSystemParachainAsSuperuser`](https://github.com/paritytech/polkadot-sdk/blob/a50e6ba7af50a4be9ae78ebb90e86a61f3dd85e1/polkadot/xcm/xcm-builder/src/origin_conversion.rs#L72-L88) feature. This feature relies on the [`is_system`](https://github.com/paritytech/polkadot-sdk/blob/a50e6ba7af50a4be9ae78ebb90e86a61f3dd85e1/polkadot/parachain/src/primitives.rs#L216-L226) function, which, in turn, depends on the para_id of a parachain to determine "system" status. However, further examination has revealed that there is no known scenario in which a system parachain would need to call the Kusama runtime with `RuntimeOrigin::root()` privileges. Consequently, maintaining the `ChildSystemParachainAsSuperuser` feature in the Kusama runtime is deemed unnecessary. ## References - [GitHub Pull Request #1406](https://github.com/paritytech/polkadot-sdk/pull/1406) - [GitHub Pull Request #2385](https://github.com/paritytech/polkadot-sdk/pull/2385) - Redo of https://github.com/polkadot-fellows/runtimes/pull/32 on main. --------- Co-authored-by: Bastian Köcher Co-authored-by: Bastian Köcher --- CHANGELOG.md | 1 + relay/kusama/src/lib.rs | 2 +- relay/kusama/src/tests.rs | 8 ++++++ relay/kusama/src/xcm_config.rs | 13 +++++----- relay/polkadot/src/lib.rs | 26 ++++++++++++------- relay/polkadot/src/xcm_config.rs | 4 +-- .../asset-hub-kusama/src/xcm_config.rs | 22 +++++++++------- .../asset-hub-polkadot/src/xcm_config.rs | 20 +++++++------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- .../bridge-hub-kusama/src/xcm_config.rs | 18 +++++++------ .../bridge-hub-polkadot/src/lib.rs | 2 +- .../bridge-hub-polkadot/src/xcm_config.rs | 18 +++++++------ .../collectives-polkadot/src/lib.rs | 2 +- .../collectives-polkadot/src/xcm_config.rs | 8 +++--- 14 files changed, 86 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 759067cc9f..f9f736a2ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Remove `experimental` feature flag for `pallet-society`, `pallet-xcm`, and `runtime-common` crates imports ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Election provider: use a geometric deposit base calculation for EPM signed submissions in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661 +- Whitelist `force_default_xcm_version` in XCM call filter ([polkadot-fellows/runtimes#45](https://github.com/polkadot-fellows/runtimes/pull/45)) ### Added diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index a5dca2b45f..ec693bfe2f 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -621,7 +621,7 @@ impl pallet_staking::EraPayout for EraPayout { // all para-ids that are currently active. let auctioned_slots = Paras::parachains() .into_iter() - // all active para-ids that do not belong to a system or common good chain is the number + // 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; diff --git a/relay/kusama/src/tests.rs b/relay/kusama/src/tests.rs index 053c3054ab..e096a19cc5 100644 --- a/relay/kusama/src/tests.rs +++ b/relay/kusama/src/tests.rs @@ -175,3 +175,11 @@ fn check_whitelist() { // XcmPallet SafeXcmVersion assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4")); } + +#[test] +fn check_treasury_pallet_id() { + assert_eq!( + ::index() as u8, + kusama_runtime_constants::TREASURY_PALLET_ID + ); +} diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index fe0d1ae1b6..d52d2a8589 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -38,11 +38,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, - CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, + IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -99,8 +98,6 @@ type LocalOriginConverter = ( ChildParachainAsNative, // The AccountId32 location type can be expressed natively as a `Signed` origin. SignedAccountId32AsNative, - // A system child parachain, expressed as a Superuser, converts to the `Root` origin. - ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -135,6 +132,8 @@ parameter_types! { pub const KsmForBridgeHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } + +/// Kusama Relay recognizes/respects AssetHub, Encointer, and BridgeHub chains as teleporters. pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 02ca53e6de..a5c54fa151 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -617,7 +617,7 @@ impl pallet_staking::EraPayout for EraPayout { // 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 or common good chain is the number + // 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; @@ -2497,6 +2497,7 @@ mod test { use super::*; use frame_support::traits::WhitelistedStorageKeys; + use scale_info::TypeInfo; use sp_core::hexdisplay::HexDisplay; #[test] @@ -2540,6 +2541,21 @@ mod test { 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)] @@ -2550,7 +2566,6 @@ mod multiplier_tests { traits::{OnFinalize, PalletInfoAccess}, }; use runtime_common::{MinimumMultiplier, TargetBlockFullness}; - use scale_info::TypeInfo; use separator::Separatable; use sp_runtime::traits::Convert; @@ -2678,13 +2693,6 @@ mod multiplier_tests { blocks += 1; } } - - #[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(all(test, feature = "try-runtime"))] diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index f6ce0d4fe8..bac675b5c6 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -141,7 +141,7 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; } -/// Polkadot Relay recognizes/respects the asset hub chain as a teleporter. +/// Polkadot Relay recognizes/respects AssetHub, Collectives, and BridgeHub chains as teleporters. pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, @@ -166,7 +166,7 @@ pub type Barrier = TrailingSetTopicAsId<( AllowKnownQueryResponses, WithComputedOrigin< ( - // If the message is one that immediately attemps to pay for execution, then allow it. + // If the message is one that immediately attempts to pay for execution, then allow it. AllowTopLevelPaidExecutionFrom, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 13fb5bdd8c..7b836886d0 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -105,7 +105,7 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; -/// `AssetId`/`Balance` converter for `PoolAssets`. +/// `AssetId`/`Balance` converter for `TrustBackedAssets`. pub type TrustBackedAssetsConvertedConcreteId = assets_common::TrustBackedAssetsConvertedConcreteId; @@ -126,7 +126,7 @@ pub type FungiblesTransactor = FungiblesAdapter< CheckingAccount, >; -/// `AssetId/Balance` converter for `TrustBackedAssets` +/// `AssetId`/`Balance` converter for `ForeignAssets` pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId< ( // Ignore `TrustBackedAssets` explicitly @@ -260,13 +260,15 @@ impl Contains for SafeCallFilter { matches!( call, - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - RuntimeCall::System( - frame_system::Call::set_heap_pages { .. } | - frame_system::Call::set_code { .. } | - frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. }, - ) | RuntimeCall::ParachainSystem(..) | + RuntimeCall::PolkadotXcm( + pallet_xcm::Call::force_xcm_version { .. } | + pallet_xcm::Call::force_default_xcm_version { .. } + ) | RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::Balances(..) | RuntimeCall::CollatorSelection( @@ -457,7 +459,7 @@ pub type Barrier = TrailingSetTopicAsId< // Allow XCMs with some computed origins to pass through. WithComputedOrigin< ( - // If the message is one that immediately attemps to pay for execution, then + // If the message is one that immediately attempts to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, // Parent, its pluralities (i.e. governance bodies) and parent's treasury diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 92776aa1dc..c9eb08a8c0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -116,7 +116,7 @@ pub type FungiblesTransactor = FungiblesAdapter< CheckingAccount, >; -/// `AssetId/Balance` converter for `TrustBackedAssets` +/// `AssetId`/`Balance` converter for `ForeignAssets` pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId< ( // Ignore `TrustBackedAssets` explicitly @@ -216,13 +216,15 @@ impl Contains for SafeCallFilter { matches!( call, - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - RuntimeCall::System( - frame_system::Call::set_heap_pages { .. } | - frame_system::Call::set_code { .. } | - frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. }, - ) | RuntimeCall::ParachainSystem(..) | + RuntimeCall::PolkadotXcm( + pallet_xcm::Call::force_xcm_version { .. } | + pallet_xcm::Call::force_default_xcm_version { .. } + ) | RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::Balances(..) | RuntimeCall::CollatorSelection( @@ -372,7 +374,7 @@ pub type Barrier = TrailingSetTopicAsId< // Allow XCMs with some computed origins to pass through. WithComputedOrigin< ( - // If the message is one that immediately attemps to pay for execution, then + // If the message is one that immediately attempts to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, // The locations listed below get free execution. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index f0d5f8a3cb..32675645b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -471,7 +471,7 @@ construct_runtime!( // XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 31, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 3a1ac9c8b1..c2448a0f62 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -138,13 +138,15 @@ impl Contains for SafeCallFilter { matches!( call, - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - RuntimeCall::System( - frame_system::Call::set_heap_pages { .. } | - frame_system::Call::set_code { .. } | - frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. }, - ) | RuntimeCall::ParachainSystem(..) | + RuntimeCall::PolkadotXcm( + pallet_xcm::Call::force_xcm_version { .. } | + pallet_xcm::Call::force_default_xcm_version { .. } + ) | RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::Balances(..) | RuntimeCall::CollatorSelection( @@ -172,7 +174,7 @@ pub type Barrier = TrailingSetTopicAsId< AllowKnownQueryResponses, WithComputedOrigin< ( - // If the message is one that immediately attemps to pay for execution, then + // If the message is one that immediately attempts to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, // Parent and its pluralities (i.e. governance bodies) and relay treasury get diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index a811d768bd..039c9aa76a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -446,7 +446,7 @@ construct_runtime!( // XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 31, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index be8f1dfa00..4962b591b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -141,13 +141,15 @@ impl Contains for SafeCallFilter { matches!( call, - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - RuntimeCall::System( - frame_system::Call::set_heap_pages { .. } | - frame_system::Call::set_code { .. } | - frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. }, - ) | RuntimeCall::ParachainSystem(..) | + RuntimeCall::PolkadotXcm( + pallet_xcm::Call::force_xcm_version { .. } | + pallet_xcm::Call::force_default_xcm_version { .. } + ) | RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::Balances(..) | RuntimeCall::CollatorSelection( @@ -175,7 +177,7 @@ pub type Barrier = TrailingSetTopicAsId< AllowKnownQueryResponses, WithComputedOrigin< ( - // If the message is one that immediately attemps to pay for execution, then + // If the message is one that immediately attempts to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, // Parent, its pluralities (i.e. governance bodies), Fellows plurality diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index c3d12985ef..65e86377c5 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -20,7 +20,7 @@ //! //! ### Governance //! -//! As a common good parachain, Collectives defers its governance (namely, its `Root` origin), to +//! As a system parachain, Collectives defers its governance (namely, its `Root` origin), to //! its Relay Chain parent, Polkadot. //! //! ### Collator Selection diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index c609b491d1..fce9d5e810 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -166,8 +166,10 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::add_invulnerable { .. } | pallet_collator_selection::Call::remove_invulnerable { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - RuntimeCall::XcmpQueue(..) | + RuntimeCall::PolkadotXcm( + pallet_xcm::Call::force_xcm_version { .. } | + pallet_xcm::Call::force_default_xcm_version { .. } + ) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Alliance( // `init_members` accepts unbounded vecs as arguments, @@ -221,7 +223,7 @@ pub type Barrier = TrailingSetTopicAsId< // Allow XCMs with some computed origins to pass through. WithComputedOrigin< ( - // If the message is one that immediately attemps to pay for execution, then + // If the message is one that immediately attempts to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, // Parent and its pluralities (i.e. governance bodies) and relay treasury get From 49a04e5eeddb59728f1720c194b1741ddc01f821 Mon Sep 17 00:00:00 2001 From: Muharem Date: Fri, 8 Dec 2023 22:27:17 +0100 Subject: [PATCH 05/27] Fellowship Treasury (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Treasury Pallet Instance for the Fellowship in Polkadot Collectives. In this update, we present a Treasury Pallet Instance that is under the control of the Fellowship body, with oversight from the Root and Treasurer origins. Here's how it is governed: - the Root origin have the authority to reject or approve spend proposals, with no amount limit for approvals. - the Treasurer origin have the authority to reject or approve spend proposals, with approval limits of up to 10,000,000 DOT. - Voice of all Fellows ranked at 3 or above can reject or approve spend proposals, with a maximum approval limit of 10,000 DOT. - Voice of Fellows ranked at 4 or above can also reject or approve spend proposals, with a maximum approval limit of 10,000,000 DOT. Additionally, we introduce the Asset Rate Pallet Instance to establish conversion rates from asset A to B. This is used to determine if a proposed spend amount involving a non-native asset is permissible by the commanding origin. The rates can be set up by the Root, Treasurer origins, or Voice of all Fellows. test with xcm-emulator for the same setup in Westend - https://github.com/paritytech/polkadot-sdk/pull/2532 more details on new treasury features and asset rate pallet - https://github.com/paritytech/polkadot-sdk/pull/1333 --------- Co-authored-by: Bastian Köcher Co-authored-by: joepetrowski Co-authored-by: Bastian Köcher Co-authored-by: Oliver Tale-Yazdi --- CHANGELOG.md | 1 + Cargo.lock | 2 + relay/polkadot/constants/src/lib.rs | 2 + relay/polkadot/src/xcm_config.rs | 13 +- .../asset-hub-polkadot/src/xcm_config.rs | 18 +- .../collectives-polkadot/Cargo.toml | 8 + .../src/fellowship/mod.rs | 144 +++++++++++- .../collectives-polkadot/src/lib.rs | 43 +++- .../collectives-polkadot/src/weights/mod.rs | 2 + .../src/weights/pallet_asset_rate.rs | 85 +++++++ .../src/weights/pallet_treasury.rs | 214 ++++++++++++++++++ .../collectives-polkadot/src/xcm_config.rs | 3 +- 12 files changed, 515 insertions(+), 20 deletions(-) create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/pallet_treasury.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index f9f736a2ad..fe5a34753c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - XCM transport fees are now exponential and are sent to a treasury account ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1234 - System parachains are now trusted teleporters of each other ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1368 - Treasury is able to spend various asset kinds ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)) +- Fellowship Treasury pallet on Polkadot Collectives ([polkadot-fellows/runtimes#109](https://github.com/polkadot-fellows/runtimes/pull/109)) ### Fixed diff --git a/Cargo.lock b/Cargo.lock index b007446808..7e8f1a408f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1844,6 +1844,7 @@ dependencies = [ "hex-literal", "log", "pallet-alliance", + "pallet-asset-rate", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -1861,6 +1862,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", diff --git a/relay/polkadot/constants/src/lib.rs b/relay/polkadot/constants/src/lib.rs index dde8bd8ee5..113c825ac6 100644 --- a/relay/polkadot/constants/src/lib.rs +++ b/relay/polkadot/constants/src/lib.rs @@ -108,6 +108,8 @@ pub mod xcm { 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; } } diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index bac675b5c6..3e48cdb9dd 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, - TransactionByteFee, Treasury, WeightToFee, XcmPallet, + TransactionByteFee, Treasurer, Treasury, WeightToFee, XcmPallet, }; use frame_support::{ match_types, parameter_types, @@ -29,7 +29,9 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use polkadot_runtime_constants::{ - currency::CENTS, system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX, + currency::CENTS, + system_parachain::*, + xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX}, }; use runtime_common::{ crowdloan, paras_registrar, @@ -362,6 +364,8 @@ parameter_types! { 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")] @@ -389,6 +393,9 @@ pub type StakingAdminToPlurality = pub type FellowshipAdminToPlurality = OriginToPluralityVoice; +/// Type to convert the `Treasurer` origin to a Plurality `MultiLocation` value. +pub type TreasurerToPlurality = OriginToPluralityVoice; + /// Type to convert a pallet `Origin` type value into a `MultiLocation` value which represents an /// interior location of this chain for a destination chain. pub type LocalPalletOriginToLocation = ( @@ -398,6 +405,8 @@ pub type LocalPalletOriginToLocation = ( StakingAdminToPlurality, // FellowshipAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. FellowshipAdminToPlurality, + // `Treasurer` origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + TreasurerToPlurality, ); impl pallet_xcm::Config for Runtime { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index c9eb08a8c0..3a8d1b3840 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -189,11 +189,13 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(_) } }; - pub type FellowsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } - }; - pub type FellowshipSalaryPallet: impl Contains = { - MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(64)) } + pub type FellowshipEntities: impl Contains = { + // Fellowship Plurality + MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | + // Fellowship Salary Pallet + MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(64)) } | + // Fellowship Treasury Pallet + MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(65)) } }; } @@ -380,8 +382,7 @@ pub type Barrier = TrailingSetTopicAsId< // The locations listed below get free execution. AllowExplicitUnpaidExecutionFrom<( ParentOrParentsPlurality, - FellowsPlurality, - FellowshipSalaryPallet, + FellowshipEntities, Equals, )>, // Subscriptions for version tracking are OK. @@ -419,8 +420,7 @@ match_types! { pub type WaivedLocations = ( RelayOrOtherSystemParachains, Equals, - FellowsPlurality, - FellowshipSalaryPallet, + FellowshipEntities, ); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index dd0182ac0c..c54e7352be 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -23,6 +23,7 @@ frame-system = { default-features = false, version = "25.0.0" } frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-asset-rate = { default-features = false , version = "4.0.0" } pallet-alliance = { default-features = false, version = "24.0.0" } pallet-aura = { default-features = false, version = "24.0.0" } pallet-authorship = { default-features = false, version = "25.0.0" } @@ -36,6 +37,7 @@ pallet-session = { default-features = false, version = "25.0.0" } pallet-timestamp = { default-features = false, version = "24.0.0" } pallet-transaction-payment = { default-features = false, version = "25.0.0" } pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-treasury = { default-features = false , version = "24.0.0" } pallet-utility = { default-features = false, version = "25.0.0" } pallet-referenda = { default-features = false, version = "25.0.0" } pallet-ranked-collective = { default-features = false, version = "25.0.0" } @@ -92,6 +94,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-asset-rate/runtime-benchmarks", "pallet-alliance/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", @@ -105,6 +108,7 @@ runtime-benchmarks = [ "pallet-salary/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", @@ -123,6 +127,7 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", + "pallet-asset-rate/try-runtime", "pallet-alliance/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", @@ -140,6 +145,7 @@ try-runtime = [ "pallet-session/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", + "pallet-treasury/try-runtime", "pallet-utility/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", @@ -164,6 +170,7 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "log/std", + "pallet-asset-rate/std", "pallet-alliance/std", "pallet-aura/std", "pallet-authorship/std", @@ -182,6 +189,7 @@ std = [ "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-treasury/std", "pallet-utility/std", "pallet-xcm/std", "parachain-info/std", diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index f8abba46e2..230d40585b 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -19,16 +19,19 @@ mod origins; mod tracks; use crate::{ - impls::ToParentTreasury, weights, AccountId, Balance, Balances, FellowshipReferenda, - GovernanceLocation, PolkadotTreasuryAccount, Preimage, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, Scheduler, DAYS, + impls::ToParentTreasury, weights, xcm_config::TreasurerBodyId, AccountId, AssetRate, Balance, + Balances, FellowshipReferenda, GovernanceLocation, PolkadotTreasuryAccount, Preimage, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, DAYS, }; use cumulus_primitives_core::Junction::GeneralIndex; use frame_support::{ parameter_types, - traits::{EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, TryWithMorphedArg}, + traits::{ + EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, PalletInfoAccess, TryWithMorphedArg, + }, + PalletId, }; -use frame_system::EnsureRootWithSuccess; +use frame_system::{EnsureRoot, EnsureRootWithSuccess}; pub use origins::{ pallet_origins as pallet_fellowship_origins, Architects, EnsureCanPromoteTo, EnsureCanRetainAt, EnsureFellowship, Fellows, Masters, Members, ToVoice, @@ -36,9 +39,15 @@ pub use origins::{ use pallet_ranked_collective::EnsureOfRank; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::polkadot::account; -use polkadot_runtime_constants::{time::HOURS, xcm::body::FELLOWSHIP_ADMIN_INDEX}; +use polkadot_runtime_common::impls::{ + LocatableAssetConverter, VersionedLocatableAsset, VersionedMultiLocationConverter, +}; +use polkadot_runtime_constants::{currency::GRAND, time::HOURS, xcm::body::FELLOWSHIP_ADMIN_INDEX}; +use sp_arithmetic::Permill; use sp_core::{ConstU128, ConstU32}; -use sp_runtime::traits::{AccountIdConversion, ConstU16, ConvertToValue, Replace, TakeFirst}; +use sp_runtime::traits::{ + AccountIdConversion, ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst, +}; use xcm::latest::BodyId; use xcm_builder::{AliasesIntoAccountId32, LocatableAssetId, PayOverXcm}; @@ -244,3 +253,124 @@ impl pallet_salary::Config for Runtime { // Total monthly salary budget. type Budget = ConstU128<{ 100_000 * USDT_UNITS }>; } + +parameter_types! { + // TODO: reference the constant value from common crate when polkadot-sdk 1.5 is released. + // https://github.com/polkadot-fellows/runtimes/issues/113 + pub const FellowshipTreasuryPalletId: PalletId = PalletId(*b"py/feltr"); + pub const ProposalBond: Permill = Permill::from_percent(100); + pub const Burn: Permill = Permill::from_percent(0); + pub const MaxBalance: Balance = Balance::max_value(); + // The asset's interior location for the paying account. This is the Fellowship Treasury + // pallet instance (which sits at index 65). + pub FellowshipTreasuryInteriorLocation: InteriorMultiLocation = + PalletInstance(::index() as u8).into(); +} + +/// [`PayOverXcm`] setup to pay the Fellowship Treasury. +pub type FellowshipTreasuryPaymaster = PayOverXcm< + FellowshipTreasuryInteriorLocation, + crate::xcm_config::XcmRouter, + crate::PolkadotXcm, + ConstU32<{ 6 * HOURS }>, + VersionedMultiLocation, + VersionedLocatableAsset, + LocatableAssetConverter, + VersionedMultiLocationConverter, +>; + +pub type FellowshipTreasuryInstance = pallet_treasury::Instance1; + +impl pallet_treasury::Config for Runtime { + // The creation of proposals via the treasury pallet is deprecated and should not be utilized. + // Instead, public or fellowship referenda should be used to propose and command the treasury + // spend or spend_local dispatchables. The parameters below have been configured accordingly to + // discourage its use. + // TODO: replace with `NeverEnsure` once polkadot-sdk 1.5 is released. + // https://github.com/polkadot-fellows/runtimes/issues/113 + type ApproveOrigin = EnsureRoot; + type OnSlash = (); + type ProposalBond = ProposalBond; + type ProposalBondMinimum = MaxBalance; + type ProposalBondMaximum = MaxBalance; + // end. + + type WeightInfo = weights::pallet_treasury::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type PalletId = FellowshipTreasuryPalletId; + type Currency = Balances; + type RejectOrigin = EitherOfDiverse< + EnsureRoot, + EitherOfDiverse>, Fellows>, + >; + type SpendPeriod = ConstU32<{ 7 * DAYS }>; + type Burn = Burn; + type BurnDestination = (); + type SpendFunds = (); + type MaxApprovals = ConstU32<100>; + type SpendOrigin = EitherOf< + EitherOf< + EnsureRootWithSuccess, + MapSuccess< + EnsureXcm>, + Replace>, + >, + >, + EitherOf< + MapSuccess>>, + MapSuccess>>, + >, + >; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedMultiLocation; + type BeneficiaryLookup = IdentityLookup; + #[cfg(not(feature = "runtime-benchmarks"))] + type Paymaster = FellowshipTreasuryPaymaster; + #[cfg(feature = "runtime-benchmarks")] + type Paymaster = PayWithEnsure>>; + type BalanceConverter = AssetRate; + type PayoutPeriod = ConstU32<{ 30 * DAYS }>; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = benchmarks::TreasuryArguments, ConstU32<1000>>; +} + +// TODO: replace by [`polkadot_runtime_common::impls::benchmarks::TreasuryArguments`] when +// polkadot-sdk 1.5 is released. +// https://github.com/polkadot-fellows/runtimes/issues/113 +#[cfg(feature = "runtime-benchmarks")] +mod benchmarks { + use super::VersionedLocatableAsset; + use core::marker::PhantomData; + use frame_support::traits::Get; + use pallet_treasury::ArgumentsFactory as TreasuryArgumentsFactory; + use sp_core::{ConstU32, ConstU8}; + use xcm::prelude::*; + + /// Provide factory methods for the [`VersionedLocatableAsset`] and the `Beneficiary` of the + /// [`VersionedMultiLocation`]. The location of the asset is determined as a Parachain with an + /// ID equal to the passed seed. + pub struct TreasuryArguments, ParaId = ConstU32<0>>( + PhantomData<(Parents, ParaId)>, + ); + impl, ParaId: Get> + TreasuryArgumentsFactory + for TreasuryArguments + { + fn create_asset_kind(seed: u32) -> VersionedLocatableAsset { + VersionedLocatableAsset::V3 { + location: xcm::v3::MultiLocation::new(Parents::get(), X1(Parachain(ParaId::get()))), + asset_id: xcm::v3::MultiLocation::new( + 0, + X2(PalletInstance(seed.try_into().unwrap()), GeneralIndex(seed.into())), + ) + .into(), + } + } + fn create_beneficiary(seed: [u8; 32]) -> VersionedMultiLocation { + VersionedMultiLocation::V3(xcm::v3::MultiLocation::new( + 0, + X1(AccountId32 { network: None, id: seed }), + )) + } + } +} diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 65e86377c5..89bda923a3 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -45,6 +45,7 @@ pub mod fellowship; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use fellowship::{pallet_fellowship_origins, Fellows}; use impls::{AllianceProposalProvider, EqualOrGreatestRootCmp, ToParentTreasury}; +use polkadot_runtime_common::impls::VersionedLocatableAsset; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -85,7 +86,9 @@ use parachains_common::{ SLOT_DURATION, }; use sp_runtime::RuntimeDebug; -use xcm_config::{GovernanceLocation, XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + GovernanceLocation, TreasurerBodyId, XcmConfig, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -586,6 +589,21 @@ impl pallet_preimage::Config for Runtime { >; } +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EitherOfDiverse< + EnsureRoot, + EitherOfDiverse>, Fellows>, + >; + type RemoveOrigin = Self::CreateOrigin; + type UpdateOrigin = Self::CreateOrigin; + type Currency = Balances; + type AssetKind = VersionedLocatableAsset; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = polkadot_runtime_common::impls::benchmarks::AssetRateArguments; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -621,6 +639,7 @@ construct_runtime!( Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 42, Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 43, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 44, + AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 45, // The main stage. @@ -638,6 +657,8 @@ construct_runtime!( FellowshipCore: pallet_core_fellowship::::{Pallet, Call, Storage, Event} = 63, // pub type FellowshipSalaryInstance = pallet_salary::Instance1; FellowshipSalary: pallet_salary::::{Pallet, Call, Storage, Event} = 64, + // pub type FellowshipTreasuryInstance = pallet_treasury::Instance1; + FellowshipTreasury: pallet_treasury::::{Pallet, Call, Storage, Event} = 65, } ); @@ -749,6 +770,8 @@ mod benches { [pallet_ranked_collective, FellowshipCollective] [pallet_core_fellowship, FellowshipCore] [pallet_salary, FellowshipSalary] + [pallet_treasury, FellowshipTreasury] + [pallet_asset_rate, AssetRate] ); } @@ -991,3 +1014,21 @@ cumulus_pallet_parachain_system::register_validate_block! { Runtime = Runtime, BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, } + +// TODO: Move these pallet index declarations to some `system-parachains/common` so that other +// runtimes can import them without depending on the entire remote runtime. +// Part of https://github.com/polkadot-fellows/runtimes/issues/59 + +#[test] +fn fellowship_salary_pallet_index() { + use frame_support::pallet_prelude::PalletInfoAccess; + // Remote accounts with funds depend on this pallet staying in the same index. + assert_eq!(::index() as u8, 64u8); +} + +#[test] +fn fellowship_treasury_pallet_index() { + use frame_support::pallet_prelude::PalletInfoAccess; + // Remote accounts with funds depend on this pallet staying in the same index. + assert_eq!(::index() as u8, 65u8); +} diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs index 9ddf53792e..05e3bc1bb1 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs @@ -19,6 +19,7 @@ pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; pub mod pallet_alliance; +pub mod pallet_asset_rate; pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_collective; @@ -32,6 +33,7 @@ pub mod pallet_salary; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_timestamp; +pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs new file mode 100644 index 0000000000..f07cbd35f2 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.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_asset_rate` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-11-28, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `cob`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-westend-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/debug/polkadot-parachain +// benchmark +// pallet +// --chain=collectives-westend-dev +// --steps=2 +// --repeat=2 +// --pallet=pallet-asset-rate +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./cumulus/parachains/runtimes/collectives/collectives-westend/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_asset_rate`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_rate::WeightInfo for WeightInfo { + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `4703` + // Minimum execution time: 102_000_000 picoseconds. + Weight::from_parts(112_000_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + fn update() -> Weight { + // Proof Size summary in bytes: + // Measured: `74` + // Estimated: `4703` + // Minimum execution time: 101_000_000 picoseconds. + Weight::from_parts(105_000_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + fn remove() -> Weight { + // Proof Size summary in bytes: + // Measured: `74` + // Estimated: `4703` + // Minimum execution time: 112_000_000 picoseconds. + Weight::from_parts(116_000_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/system-parachains/collectives/collectives-polkadot/src/weights/pallet_treasury.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_treasury.rs new file mode 100644 index 0000000000..945802f105 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_treasury.rs @@ -0,0 +1,214 @@ +// 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_treasury` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-11-28, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `cob`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-westend-dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/debug/polkadot-parachain +// benchmark +// pallet +// --chain=collectives-westend-dev +// --steps=2 +// --repeat=2 +// --pallet=pallet-treasury +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./cumulus/parachains/runtimes/collectives/collectives-westend/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_treasury`. +pub struct WeightInfo(PhantomData); +impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: `FellowshipTreasury::ProposalCount` (r:1 w:1) + /// Proof: `FellowshipTreasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Approvals` (r:1 w:1) + /// Proof: `FellowshipTreasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Proposals` (r:0 w:1) + /// Proof: `FellowshipTreasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1887` + // Minimum execution time: 117_000_000 picoseconds. + Weight::from_parts(126_000_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `FellowshipTreasury::ProposalCount` (r:1 w:1) + /// Proof: `FellowshipTreasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Proposals` (r:0 w:1) + /// Proof: `FellowshipTreasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn propose_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `143` + // Estimated: `1489` + // Minimum execution time: 264_000_000 picoseconds. + Weight::from_parts(277_000_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `FellowshipTreasury::Proposals` (r:1 w:1) + /// Proof: `FellowshipTreasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn reject_proposal() -> Weight { + // Proof Size summary in bytes: + // Measured: `301` + // Estimated: `3593` + // Minimum execution time: 289_000_000 picoseconds. + Weight::from_parts(312_000_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `FellowshipTreasury::Approvals` (r:1 w:1) + /// Proof: `FellowshipTreasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + fn remove_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `127` + // Estimated: `1887` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(65_000_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:199 w:199) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Deactivated` (r:1 w:1) + /// Proof: `FellowshipTreasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Balances::InactiveIssuance` (r:1 w:1) + /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Approvals` (r:1 w:1) + /// Proof: `FellowshipTreasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Proposals` (r:99 w:99) + /// Proof: `FellowshipTreasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 99]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `145 + p * (250 ±0)` + // Estimated: `256707 + p * (5206 ±0)` + // Minimum execution time: 218_000_000 picoseconds. + Weight::from_parts(221_000_000, 0) + .saturating_add(Weight::from_parts(0, 256707)) + // Standard Error: 154_515 + .saturating_add(Weight::from_parts(399_232_323, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::SpendCount` (r:1 w:1) + /// Proof: `FellowshipTreasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `FellowshipTreasury::Spends` (r:0 w:1) + /// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `4703` + // Minimum execution time: 163_000_000 picoseconds. + Weight::from_parts(171_000_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `FellowshipTreasury::Spends` (r:1 w:1) + /// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `629` + // Estimated: `5318` + // Minimum execution time: 472_000_000 picoseconds. + Weight::from_parts(492_000_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `FellowshipTreasury::Spends` (r:1 w:1) + /// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `5318` + // Minimum execution time: 211_000_000 picoseconds. + Weight::from_parts(215_000_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `FellowshipTreasury::Spends` (r:1 w:1) + /// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `179` + // Estimated: `5318` + // Minimum execution time: 124_000_000 picoseconds. + Weight::from_parts(126_000_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/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index fce9d5e810..1060298383 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -31,7 +31,7 @@ use parachains_common::{ TREASURY_PALLET_ID, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::system_parachain; +use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants}; use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_builder::{ @@ -55,6 +55,7 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used From 9bbd9d2acfed9e6e9da7be4c6ecd6e0476a3c41f Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Fri, 8 Dec 2023 23:22:08 +0100 Subject: [PATCH 06/27] Add BEEFY capabilities to the Polkadot runtime (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds BEEFY capabilities to the Polkadot runtime. Governance/sudo call is later required to enable/start consensus. Part of https://github.com/paritytech/parity-bridges-common/issues/2420 --------- Co-authored-by: Bastian Köcher --- CHANGELOG.md | 3 +- Cargo.lock | 5 + relay/polkadot/Cargo.toml | 14 +++ relay/polkadot/src/lib.rs | 229 ++++++++++++++++++++++++++++++++------ 4 files changed, 219 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe5a34753c..ca18f73b56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - XCM transport fees are now exponential and are sent to a treasury account ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1234 - System parachains are now trusted teleporters of each other ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1368 - Treasury is able to spend various asset kinds ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)) +- Add BEEFY to Polkadot ([polkadot-fellows/runtimes#65](https://github.com/polkadot-fellows/runtimes/pull/65)) - Fellowship Treasury pallet on Polkadot Collectives ([polkadot-fellows/runtimes#109](https://github.com/polkadot-fellows/runtimes/pull/109)) ### Fixed @@ -29,7 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add missing weight functions for `runtime_parachains_hrmp` and `preimage` pallets ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Fix for Reward Deficit in the pool ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1255 -## [1.0.1] 22.10.2023 +## [1.0.1] 14.11.2023 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 7e8f1a408f..90c6aff873 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8081,6 +8081,7 @@ dependencies = [ name = "polkadot-runtime" version = "1.0.0" dependencies = [ + "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -8099,6 +8100,8 @@ dependencies = [ "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", "pallet-collective", @@ -8114,6 +8117,7 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-message-queue", + "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -8153,6 +8157,7 @@ dependencies = [ "serde_json", "smallvec", "sp-api", + "sp-application-crypto", "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 0208c50c83..4de8c71b8c 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -21,6 +21,7 @@ smallvec = "1.8.0" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } +binary-merkle-tree = { default-features = false , version = "10.0.0" } block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } @@ -29,6 +30,7 @@ sp-arithmetic = { default-features = false , version = "20.0.0" } sp-api = { default-features = false , version = "23.0.0" } sp-genesis-builder = { default-features = false , version = "0.4.0" } sp-std = { default-features = false , version = "12.0.0" } +sp-application-crypto = { default-features = false , version = "27.0.0" } sp-io = { default-features = false , version = "27.0.0" } sp-mmr-primitives = { default-features = false , version = "23.0.0" } sp-runtime = { default-features = false , version = "28.0.0" } @@ -45,6 +47,8 @@ pallet-authorship = { default-features = false , version = "25.0.0" } pallet-babe = { default-features = false , version = "25.0.0" } pallet-bags-list = { default-features = false , version = "24.0.0" } pallet-balances = { default-features = false , version = "25.0.0" } +pallet-beefy = { default-features = false , version = "25.0.0" } +pallet-beefy-mmr = { default-features = false , version = "25.0.0" } pallet-bounties = { default-features = false , version = "24.0.0" } pallet-child-bounties = { default-features = false , version = "24.0.0" } pallet-transaction-payment = { default-features = false , version = "25.0.0" } @@ -62,6 +66,7 @@ pallet-im-online = { default-features = false , version = "24.0.0" } pallet-indices = { default-features = false , version = "25.0.0" } pallet-membership = { default-features = false , version = "25.0.0" } pallet-message-queue = { default-features = false , version = "28.0.0" } +pallet-mmr = { default-features = false , version = "24.0.0" } pallet-multisig = { default-features = false , version = "25.0.0" } pallet-nomination-pools = { default-features = false , version = "22.0.0" } pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } @@ -128,6 +133,7 @@ std = [ "authority-discovery-primitives/std", "babe-primitives/std", "beefy-primitives/std", + "binary-merkle-tree/std", "bitvec/std", "block-builder-api/std", "frame-benchmarking?/std", @@ -147,6 +153,8 @@ std = [ "pallet-babe/std", "pallet-bags-list/std", "pallet-balances/std", + "pallet-beefy/std", + "pallet-beefy-mmr/std", "pallet-bounties/std", "pallet-child-bounties/std", "pallet-collective/std", @@ -162,6 +170,7 @@ std = [ "pallet-indices/std", "pallet-membership/std", "pallet-message-queue/std", + "pallet-mmr/std", "pallet-multisig/std", "pallet-nomination-pools-benchmarking?/std", "pallet-nomination-pools-runtime-api/std", @@ -197,6 +206,7 @@ std = [ "serde/std", "serde_derive", "sp-api/std", + "sp-application-crypto/std", "sp-arithmetic/std", "sp-core/std", "sp-genesis-builder/std", @@ -241,6 +251,7 @@ runtime-benchmarks = [ "pallet-indices/runtime-benchmarks", "pallet-membership/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", + "pallet-mmr/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", "pallet-nomination-pools/runtime-benchmarks", @@ -281,6 +292,8 @@ try-runtime = [ "pallet-babe/try-runtime", "pallet-bags-list/try-runtime", "pallet-balances/try-runtime", + "pallet-beefy-mmr/try-runtime", + "pallet-beefy/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", "pallet-collective/try-runtime", @@ -295,6 +308,7 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-membership/try-runtime", "pallet-message-queue/try-runtime", + "pallet-mmr/try-runtime", "pallet-multisig/try-runtime", "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index a5c54fa151..03ed0a78cb 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -45,7 +45,10 @@ use runtime_parachains::{ }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; -use beefy_primitives::ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}; +use beefy_primitives::{ + ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, + mmr::{BeefyDataProvider, MmrLeafVersion}, +}; use frame_election_provider_support::{ bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen, }; @@ -54,9 +57,9 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, - KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, - WithdrawReasons, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, Get, + InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, + ProcessMessageError, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, PalletId, @@ -76,15 +79,14 @@ use primitives::{ ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, PARACHAIN_KEY_TYPE_ID, }; -use sp_core::OpaqueMetadata; -use sp_mmr_primitives as mmr; +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, OpaqueKeys, SaturatedConversion, Verify, + IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, @@ -107,7 +109,6 @@ pub use pallet_election_provider_multi_phase::{Call as EPMCall, GeometricDeposit pub use pallet_staking::StakerStatus; use pallet_staking::UseValidatorsMap; pub use pallet_timestamp::Call as TimestampCall; -use sp_runtime::traits::Get; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -322,6 +323,81 @@ impl pallet_balances::Config for Runtime { type MaxFreezes = ConstU32<8>; } +parameter_types! { + 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; +} + +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; +} + +/// MMR helper types. +mod mmr { + use super::Runtime; + pub use pallet_mmr::primitives::*; + + 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); +} + +/// 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() + } +} + +impl pallet_beefy_mmr::Config for Runtime { + 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 @@ -353,6 +429,17 @@ impl pallet_authorship::Config for Runtime { 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, @@ -361,6 +448,33 @@ impl_opaque_keys! { 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 + }, } } @@ -1448,6 +1562,14 @@ construct_runtime! { Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 7, Offences: pallet_offences::{Pallet, Storage, Event} = 8, Historical: session_historical::{Pallet} = 33, + + // BEEFY Bridges support. + Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, + // MMR leaf construction must be before session in order to have leaf contents + // refer to block consistently. see substrate issue #11797 for details. + Mmr: pallet_mmr::{Pallet, Storage} = 201, + BeefyMmrLeaf: pallet_beefy_mmr::{Pallet, Storage} = 202, + 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, @@ -1612,6 +1734,16 @@ pub mod migrations { type PalletName = TipsPalletName; } + /// 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 + } + } + pub struct ParachainsToUnlock; impl Contains for ParachainsToUnlock { fn contains(id: &ParaId) -> bool { @@ -1649,6 +1781,9 @@ pub mod migrations { // Migrate parachain info format paras_registrar::migration::VersionCheckedMigrateToV1, + // Upgrade SessionKeys to include BEEFY key + UpgradeSessionKeys, + pallet_nomination_pools::migration::versioned_migrations::V5toV6, pallet_nomination_pools::migration::versioned_migrations::V6ToV7, @@ -1952,62 +2087,94 @@ sp_api::impl_runtime_apis! { impl beefy_primitives::BeefyApi for Runtime { fn beefy_genesis() -> Option { - // dummy implementation due to lack of BEEFY pallet. - None + Beefy::genesis_block() } fn validator_set() -> Option> { - // dummy implementation due to lack of BEEFY pallet. - None + Beefy::validator_set() } fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: beefy_primitives::EquivocationProof< + equivocation_proof: beefy_primitives::EquivocationProof< BlockNumber, BeefyId, BeefySignature, >, - _key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, + key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, ) -> Option<()> { - None + 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, + authority_id: BeefyId, ) -> Option { - None + 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 { - Err(mmr::Error::PalletNotIncluded) + fn mmr_root() -> Result { + Ok(Mmr::mmr_root()) } fn mmr_leaf_count() -> Result { - Err(mmr::Error::PalletNotIncluded) + Ok(Mmr::mmr_leaves()) } fn generate_proof( - _block_numbers: Vec, - _best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { - Err(mmr::Error::PalletNotIncluded) + 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) + fn verify_proof(leaves: Vec, proof: mmr::Proof) -> Result<(), mmr::Error> { - Err(mmr::Error::PalletNotIncluded) + 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: Hash, - _leaves: Vec, - _proof: mmr::Proof + root: mmr::Hash, + leaves: Vec, + proof: mmr::Proof ) -> Result<(), mmr::Error> { - Err(mmr::Error::PalletNotIncluded) + 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() } } @@ -2502,7 +2669,7 @@ mod test { #[test] fn call_size() { - RuntimeCall::assert_size_under(230); + RuntimeCall::assert_size_under(256); } #[test] From 0db044247ea9d148d4cfb887cb79df914299f909 Mon Sep 17 00:00:00 2001 From: Adrian Catangiu Date: Tue, 12 Dec 2023 13:04:25 +0200 Subject: [PATCH 07/27] docs: add a quick guide on how to remove migrations (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This maybe looks trivial, but better to have it written down here than in various ephemeral chats/mediums. --------- Co-authored-by: Bastian Köcher --- docs/removing-migrations.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/removing-migrations.md diff --git a/docs/removing-migrations.md b/docs/removing-migrations.md new file mode 100644 index 0000000000..37d06db298 --- /dev/null +++ b/docs/removing-migrations.md @@ -0,0 +1,25 @@ +# Process for removing runtime migrations + +We want to keep the `migrations` lists in the runtimes nice and tidy, without keeping around a lot of migration code once we know it's no longer needed - meaning once it's been enacted on-chain. + +The following is a quick guide/process for removing applied migrations while making sure you don't remove migrations not yet applied. + +## Prerequisites + +For some chain runtime `spec_version: a_bcd_efg,` (e.g. `spec_version: 1_000_001`): +- has been officially released on https://github.com/polkadot-fellows/runtimes/releases/ as part of `Runtimes X.Y.Z` release/tag. +- the **on-chain** runtime version has been upgraded to spec version `a_bcd_efg` (using wasm blob released above). + +## Steps + +1. Sync tags: `git pull upstream main --tags`, +2. Check-out **the released** code: `git checkout vX.Y.Z`, + - This is required to make sure you are not accidentally removing yet unreleased migrations (PRs merged between `X.Y.Z` release and when you are doing this). +3. Create patch with your changes: `git diff --patch > remove-migrations.patch`, +4. Now `git checkout main` and apply your patch `git am -3 remove-migrations.patch`, + - thus ensuring you are not removing any migrations merged to main after the release. +5. `git checkout -b `, `git push --set-upstream origin `, then open PR. + +## Automation + +Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. \ No newline at end of file From 30e0dbfdcb78722ed61325c0ebf1efdcdb6033ba Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Tue, 12 Dec 2023 17:37:06 +0100 Subject: [PATCH 08/27] feat: align `LocationToAccountId` derivation (#67) In order to allow other chains to have consistent "remote" accounts in other chains, it is needed that all chains in the ecosystem derive accounts in the XCM logic in the same way. See https://forum.polkadot.network/t/multichain-friendly-account-abstraction/1298/23 This PR aligns all runtimes of system-parachains to have that derivation. It is debatable whether this derivation should also go into the relay-chain runtimes. --- relay/kusama/src/xcm_config.rs | 11 +++++++---- relay/polkadot/src/xcm_config.rs | 11 +++++++---- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 7 +++---- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 7 +++++-- .../bridge-hub-polkadot/src/xcm_config.rs | 7 +++++-- .../collectives-polkadot/src/xcm_config.rs | 13 ++++++++----- 6 files changed, 35 insertions(+), 21 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index d52d2a8589..4e9798a122 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -38,10 +38,11 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, - IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, + DescribeFamily, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -71,6 +72,8 @@ pub type SovereignAccountOf = ( 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 interest with the runtime facilities from the diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 3e48cdb9dd..65c0348fe1 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -43,10 +43,11 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, + DescribeFamily, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -74,6 +75,8 @@ pub type SovereignAccountOf = ( 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 diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 3a8d1b3840..01604814c1 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -40,7 +40,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -76,9 +76,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, - // Foreign chain account alias into local accounts according to a hash of their standard - // description. - HashedDescription>, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index c2448a0f62..6e917c05d6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -37,8 +37,9 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, @@ -69,6 +70,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 4962b591b1..17d7c177ac 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -37,8 +37,9 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, @@ -69,6 +70,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 1060298383..ced66b2c5d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -37,11 +37,12 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, - OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FixedWeightBounds, HashedDescription, IsConcrete, OriginToPluralityVoice, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -68,6 +69,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. From 7000d241a25a18c97d13daab54ccbacd93af3e6e Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:13:28 +0100 Subject: [PATCH 09/27] Lower System Parachain Existential Deposits (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As referenced in a few discussions (e.g. [forum](https://forum.polkadot.network/t/lowering-or-removing-existential-deposit-in-the-long-run/2167/10)), the Asset Hub Existential Deposit was set at genesis to 1/10th of the Relay Chain's. The goal however was always to lower it as the Relay Chain became more efficient at executing parachains to reflect the lower resource consumption on parachains and provide stronger incentives to prefer parachains for user-applications over the Relay Chain. This PR lowers the system chain existential deposits by a factor of ten, to 1/100th of the Relay Chain's ED, or 0.01 DOT. For discussion/comment: Should all system paras have a lower ED, or just Asset Hub? On one hand, it is less confusing if they are all the same. On the other, we actually _don't_ necessarily want to encourage lots of accounts on a chain like Bridge Hub. For this PR, I've adjusted all of the system paras, but in separate commits. --------- Co-authored-by: Bastian Köcher --- .../asset-hubs/asset-hub-kusama/src/constants.rs | 4 ++-- .../asset-hubs/asset-hub-kusama/src/weights/mod.rs | 1 - .../asset-hubs/asset-hub-polkadot/src/constants.rs | 4 ++-- .../asset-hubs/asset-hub-polkadot/src/weights/mod.rs | 1 - .../bridge-hubs/bridge-hub-kusama/src/weights/mod.rs | 1 - .../bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs | 1 - .../collectives/collectives-polkadot/src/weights/mod.rs | 1 - 7 files changed, 4 insertions(+), 9 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/constants.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/constants.rs index 7822698be6..a5c24f58de 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/constants.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/constants.rs @@ -17,8 +17,8 @@ pub mod currency { use kusama_runtime_constants as constants; use polkadot_core_primitives::Balance; - /// The existential deposit. Set to 1/10 of its parent Relay Chain. - pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10; + /// The existential deposit. Set to 1/100 of its parent Relay Chain. + pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 100; pub const UNITS: Balance = constants::currency::UNITS; pub const CENTS: Balance = constants::currency::CENTS; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs index 281c013b33..9d92330275 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs @@ -39,5 +39,4 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use paritydb_weights::constants::ParityDbWeight; pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/constants.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/constants.rs index dea920979f..03dd41319e 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/constants.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/constants.rs @@ -17,8 +17,8 @@ pub mod currency { use polkadot_core_primitives::Balance; use polkadot_runtime_constants as constants; - /// The existential deposit. Set to 1/10 of its parent Relay Chain. - pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10; + /// The existential deposit. Set to 1/100 of its parent Relay Chain. + pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 100; pub const UNITS: Balance = constants::currency::UNITS; pub const DOLLARS: Balance = constants::currency::DOLLARS; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs index 3eb3b925e6..d3408c738d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs @@ -36,5 +36,4 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use paritydb_weights::constants::ParityDbWeight; pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index e226021e77..60dfbea8db 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -34,5 +34,4 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use paritydb_weights::constants::ParityDbWeight; pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs index e226021e77..60dfbea8db 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs @@ -34,5 +34,4 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use paritydb_weights::constants::ParityDbWeight; pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs index 05e3bc1bb1..187daf121b 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs @@ -41,5 +41,4 @@ pub mod rocksdb_weights; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use paritydb_weights::constants::ParityDbWeight; pub use rocksdb_weights::constants::RocksDbWeight; From 8e03e81812e0ea7058cfddc529f52ba44c9c2dff Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 4 Jan 2024 10:01:46 -0300 Subject: [PATCH 10/27] Updated review-bot to 2.3.1 (#132) Updated review bot to version 2.3.1 which contains the fix for paritytech/review-bot#107. When a fellow's identity is empty, it will search for a sub identity and try to extract the handle from such subidentity. I have also added @ggwpez's brilliant site to the readme so the fellow's can see their list of identities (as I don't have any up-to-date listing myself). --- .github/workflows/review-bot.yml | 2 +- README.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/review-bot.yml b/.github/workflows/review-bot.yml index 62ddb42ffd..6efaba16f5 100644 --- a/.github/workflows/review-bot.yml +++ b/.github/workflows/review-bot.yml @@ -26,7 +26,7 @@ jobs: app_id: ${{ secrets.REVIEW_APP_ID }} private_key: ${{ secrets.REVIEW_APP_KEY }} - name: "Evaluates PR reviews and assigns reviewers" - uses: paritytech/review-bot@v2.3.0 + uses: paritytech/review-bot@v2.3.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} team-token: ${{ steps.team_token.outputs.token }} diff --git a/README.md b/README.md index e24a7e40db..090a090cdd 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ The approval rights are configured in [`review-bot.yml`](.github/review-bot.yml) The review-bot uses the on-chain identity to map from a GitHub account to a Fellowship member. This requires that each Fellowship member add their GitHub handle to their on-chain identity. Check [here](docs/on-chain-identity.md) for instructions. +- [Official List of Fellows](https://polkadot-fellows.github.io/dashboard/#/members) +- [List of Fellows with their GitHub handles](https://fellowship.tasty.limo/) + # Working on Pull Requests To merge a pull request, we use [Auto Merge Bot](https://github.com/paritytech/auto-merge-bot). From ab96e82cb336ab8b7c55b4a594e78f88cf0e5a4a Mon Sep 17 00:00:00 2001 From: Leemo <89027356+Leemo94@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:49:41 +0000 Subject: [PATCH 11/27] Update tracks.rs (#119) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to Treasurer, Big Spender, Medium Spender and Small Spender Confirmation Periods as per: https://github.com/polkadot-fellows/RFCs/pull/20 I opted to not propose to remove the Big Spender track (it was part of the discussion on RFC 20) as I am not sure how it would affect referenda that are currently live on that Track. --------- Co-authored-by: Bastian Köcher Co-authored-by: Bastian Köcher --- CHANGELOG.md | 1 + relay/kusama/src/governance/tracks.rs | 2 +- relay/polkadot/src/governance/tracks.rs | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca18f73b56..942c6dc292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Election provider: use a geometric deposit base calculation for EPM signed submissions in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661 - Whitelist `force_default_xcm_version` in XCM call filter ([polkadot-fellows/runtimes#45](https://github.com/polkadot-fellows/runtimes/pull/45)) +- Increase confirmation period for treasury spend tracks on Polkadot & Kusama ([polkadot-fellows/runtimes#119](https://github.com/polkadot-fellows/runtimes/pull/119)) ### Added diff --git a/relay/kusama/src/governance/tracks.rs b/relay/kusama/src/governance/tracks.rs index 08a87a677c..c15a445b48 100644 --- a/relay/kusama/src/governance/tracks.rs +++ b/relay/kusama/src/governance/tracks.rs @@ -116,7 +116,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 decision_deposit: 1 * GRAND, prepare_period: 2 * HOURS, decision_period: 14 * DAYS, - confirm_period: 3 * HOURS, + confirm_period: 48 * HOURS, min_enactment_period: 24 * HOURS, min_approval: APP_TREASURER, min_support: SUP_TREASURER, diff --git a/relay/polkadot/src/governance/tracks.rs b/relay/polkadot/src/governance/tracks.rs index 2b6d470e51..6d9f62cf22 100644 --- a/relay/polkadot/src/governance/tracks.rs +++ b/relay/polkadot/src/governance/tracks.rs @@ -116,7 +116,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 decision_deposit: 1 * GRAND, prepare_period: 2 * HOURS, decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, + confirm_period: 7 * DAYS, min_enactment_period: 24 * HOURS, min_approval: APP_TREASURER, min_support: SUP_TREASURER, @@ -242,7 +242,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 decision_deposit: 100 * DOLLARS, prepare_period: 4 * HOURS, decision_period: 28 * DAYS, - confirm_period: 12 * HOURS, + confirm_period: 2 * DAYS, min_enactment_period: 24 * HOURS, min_approval: APP_SMALL_SPENDER, min_support: SUP_SMALL_SPENDER, @@ -256,7 +256,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 decision_deposit: 200 * DOLLARS, prepare_period: 4 * HOURS, decision_period: 28 * DAYS, - confirm_period: 24 * HOURS, + confirm_period: 4 * DAYS, min_enactment_period: 24 * HOURS, min_approval: APP_MEDIUM_SPENDER, min_support: SUP_MEDIUM_SPENDER, @@ -270,7 +270,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 decision_deposit: 400 * DOLLARS, prepare_period: 4 * HOURS, decision_period: 28 * DAYS, - confirm_period: 48 * HOURS, + confirm_period: 7 * DAYS, min_enactment_period: 24 * HOURS, min_approval: APP_BIG_SPENDER, min_support: SUP_BIG_SPENDER, From 44220848b3af6a1ac2c47683b9fc4193767624ed Mon Sep 17 00:00:00 2001 From: Adrian Catangiu Date: Thu, 4 Jan 2024 16:44:31 +0200 Subject: [PATCH 12/27] Add basic XCM emulator tests (#114) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds XCM emulator tests for Relay chains and Asset Hub System parachains. It adds them under new `integration-tests/emulated/` dir which lives at the root of the repo and doesn't pollute the prod networks code/crates/etc in any way. As you can see from the `diff`, no other files outside `integration-tests` are touched by this PR (except workspace `Cargo.toml` and `Cargo.lock`). Tests added by this PR are rather old/limited, but I will update them when we bump polkadot-sdk crates deps to `v1.4` or `v1.5` release. This will bring in more refined tests for existing scenarios and many new tests for new scenarios such as complex asset-transfers and bridging - sending XCMs over bridge, and asset transfers between AHs on different relays using bridge. Also after bumping repo to sdk `v1.4` or `v1.5` release, we can also drop 90% of `integration-tests/emulated/common` and get it from `crates.io`. Fixes https://github.com/polkadot-fellows/runtimes/issues/103 --------- Co-authored-by: Bastian Köcher --- .github/workflows/test.yml | 1 - Cargo.lock | 186 ++++ Cargo.toml | 2 + .../assets/asset-hub-kusama/Cargo.toml | 40 + .../assets/asset-hub-kusama/src/lib.rs | 92 ++ .../src/tests/hrmp_channels.rs | 196 +++++ .../assets/asset-hub-kusama/src/tests/mod.rs | 23 + .../src/tests/reserve_transfer.rs | 255 ++++++ .../assets/asset-hub-kusama/src/tests/send.rs | 195 +++++ .../src/tests/set_xcm_versions.rs | 93 ++ .../assets/asset-hub-kusama/src/tests/swap.rs | 364 ++++++++ .../asset-hub-kusama/src/tests/teleport.rs | 236 ++++++ .../assets/asset-hub-polkadot/Cargo.toml | 38 + .../assets/asset-hub-polkadot/src/lib.rs | 92 ++ .../src/tests/hrmp_channels.rs | 190 +++++ .../asset-hub-polkadot/src/tests/mod.rs | 22 + .../src/tests/reserve_transfer.rs | 255 ++++++ .../asset-hub-polkadot/src/tests/send.rs | 198 +++++ .../src/tests/set_xcm_versions.rs | 96 +++ .../asset-hub-polkadot/src/tests/teleport.rs | 236 ++++++ integration-tests/emulated/common/Cargo.toml | 65 ++ .../emulated/common/src/constants.rs | 802 ++++++++++++++++++ .../emulated/common/src/impls.rs | 645 ++++++++++++++ integration-tests/emulated/common/src/lib.rs | 328 +++++++ .../emulated/common/src/macros.rs | 107 +++ .../emulated/common/src/xcm_helpers.rs | 66 ++ 26 files changed, 4822 insertions(+), 1 deletion(-) create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs create mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs create mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs create mode 100644 integration-tests/emulated/common/Cargo.toml create mode 100644 integration-tests/emulated/common/src/constants.rs create mode 100644 integration-tests/emulated/common/src/impls.rs create mode 100644 integration-tests/emulated/common/src/lib.rs create mode 100644 integration-tests/emulated/common/src/macros.rs create mode 100644 integration-tests/emulated/common/src/xcm_helpers.rs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2672bc2b00..6ec7604957 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,7 +55,6 @@ jobs: run: cargo test --workspace --release --locked -q --features=runtime-metrics,try-runtime env: RUSTFLAGS: "-C debug-assertions -D warnings" - SKIP_WASM_BUILD: 1 - name: Test all features run: cargo test --workspace --release --locked -q --features=runtime-benchmarks,runtime-metrics,try-runtime diff --git a/Cargo.lock b/Cargo.lock index 90c6aff873..e59cb4ac97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -524,6 +524,29 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "asset-hub-kusama-integration-tests" +version = "1.0.0" +dependencies = [ + "assert_matches", + "asset-hub-kusama-runtime", + "frame-support", + "frame-system", + "integration-tests-common", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", + "sp-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "asset-hub-kusama-runtime" version = "1.0.0" @@ -598,6 +621,27 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "asset-hub-polkadot-integration-tests" +version = "1.0.0" +dependencies = [ + "frame-support", + "frame-system", + "integration-tests-common", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", + "sp-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "asset-hub-polkadot-runtime" version = "1.0.0" @@ -4452,6 +4496,53 @@ dependencies = [ "num-traits", ] +[[package]] +name = "integration-tests-common" +version = "1.0.0" +dependencies = [ + "asset-hub-kusama-runtime", + "asset-hub-polkadot-runtime", + "asset-test-utils", + "bp-messages", + "bridge-hub-kusama-runtime", + "bridge-hub-polkadot-runtime", + "bridge-runtime-common", + "collectives-polkadot-runtime", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "kusama-runtime-constants", + "pallet-assets", + "pallet-balances", + "pallet-bridge-messages", + "pallet-im-online", + "pallet-message-queue", + "pallet-staking", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "paste", + "penpal-runtime", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime", + "polkadot-runtime-constants", + "polkadot-runtime-parachains", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "staging-kusama-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "interceptor" version = "0.8.2" @@ -7797,6 +7888,68 @@ dependencies = [ "base64ct", ] +[[package]] +name = "penpal-runtime" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63d1c2aa2cbc5012e6af2781ff7fb0bf7188ff4d25643a0f36a44f327b779fb4" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "scale-info", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + [[package]] name = "percent-encoding" version = "2.3.0" @@ -13585,6 +13738,39 @@ dependencies = [ "time 0.3.27", ] +[[package]] +name = "xcm-emulator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd344ca12e6217fbbc6ee27bedb01113357ea31bea198e74b76f618102b6f06c" +dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "lazy_static", + "log", + "pallet-balances", + "pallet-message-queue", + "parachains-common", + "parity-scale-codec", + "paste", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", + "staging-xcm", + "staging-xcm-executor", +] + [[package]] name = "xcm-procedural" version = "4.0.0" diff --git a/Cargo.toml b/Cargo.toml index ae60da4073..1062ab77cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,8 @@ members = [ "system-parachains/bridge-hubs/bridge-hub-polkadot", "system-parachains/collectives/collectives-polkadot", "system-parachains/gluttons/glutton-kusama", + "integration-tests/emulated/assets/asset-hub-kusama", + "integration-tests/emulated/assets/asset-hub-polkadot", ] [profile.release] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml new file mode 100644 index 0000000000..4b61aa5b12 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "asset-hub-kusama-integration-tests" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Asset Hub Kusama runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0" } +assert_matches = "1.5.0" + +# Substrate +sp-runtime = { version = "28.0.0" } +frame-support = { version = "25.0.0" } +frame-system = { version = "25.0.0" } +pallet-assets = { version = "26.0.0" } +pallet-balances = { version = "25.0.0" } +pallet-asset-conversion = { version = "7.0.0" } + +# Polkadot +polkadot-core-primitives = { version = "4.0.0" } +polkadot-parachain-primitives = { version = "3.0.0" } +polkadot-runtime-parachains = { version = "4.0.0" } +xcm = { package = "staging-xcm", version = "4.0.0" } +pallet-xcm = { version = "4.0.0" } + +# Cumulus +parachains-common = { version = "4.0.0" } +xcm-emulator = { version = "0.2.0" } +asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } + +# Local +integration-tests-common = { path = "../../common" } + +[features] +runtime-benchmarks = [ + "integration-tests-common/runtime-benchmarks" +] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs new file mode 100644 index 0000000000..60c4551459 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs @@ -0,0 +1,92 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![cfg(not(feature = "runtime-benchmarks"))] + +pub use codec::Encode; +pub use frame_support::{ + assert_err, assert_ok, + pallet_prelude::Weight, + sp_runtime::{AccountId32, DispatchError, DispatchResult}, + traits::fungibles::Inspect, +}; +pub use integration_tests_common::{ + constants::{ + asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, PROOF_SIZE_THRESHOLD, + REF_TIME_THRESHOLD, XCM_V3, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender, Kusama, + KusamaPallet, KusamaReceiver, KusamaSender, PenpalKusamaA, PenpalKusamaAPallet, + PenpalKusamaAReceiver, PenpalKusamaASender, PenpalKusamaB, PenpalKusamaBPallet, +}; +pub use parachains_common::{AccountId, Balance}; +pub use xcm::{ + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{Error, NetworkId::Kusama as KusamaId}, +}; +pub use xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, +}; + +pub const ASSET_ID: u32 = 1; +pub const ASSET_MIN_BALANCE: u128 = 1000; +// `Assets` pallet index +pub const ASSETS_PALLET_ID: u8 = 50; + +pub type RelayToSystemParaTest = Test; +pub type SystemParaToRelayTest = Test; +pub type SystemParaToParaTest = Test; + +/// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests +pub fn relay_test_args(amount: Balance) -> TestArgs { + TestArgs { + dest: Kusama::child_location_of(AssetHubKusama::para_id()), + beneficiary: AccountId32Junction { + network: None, + id: AssetHubKusamaReceiver::get().into(), + } + .into(), + amount, + assets: (Here, amount).into(), + asset_id: None, + fee_asset_item: 0, + weight_limit: WeightLimit::Unlimited, + } +} + +/// Returns a `TestArgs` instance to be used for the System Parachain across integration tests +pub fn system_para_test_args( + dest: MultiLocation, + beneficiary_id: AccountId32, + amount: Balance, + assets: MultiAssets, + asset_id: Option, +) -> TestArgs { + TestArgs { + dest, + beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), + amount, + assets, + asset_id, + fee_asset_item: 0, + weight_limit: WeightLimit::Unlimited, + } +} + +#[cfg(test)] +#[cfg(not(feature = "runtime-benchmarks"))] +mod tests; diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs new file mode 100644 index 0000000000..f930e3182c --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs @@ -0,0 +1,196 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +const MAX_CAPACITY: u32 = 8; +const MAX_MESSAGE_SIZE: u32 = 8192; + +/// Opening HRMP channels between Parachains should work +#[test] +fn open_hrmp_channel_between_paras_works() { + // Parchain A init values + let para_a_id = PenpalKusamaA::para_id(); + let para_a_root_origin = ::RuntimeOrigin::root(); + + // Parachain B init values + let para_b_id = PenpalKusamaB::para_id(); + let para_b_root_origin = ::RuntimeOrigin::root(); + + let fee_amount = KUSAMA_ED * 1000; + let fund_amount = KUSAMA_ED * 1000_000_000; + + // Fund Parachain's Sovereign accounts to be able to reserve the deposit + let para_a_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_a_id); + let para_b_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_b_id); + + let relay_destination: VersionedMultiLocation = PenpalKusamaA::parent_location().into(); + + // ---- Init Open channel from Parachain to System Parachain + let mut call = Kusama::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE); + let origin_kind = OriginKind::Native; + let native_asset: MultiAsset = (Here, fee_amount).into(); + let beneficiary = Kusama::sovereign_account_id_of_child_para(para_a_id); + + let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary); + + PenpalKusamaA::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + para_a_root_origin, + bx!(relay_destination.clone()), + bx!(xcm), + )); + + PenpalKusamaA::assert_xcm_pallet_sent(); + }); + + Kusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + Kusama::assert_ump_queue_processed( + true, + Some(para_a_id), + Some(Weight::from_parts(1_300_000_000, 200000)), + ); + + assert_expected_events!( + Kusama, + vec![ + // Parachain's Sovereign account balance is withdrawn to pay XCM fees + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == para_a_sovereign_account.clone(), + amount: *amount == fee_amount, + }, + // Sender deposit is reserved for Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ + who: *who == para_a_sovereign_account, + }, + // Open channel requested from Para A to Para B + RuntimeEvent::Hrmp( + polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested { + sender, + recipient, + proposed_max_capacity: max_capacity, + proposed_max_message_size: max_message_size + } + ) => { + sender: *sender == para_a_id.into(), + recipient: *recipient == para_b_id.into(), + max_capacity: *max_capacity == MAX_CAPACITY, + max_message_size: *max_message_size == MAX_MESSAGE_SIZE, + }, + ] + ); + }); + + // ---- Accept Open channel from Parachain to System Parachain + call = Kusama::accept_open_channel_call(para_a_id); + let beneficiary = Kusama::sovereign_account_id_of_child_para(para_b_id); + + xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary); + + PenpalKusamaB::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + para_b_root_origin, + bx!(relay_destination), + bx!(xcm), + )); + + PenpalKusamaB::assert_xcm_pallet_sent(); + }); + + PenpalKusamaB::execute_with(|| {}); + + Kusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + Kusama::assert_ump_queue_processed( + true, + Some(para_b_id), + Some(Weight::from_parts(1_300_000_000, 200_000)), + ); + + assert_expected_events!( + Kusama, + vec![ + // Parachain's Sovereign account balance is withdrawn to pay XCM fees + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == para_b_sovereign_account.clone(), + amount: *amount == fee_amount, + }, + // Sender deposit is reserved for Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ + who: *who == para_b_sovereign_account, + }, + // Open channel accepted for Para A to Para B + RuntimeEvent::Hrmp( + polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted { + sender, recipient + } + ) => { + sender: *sender == para_a_id.into(), + recipient: *recipient == para_b_id.into(), + }, + ] + ); + }); + + Kusama::force_process_hrmp_open(para_a_id, para_b_id); +} + +/// Opening HRMP channels between System Parachains and Parachains should work +#[test] +fn force_open_hrmp_channel_for_system_para_works() { + // Relay Chain init values + let relay_root_origin = ::RuntimeOrigin::root(); + + // System Para init values + let system_para_id = AssetHubKusama::para_id(); + + // Parachain A init values + let para_a_id = PenpalKusamaA::para_id(); + + Kusama::execute_with(|| { + assert_ok!(::Hrmp::force_open_hrmp_channel( + relay_root_origin, + system_para_id, + para_a_id, + MAX_CAPACITY, + MAX_MESSAGE_SIZE + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Kusama, + vec![ + // HRMP channel forced opened + RuntimeEvent::Hrmp( + polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened { + sender, + recipient, + proposed_max_capacity: max_capacity, + proposed_max_message_size: max_message_size + } + ) => { + sender: *sender == system_para_id.into(), + recipient: *recipient == para_a_id.into(), + max_capacity: *max_capacity == MAX_CAPACITY, + max_message_size: *max_message_size == MAX_MESSAGE_SIZE, + }, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs new file mode 100644 index 0000000000..ac0b92004e --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs @@ -0,0 +1,23 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![cfg(not(feature = "runtime-benchmarks"))] + +mod hrmp_channels; +mod reserve_transfer; +mod send; +mod set_xcm_versions; +mod swap; +mod teleport; diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs new file mode 100644 index 0000000000..cc2e7a66b3 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -0,0 +1,255 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 6_000))); + + assert_expected_events!( + Kusama, + vec![ + // Amount to reserve transfer is transferred to System Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + from: *from == t.sender.account_id, + to: *to == Kusama::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { + AssetHubKusama::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); +} + +fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { + AssetHubKusama::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) +} + +fn system_para_to_para_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 630_000_000, + 6_000, + ))); + + assert_expected_events!( + AssetHubKusama, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereing account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubKusama::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 680_000_000, + 6000, + ))); + + assert_expected_events!( + AssetHubKusama, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereing account + RuntimeEvent::Assets( + pallet_assets::Event::Transferred { asset_id, from, to, amount } + ) => { + asset_id: *asset_id == ASSET_ID, + from: *from == t.sender.account_id, + to: *to == AssetHubKusama::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't +/// work +#[test] +fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = KUSAMA_ED * 1000; + let test_args = TestContext { + sender: KusamaSender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: relay_test_args(amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(system_para_dest_assertions_incomplete); + test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +#[test] +fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(system_para_to_relay_assertions); + test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert_eq!(sender_balance_before, sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +#[test] +fn limited_reserve_transfer_native_asset_from_system_para_to_para() { + // Init values for System Parachain + let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let beneficiary_id = PenpalKusamaAReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: PenpalKusamaAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + + test.set_assertion::(system_para_to_para_assertions); + // TODO: Add assertion for Penpal runtime. Right now message is failing with + // `UntrustedReserveLocation` + test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve + // transfers +} + +/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +#[test] +fn limited_reserve_transfer_asset_from_system_para_to_para() { + // Force create asset from Relay Chain and mint assets for System Parachain's sender account + AssetHubKusama::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + true, + AssetHubKusamaSender::get(), + ASSET_MIN_BALANCE * 1000000, + ); + + // Init values for System Parachain + let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let beneficiary_id = PenpalKusamaAReceiver::get(); + let amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets = + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) + .into(); + + let system_para_test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: PenpalKusamaAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + + system_para_test.set_assertion::(system_para_to_para_assets_assertions); + // TODO: Add assertions when Penpal is able to manage assets + system_para_test + .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + system_para_test.assert(); +} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs new file mode 100644 index 0000000000..face60a3a5 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs @@ -0,0 +1,195 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +/// Relay Chain should be able to execute `Transact` instructions in System Parachain +/// when `OriginKind::Superuser` and signer is `sudo` +#[test] +fn send_transact_sudo_from_relay_to_system_para_works() { + // Init tests variables + let root_origin = ::RuntimeOrigin::root(); + let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into(); + let asset_owner: AccountId = AssetHubKusamaSender::get().into(); + let xcm = AssetHubKusama::force_create_asset_xcm( + OriginKind::Superuser, + ASSET_ID, + asset_owner.clone(), + true, + 1000, + ); + // Send XCM message from Relay Chain + Kusama::execute_with(|| { + assert_ok!(::XcmPallet::send( + root_origin, + bx!(system_para_destination), + bx!(xcm), + )); + + Kusama::assert_xcm_pallet_sent(); + }); + + // Receive XCM message in Assets Parachain + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_020_000_000, 200_000))); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => { + asset_id: *asset_id == ASSET_ID, + owner: *owner == asset_owner, + }, + ] + ); + + assert!(::Assets::asset_exists(ASSET_ID)); + }); +} + +/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain +/// when `OriginKind::Native` +#[test] +fn send_transact_native_from_relay_to_system_para_fails() { + // Init tests variables + let signed_origin = ::RuntimeOrigin::signed(KusamaSender::get().into()); + let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into(); + let asset_owner = AssetHubKusamaSender::get().into(); + let xcm = AssetHubKusama::force_create_asset_xcm( + OriginKind::Native, + ASSET_ID, + asset_owner, + true, + 1000, + ); + + // Send XCM message from Relay Chain + Kusama::execute_with(|| { + assert_err!( + ::XcmPallet::send( + signed_origin, + bx!(system_para_destination), + bx!(xcm) + ), + DispatchError::BadOrigin + ); + }); +} + +/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain +/// when `OriginKind::Native` +#[test] +fn send_transact_native_from_system_para_to_relay_fails() { + // Init tests variables + let signed_origin = + ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); + let relay_destination = AssetHubKusama::parent_location().into(); + let call = ::RuntimeCall::System(frame_system::Call::< + ::Runtime, + >::remark_with_event { + remark: vec![0, 1, 2, 3], + }) + .encode() + .into(); + let origin_kind = OriginKind::Native; + + let xcm = xcm_transact_unpaid_execution(call, origin_kind); + + // Send XCM message from Relay Chain + AssetHubKusama::execute_with(|| { + assert_err!( + ::PolkadotXcm::send( + signed_origin, + bx!(relay_destination), + bx!(xcm) + ), + DispatchError::BadOrigin + ); + }); +} + +/// Parachain should be able to send XCM paying its fee with sufficient asset +/// in the System Parachain +#[test] +fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { + let para_sovereign_account = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + ); + + // Force create and mint assets for Parachain's sovereign account + AssetHubKusama::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + true, + para_sovereign_account.clone(), + ASSET_MIN_BALANCE * 1000000000, + ); + + // We just need a call that can pass the `SafeCallFilter` + // Call values are not relevant + let call = AssetHubKusama::force_create_asset_call( + ASSET_ID, + para_sovereign_account.clone(), + true, + ASSET_MIN_BALANCE, + ); + + let origin_kind = OriginKind::SovereignAccount; + let fee_amount = ASSET_MIN_BALANCE * 1000000; + let native_asset = + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into(); + + let root_origin = ::RuntimeOrigin::root(); + let system_para_destination = + PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()).into(); + let xcm = xcm_transact_paid_execution( + call, + origin_kind, + native_asset, + para_sovereign_account.clone(), + ); + + PenpalKusamaA::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + root_origin, + bx!(system_para_destination), + bx!(xcm), + )); + + PenpalKusamaA::assert_xcm_pallet_sent(); + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_xcmp_queue_success(None); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == ASSET_ID, + owner: *owner == para_sovereign_account, + balance: *balance == fee_amount, + }, + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, .. }) => { + asset_id: *asset_id == ASSET_ID, + }, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs new file mode 100644 index 0000000000..4b2716e90f --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs @@ -0,0 +1,93 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +#[test] +fn relay_sets_system_para_xcm_supported_version() { + // Init tests variables + let sudo_origin = ::RuntimeOrigin::root(); + let system_para_destination: MultiLocation = + Kusama::child_location_of(AssetHubKusama::para_id()); + + // Relay Chain sets supported version for Asset Parachain + Kusama::execute_with(|| { + assert_ok!(::XcmPallet::force_xcm_version( + sudo_origin, + bx!(system_para_destination), + XCM_V3 + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Kusama, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::SupportedVersionChanged { + location, + version: XCM_V3 + }) => { location: *location == system_para_destination, }, + ] + ); + }); +} + +#[test] +fn system_para_sets_relay_xcm_supported_version() { + // Init test variables + let sudo_origin = ::RuntimeOrigin::root(); + let parent_location = AssetHubKusama::parent_location(); + let system_para_destination: VersionedMultiLocation = + Kusama::child_location_of(AssetHubKusama::para_id()).into(); + let call = ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< + ::Runtime, + >::force_xcm_version { + location: bx!(parent_location), + version: XCM_V3, + }) + .encode() + .into(); + let origin_kind = OriginKind::Superuser; + + let xcm = xcm_transact_unpaid_execution(call, origin_kind); + + // System Parachain sets supported version for Relay Chain throught it + Kusama::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(system_para_destination), + bx!(xcm), + )); + + Kusama::assert_xcm_pallet_sent(); + }); + + // System Parachain receive the XCM message + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_020_000_000, 200_000))); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::SupportedVersionChanged { + location, + version: XCM_V3 + }) => { location: *location == parent_location, }, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs new file mode 100644 index 0000000000..3a67b54358 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs @@ -0,0 +1,364 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; +use frame_support::{instances::Instance2, BoundedVec}; +use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +use sp_runtime::{DispatchError, ModuleError}; + +#[test] +fn swap_locally_on_chain_using_local_assets() { + let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + let asset_one = Box::new(MultiLocation { + parents: 0, + interior: X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_ok!(::Assets::create( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + ASSET_ID.into(), + AssetHubKusamaSender::get().into(), + 1000, + )); + assert!(::Assets::asset_exists(ASSET_ID)); + + assert_ok!(::Assets::mint( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + ASSET_ID.into(), + AssetHubKusamaSender::get().into(), + 100_000_000_000_000, + )); + + assert_ok!(::Balances::force_set_balance( + ::RuntimeOrigin::root(), + AssetHubKusamaSender::get().into(), + 100_000_000_000_000, + )); + + assert_ok!(::AssetConversion::create_pool( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + asset_native.clone(), + asset_one.clone(), + )); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::PoolCreated { .. }) => {}, + ] + ); + + assert_ok!(::AssetConversion::add_liquidity( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + asset_native.clone(), + asset_one.clone(), + 1_000_000_000_000, + 2_000_000_000_000, + 0, + 0, + AssetHubKusamaSender::get().into() + )); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::LiquidityAdded {lp_token_minted, .. }) => { lp_token_minted: *lp_token_minted == 1414213562273, }, + ] + ); + + let path = BoundedVec::<_, _>::truncate_from(vec![asset_native.clone(), asset_one.clone()]); + + assert_ok!( + ::AssetConversion::swap_exact_tokens_for_tokens( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + path, + 100, + 1, + AssetHubKusamaSender::get().into(), + true + ) + ); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. }) => { + amount_in: *amount_in == 100, + amount_out: *amount_out == 199, + }, + ] + ); + + assert_ok!(::AssetConversion::remove_liquidity( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + asset_native, + asset_one, + 1414213562273 - EXISTENTIAL_DEPOSIT * 2, // all but the 2 EDs can't be retrieved. + 0, + 0, + AssetHubKusamaSender::get().into(), + )); + }); +} + +#[test] +fn swap_locally_on_chain_using_foreign_assets() { + use frame_support::weights::WeightToFee; + + let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + + let foreign_asset1_at_asset_hub_kusama = Box::new(MultiLocation { + parents: 1, + interior: X3( + Parachain(PenpalKusamaA::para_id().into()), + PalletInstance(ASSETS_PALLET_ID), + GeneralIndex(ASSET_ID.into()), + ), + }); + + let assets_para_destination: VersionedMultiLocation = + MultiLocation { parents: 1, interior: X1(Parachain(AssetHubKusama::para_id().into())) } + .into(); + + let penpal_location = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) }; + + // 1. Create asset on penpal: + PenpalKusamaA::execute_with(|| { + assert_ok!(::Assets::create( + ::RuntimeOrigin::signed(PenpalKusamaASender::get()), + ASSET_ID.into(), + PenpalKusamaASender::get().into(), + 1000, + )); + + assert!(::Assets::asset_exists(ASSET_ID)); + }); + + // 2. Create foreign asset on asset_hub_kusama: + + let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000); + let origin_kind = OriginKind::Xcm; + let sov_penpal_on_asset_hub_kusama = AssetHubKusama::sovereign_account_id_of(penpal_location); + + AssetHubKusama::fund_accounts(vec![ + (AssetHubKusamaSender::get().into(), 5_000_000 * KUSAMA_ED), /* An account to swap dot + * for something else. */ + (sov_penpal_on_asset_hub_kusama.clone().into(), 1000_000_000_000_000_000 * KUSAMA_ED), + ]); + + let sov_penpal_on_asset_hub_kusama_as_location: MultiLocation = MultiLocation { + parents: 0, + interior: X1(AccountId32Junction { + network: None, + id: sov_penpal_on_asset_hub_kusama.clone().into(), + }), + }; + + let call_foreign_assets_create = + ::RuntimeCall::ForeignAssets(pallet_assets::Call::< + ::Runtime, + Instance2, + >::create { + id: *foreign_asset1_at_asset_hub_kusama, + min_balance: 1000, + admin: sov_penpal_on_asset_hub_kusama.clone().into(), + }) + .encode() + .into(); + + let buy_execution_fee_amount = parachains_common::kusama::fee::WeightToFee::weight_to_fee( + &Weight::from_parts(10_100_000_000_000, 300_000), + ); + let buy_execution_fee = MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(buy_execution_fee_amount), + }; + + let xcm = VersionedXcm::from(Xcm(vec![ + WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() }, + BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited }, + Transact { require_weight_at_most, origin_kind, call: call_foreign_assets_create }, + RefundSurplus, + DepositAsset { + assets: All.into(), + beneficiary: sov_penpal_on_asset_hub_kusama_as_location, + }, + ])); + + // Send XCM message from penpal => asset_hub_kusama + let sudo_penpal_origin = ::RuntimeOrigin::root(); + PenpalKusamaA::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + sudo_penpal_origin.clone(), + bx!(assets_para_destination.clone()), + bx!(xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + + // Receive XCM message in Assets Parachain + AssetHubKusama::execute_with(|| { + assert!(::ForeignAssets::asset_exists( + *foreign_asset1_at_asset_hub_kusama + )); + + // 3: Mint foreign asset on asset_hub_kusama: + // + // (While it might be nice to use batch, + // currently that's disabled due to safe call filters.) + + type RuntimeEvent = ::RuntimeEvent; + // 3. Mint foreign asset (in reality this should be a teleport or some such) + assert_ok!(::ForeignAssets::mint( + ::RuntimeOrigin::signed( + sov_penpal_on_asset_hub_kusama.clone().into() + ), + *foreign_asset1_at_asset_hub_kusama, + sov_penpal_on_asset_hub_kusama.clone().into(), + 3_000_000_000_000, + )); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + + // 4. Create pool: + assert_ok!(::AssetConversion::create_pool( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + asset_native.clone(), + foreign_asset1_at_asset_hub_kusama.clone(), + )); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::PoolCreated { .. }) => {}, + ] + ); + + // 5. Add liquidity: + assert_ok!(::AssetConversion::add_liquidity( + ::RuntimeOrigin::signed( + sov_penpal_on_asset_hub_kusama.clone() + ), + asset_native.clone(), + foreign_asset1_at_asset_hub_kusama.clone(), + 1_000_000_000_000, + 2_000_000_000_000, + 0, + 0, + sov_penpal_on_asset_hub_kusama.clone().into() + )); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::LiquidityAdded {lp_token_minted, .. }) => { + lp_token_minted: *lp_token_minted == 1414213562273, + }, + ] + ); + + // 6. Swap! + let path = BoundedVec::<_, _>::truncate_from(vec![ + asset_native.clone(), + foreign_asset1_at_asset_hub_kusama.clone(), + ]); + + assert_ok!( + ::AssetConversion::swap_exact_tokens_for_tokens( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + path, + 100000, + 1000, + AssetHubKusamaSender::get().into(), + true + ) + ); + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. },) => { + amount_in: *amount_in == 100000, + amount_out: *amount_out == 199399, + }, + ] + ); + + // 7. Remove liquidity + assert_ok!(::AssetConversion::remove_liquidity( + ::RuntimeOrigin::signed( + sov_penpal_on_asset_hub_kusama.clone() + ), + asset_native, + foreign_asset1_at_asset_hub_kusama, + 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. + 0, + 0, + sov_penpal_on_asset_hub_kusama.clone().into(), + )); + }); +} + +#[test] +fn cannot_create_pool_from_pool_assets() { + let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + let mut asset_one = asset_hub_kusama_runtime::xcm_config::PoolAssetsPalletLocation::get(); + asset_one.append_with(GeneralIndex(ASSET_ID.into())).expect("pool assets"); + + AssetHubKusama::execute_with(|| { + let pool_owner_account_id = asset_hub_kusama_runtime::AssetConversionOrigin::get(); + + assert_ok!(::PoolAssets::create( + ::RuntimeOrigin::signed(pool_owner_account_id.clone()), + ASSET_ID.into(), + pool_owner_account_id.clone().into(), + 1000, + )); + assert!(::PoolAssets::asset_exists(ASSET_ID)); + + assert_ok!(::PoolAssets::mint( + ::RuntimeOrigin::signed(pool_owner_account_id), + ASSET_ID.into(), + AssetHubKusamaSender::get().into(), + 3_000_000_000_000, + )); + + assert_matches::assert_matches!( + ::AssetConversion::create_pool( + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), + asset_native.clone(), + Box::new(asset_one), + ), + Err(DispatchError::Module(ModuleError{index: _, error: _, message})) => assert_eq!(message, Some("UnsupportedAsset")) + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs new file mode 100644 index 0000000000..b0d2712046 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs @@ -0,0 +1,236 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![allow(dead_code)] // + +use crate::*; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 7_000))); + + assert_expected_events!( + Kusama, + vec![ + // Amount to teleport is withdrawn from Sender + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + // Amount to teleport is deposited in Relay's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn relay_dest_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + Kusama::assert_ump_queue_processed( + true, + Some(AssetHubKusama::para_id()), + Some(Weight::from_parts(310_000_000, 7_000)), + ); + + assert_expected_events!( + Kusama, + vec![ + // Amount is witdrawn from Relay Chain's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { + Kusama::assert_ump_queue_processed( + false, + Some(AssetHubKusama::para_id()), + Some(Weight::from_parts(150_000_000, 3_500)), + ); +} + +fn para_origin_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 535_000_000, + 7_000, + ))); + + AssetHubKusama::assert_parachain_system_ump_sent(); + + assert_expected_events!( + AssetHubKusama, + vec![ + // Amount is withdrawn from Sender's account + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_dest_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubKusama::assert_dmp_queue_complete(None); + + assert_expected_events!( + AssetHubKusama, + vec![ + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::limited_teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +/// Limited Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn limited_teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = KUSAMA_ED * 1000; + let test_args = TestContext { + sender: KusamaSender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: relay_test_args(amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Limited Teleport of native asset from System Parachain to Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + limited_teleport_native_assets_from_relay_to_system_para_works(); + + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Limited Teleport of native asset from System Parachain to Relay Chain +/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn limited_teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let destination = AssetHubKusama::parent_location().into(); + let beneficiary_id = KusamaReceiver::get().into(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced by amount to send (+ delivery fees) + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml new file mode 100644 index 0000000000..eb01b282b8 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "asset-hub-polkadot-integration-tests" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Asset Hub Polkadot runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0" } + +# Substrate +sp-runtime = { version = "28.0.0" } +frame-support = { version = "25.0.0" } +frame-system = { version = "25.0.0" } +pallet-assets = { version = "26.0.0" } +pallet-balances = { version = "25.0.0" } +pallet-asset-conversion = { version = "7.0.0" } + +# Polkadot +polkadot-core-primitives = { version = "4.0.0" } +polkadot-parachain-primitives = { version = "3.0.0" } +polkadot-runtime-parachains = { version = "4.0.0" } +xcm = { package = "staging-xcm", version = "4.0.0" } +pallet-xcm = { version = "4.0.0" } + +# Cumulus +parachains-common = { version = "4.0.0" } +xcm-emulator = { version = "0.2.0" } + +# Local +integration-tests-common = { path = "../../common" } + +[features] +runtime-benchmarks = [ + "integration-tests-common/runtime-benchmarks" +] diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs new file mode 100644 index 0000000000..8daf8c81e7 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs @@ -0,0 +1,92 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![cfg(not(feature = "runtime-benchmarks"))] + +pub use codec::Encode; +pub use frame_support::{ + assert_err, assert_ok, + pallet_prelude::Weight, + sp_runtime::{AccountId32, DispatchError, DispatchResult}, + traits::fungibles::Inspect, +}; +pub use integration_tests_common::{ + constants::{ + asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender, + PenpalPolkadotA, PenpalPolkadotAPallet, PenpalPolkadotAReceiver, PenpalPolkadotB, + PenpalPolkadotBPallet, Polkadot, PolkadotPallet, PolkadotReceiver, PolkadotSender, +}; +pub use parachains_common::{AccountId, Balance}; +pub use xcm::{ + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{Error, NetworkId::Polkadot as PolkadotId}, +}; +pub use xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, +}; + +pub const ASSET_ID: u32 = 1; +pub const ASSET_MIN_BALANCE: u128 = 1000; +// `Assets` pallet index +pub const ASSETS_PALLET_ID: u8 = 50; + +pub type RelayToSystemParaTest = Test; +pub type SystemParaToRelayTest = Test; +pub type SystemParaToParaTest = Test; + +/// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests +pub fn relay_test_args(amount: Balance) -> TestArgs { + TestArgs { + dest: Polkadot::child_location_of(AssetHubPolkadot::para_id()), + beneficiary: AccountId32Junction { + network: None, + id: AssetHubPolkadotReceiver::get().into(), + } + .into(), + amount, + assets: (Here, amount).into(), + asset_id: None, + fee_asset_item: 0, + weight_limit: WeightLimit::Unlimited, + } +} + +/// Returns a `TestArgs` instance to be used for the System Parachain across integration tests +pub fn system_para_test_args( + dest: MultiLocation, + beneficiary_id: AccountId32, + amount: Balance, + assets: MultiAssets, + asset_id: Option, +) -> TestArgs { + TestArgs { + dest, + beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), + amount, + assets, + asset_id, + fee_asset_item: 0, + weight_limit: WeightLimit::Unlimited, + } +} + +#[cfg(test)] +#[cfg(not(feature = "runtime-benchmarks"))] +mod tests; diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs new file mode 100644 index 0000000000..731e601aea --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs @@ -0,0 +1,190 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +const MAX_CAPACITY: u32 = 8; +const MAX_MESSAGE_SIZE: u32 = 8192; + +/// Opening HRMP channels between Parachains should work +#[test] +fn open_hrmp_channel_between_paras_works() { + // Parchain A init values + let para_a_id = PenpalPolkadotA::para_id(); + let para_a_root_origin = ::RuntimeOrigin::root(); + + // Parachain B init values + let para_b_id = PenpalPolkadotB::para_id(); + let para_b_root_origin = ::RuntimeOrigin::root(); + + let fee_amount = POLKADOT_ED * 1000; + let fund_amount = POLKADOT_ED * 1000_000_000; + + // Fund Parachain's Sovereign accounts to be able to reserve the deposit + let para_a_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_a_id); + let para_b_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_b_id); + + let relay_destination: VersionedMultiLocation = PenpalPolkadotA::parent_location().into(); + + // ---- Init Open channel from Parachain to System Parachain + let mut call = Polkadot::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE); + let origin_kind = OriginKind::Native; + let native_asset: MultiAsset = (Here, fee_amount).into(); + let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_a_id); + + let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary); + + PenpalPolkadotA::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + para_a_root_origin, + bx!(relay_destination.clone()), + bx!(xcm), + )); + + PenpalPolkadotA::assert_xcm_pallet_sent(); + }); + + Polkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + Polkadot::assert_ump_queue_processed( + true, + Some(para_a_id), + Some(Weight::from_parts(1_300_000_000, 207_000)), + ); + + assert_expected_events!( + Polkadot, + vec![ + // Parachain's Sovereign account balance is withdrawn to pay XCM fees + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == para_a_sovereign_account.clone(), + amount: *amount == fee_amount, + }, + // Sender deposit is reserved for Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ + who: *who == para_a_sovereign_account, + }, + // Open channel requested from Para A to Para B + RuntimeEvent::Hrmp( + polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested { + sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size + } + ) => { + sender: *sender == para_a_id.into(), + recipient: *recipient == para_b_id.into(), + max_capacity: *max_capacity == MAX_CAPACITY, + max_message_size: *max_message_size == MAX_MESSAGE_SIZE, + }, + ] + ); + }); + + // ---- Accept Open channel from Parachain to System Parachain + call = Polkadot::accept_open_channel_call(para_a_id); + let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_b_id); + + xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary); + + PenpalPolkadotB::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + para_b_root_origin, + bx!(relay_destination), + bx!(xcm), + )); + + PenpalPolkadotB::assert_xcm_pallet_sent(); + }); + + PenpalPolkadotB::execute_with(|| {}); + + Polkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + Polkadot::assert_ump_queue_processed( + true, + Some(para_b_id), + Some(Weight::from_parts(1_300_000_000, 207_000)), + ); + + assert_expected_events!( + Polkadot, + vec![ + // Parachain's Sovereign account balance is withdrawn to pay XCM fees + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == para_b_sovereign_account.clone(), + amount: *amount == fee_amount, + }, + // Sender deposit is reserved for Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ + who: *who == para_b_sovereign_account, + }, + // Open channel accepted for Para A to Para B + RuntimeEvent::Hrmp( + polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted { + sender, recipient + } + ) => { + sender: *sender == para_a_id.into(), + recipient: *recipient == para_b_id.into(), + }, + ] + ); + }); + + Polkadot::force_process_hrmp_open(para_a_id, para_b_id); +} + +/// Opening HRMP channels between System Parachains and Parachains should work +#[test] +fn force_open_hrmp_channel_for_system_para_works() { + // Relay Chain init values + let relay_root_origin = ::RuntimeOrigin::root(); + + // System Para init values + let system_para_id = AssetHubPolkadot::para_id(); + + // Parachain A init values + let para_a_id = PenpalPolkadotA::para_id(); + + Polkadot::execute_with(|| { + assert_ok!(::Hrmp::force_open_hrmp_channel( + relay_root_origin, + system_para_id, + para_a_id, + MAX_CAPACITY, + MAX_MESSAGE_SIZE + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Polkadot, + vec![ + // HRMP channel forced opened + RuntimeEvent::Hrmp( + polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened { + sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size + } + ) => { + sender: *sender == system_para_id.into(), + recipient: *recipient == para_a_id.into(), + max_capacity: *max_capacity == MAX_CAPACITY, + max_message_size: *max_message_size == MAX_MESSAGE_SIZE, + }, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs new file mode 100644 index 0000000000..27c92c543b --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs @@ -0,0 +1,22 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![cfg(not(feature = "runtime-benchmarks"))] + +mod hrmp_channels; +mod reserve_transfer; +mod send; +mod set_xcm_versions; +mod teleport; diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs new file mode 100644 index 0000000000..96c4358abd --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -0,0 +1,255 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 6_000))); + + assert_expected_events!( + Polkadot, + vec![ + // Amount to reserve transfer is transferred to System Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + from: *from == t.sender.account_id, + to: *to == Polkadot::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { + AssetHubPolkadot::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); +} + +fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { + AssetHubPolkadot::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) +} + +fn system_para_to_para_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 680_000_000, + 6000, + ))); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereing account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubPolkadot::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 680_000_000, + 6000, + ))); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereing account + RuntimeEvent::Assets( + pallet_assets::Event::Transferred { asset_id, from, to, amount } + ) => { + asset_id: *asset_id == ASSET_ID, + from: *from == t.sender.account_id, + to: *to == AssetHubPolkadot::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't +/// work +#[test] +fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = POLKADOT_ED * 1000; + let test_args = TestContext { + sender: PolkadotSender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: relay_test_args(amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(system_para_dest_assertions_incomplete); + test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +#[test] +fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(system_para_to_relay_assertions); + test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert_eq!(sender_balance_before, sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +#[test] +fn limited_reserve_transfer_native_asset_from_system_para_to_para() { + // Init values for System Parachain + let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let beneficiary_id = PenpalPolkadotAReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PenpalPolkadotAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + + test.set_assertion::(system_para_to_para_assertions); + // TODO: Add assertion for Penpal runtime. Right now message is failing with + // `UntrustedReserveLocation` + test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve + // transfers +} + +/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +#[test] +fn limited_reserve_transfer_asset_from_system_para_to_para() { + // Force create asset from Relay Chain and mint assets for System Parachain's sender account + AssetHubPolkadot::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + true, + AssetHubPolkadotSender::get(), + ASSET_MIN_BALANCE * 1000000, + ); + + // Init values for System Parachain + let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let beneficiary_id = PenpalPolkadotAReceiver::get(); + let amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets = + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) + .into(); + + let system_para_test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PenpalPolkadotAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + + system_para_test.set_assertion::(system_para_to_para_assets_assertions); + // TODO: Add assertions when Penpal is able to manage assets + system_para_test + .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + system_para_test.assert(); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs new file mode 100644 index 0000000000..86ee5838b4 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs @@ -0,0 +1,198 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +/// Relay Chain should be able to execute `Transact` instructions in System Parachain +/// when `OriginKind::Superuser` and signer is `sudo` +#[test] +fn send_transact_sudo_from_relay_to_system_para_works() { + // Init tests variables + let root_origin = ::RuntimeOrigin::root(); + let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); + let asset_owner: AccountId = AssetHubPolkadotSender::get().into(); + let xcm = AssetHubPolkadot::force_create_asset_xcm( + OriginKind::Superuser, + ASSET_ID, + asset_owner.clone(), + true, + 1000, + ); + // Send XCM message from Relay Chain + Polkadot::execute_with(|| { + assert_ok!(::XcmPallet::send( + root_origin, + bx!(system_para_destination), + bx!(xcm), + )); + + Polkadot::assert_xcm_pallet_sent(); + }); + + // Receive XCM message in Assets Parachain + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts( + 1_020_000_000, + 200_000, + ))); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => { + asset_id: *asset_id == ASSET_ID, + owner: *owner == asset_owner, + }, + ] + ); + + assert!(::Assets::asset_exists(ASSET_ID)); + }); +} + +/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain +/// when `OriginKind::Native` +#[test] +fn send_transact_native_from_relay_to_system_para_fails() { + // Init tests variables + let signed_origin = ::RuntimeOrigin::signed(PolkadotSender::get().into()); + let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); + let asset_owner = AssetHubPolkadotSender::get().into(); + let xcm = AssetHubPolkadot::force_create_asset_xcm( + OriginKind::Native, + ASSET_ID, + asset_owner, + true, + 1000, + ); + + // Send XCM message from Relay Chain + Polkadot::execute_with(|| { + assert_err!( + ::XcmPallet::send( + signed_origin, + bx!(system_para_destination), + bx!(xcm) + ), + DispatchError::BadOrigin + ); + }); +} + +/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain +/// when `OriginKind::Native` +#[test] +fn send_transact_native_from_system_para_to_relay_fails() { + // Init tests variables + let signed_origin = + ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); + let relay_destination = AssetHubPolkadot::parent_location().into(); + let call = ::RuntimeCall::System(frame_system::Call::< + ::Runtime, + >::remark_with_event { + remark: vec![0, 1, 2, 3], + }) + .encode() + .into(); + let origin_kind = OriginKind::Native; + + let xcm = xcm_transact_unpaid_execution(call, origin_kind); + + // Send XCM message from Relay Chain + AssetHubPolkadot::execute_with(|| { + assert_err!( + ::PolkadotXcm::send( + signed_origin, + bx!(relay_destination), + bx!(xcm) + ), + DispatchError::BadOrigin + ); + }); +} + +/// Parachain should be able to send XCM paying its fee with sufficient asset +/// in the System Parachain +#[test] +fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { + let para_sovereign_account = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + ); + + // Force create and mint assets for Parachain's sovereign account + AssetHubPolkadot::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + true, + para_sovereign_account.clone(), + ASSET_MIN_BALANCE * 1000000000, + ); + + // We just need a call that can pass the `SafeCallFilter` + // Call values are not relevant + let call = AssetHubPolkadot::force_create_asset_call( + ASSET_ID, + para_sovereign_account.clone(), + true, + ASSET_MIN_BALANCE, + ); + + let origin_kind = OriginKind::SovereignAccount; + let fee_amount = ASSET_MIN_BALANCE * 1000000; + let native_asset = + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into(); + + let root_origin = ::RuntimeOrigin::root(); + let system_para_destination = + PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()).into(); + let xcm = xcm_transact_paid_execution( + call, + origin_kind, + native_asset, + para_sovereign_account.clone(), + ); + + PenpalPolkadotA::execute_with(|| { + assert_ok!(::PolkadotXcm::send( + root_origin, + bx!(system_para_destination), + bx!(xcm), + )); + + PenpalPolkadotA::assert_xcm_pallet_sent(); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_xcmp_queue_success(None); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == ASSET_ID, + owner: *owner == para_sovereign_account, + balance: *balance == fee_amount, + }, + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, .. }) => { + asset_id: *asset_id == ASSET_ID, + }, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs new file mode 100644 index 0000000000..8ec3ab4426 --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs @@ -0,0 +1,96 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +use crate::*; + +#[test] +fn relay_sets_system_para_xcm_supported_version() { + // Init tests variables + let sudo_origin = ::RuntimeOrigin::root(); + let system_para_destination: MultiLocation = + Polkadot::child_location_of(AssetHubPolkadot::para_id()); + + // Relay Chain sets supported version for Asset Parachain + Polkadot::execute_with(|| { + assert_ok!(::XcmPallet::force_xcm_version( + sudo_origin, + bx!(system_para_destination), + XCM_V3 + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Polkadot, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::SupportedVersionChanged { + location, + version: XCM_V3 + }) => { location: *location == system_para_destination, }, + ] + ); + }); +} + +#[test] +fn system_para_sets_relay_xcm_supported_version() { + // Init test variables + let sudo_origin = ::RuntimeOrigin::root(); + let parent_location = AssetHubPolkadot::parent_location(); + let system_para_destination: VersionedMultiLocation = + Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); + let call = ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< + ::Runtime, + >::force_xcm_version { + location: bx!(parent_location), + version: XCM_V3, + }) + .encode() + .into(); + let origin_kind = OriginKind::Superuser; + + let xcm = xcm_transact_unpaid_execution(call, origin_kind); + + // System Parachain sets supported version for Relay Chain throught it + Polkadot::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(system_para_destination), + bx!(xcm), + )); + + Polkadot::assert_xcm_pallet_sent(); + }); + + // System Parachain receive the XCM message + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts( + 1_020_000_000, + 200_000, + ))); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::SupportedVersionChanged { + location, + version: XCM_V3 + }) => { location: *location == parent_location, }, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs new file mode 100644 index 0000000000..8d2aec13bd --- /dev/null +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -0,0 +1,236 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![allow(dead_code)] // + +use crate::*; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(635_000_000, 7_000))); + + assert_expected_events!( + Polkadot, + vec![ + // Amount to teleport is withdrawn from Sender + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + // Amount to teleport is deposited in Relay's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn relay_dest_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + Polkadot::assert_ump_queue_processed( + true, + Some(AssetHubPolkadot::para_id()), + Some(Weight::from_parts(370_000_000, 7_000)), + ); + + assert_expected_events!( + Polkadot, + vec![ + // Amount is witdrawn from Relay Chain's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { + Polkadot::assert_ump_queue_processed( + false, + Some(AssetHubPolkadot::para_id()), + Some(Weight::from_parts(235_000_000, 3_500)), + ); +} + +fn para_origin_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 635_000_000, + 7_000, + ))); + + AssetHubPolkadot::assert_parachain_system_ump_sent(); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Amount is withdrawn from Sender's account + RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_dest_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubPolkadot::assert_dmp_queue_complete(None); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::limited_teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +/// Limited Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn limited_teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = POLKADOT_ED * 1000; + let test_args = TestContext { + sender: PolkadotSender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: relay_test_args(amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Limited Teleport of native asset from System Parachain to Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + limited_teleport_native_assets_from_relay_to_system_para_works(); + + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Limited Teleport of native asset from System Parachain to Relay Chain +/// should't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn limited_teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let destination = AssetHubPolkadot::parent_location().into(); + let beneficiary_id = PolkadotReceiver::get().into(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert!(sender_balance_before - amount_to_send >= sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml new file mode 100644 index 0000000000..bd52994ceb --- /dev/null +++ b/integration-tests/emulated/common/Cargo.toml @@ -0,0 +1,65 @@ +[package] +name = "integration-tests-common" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Common resources for integration testing with xcm-emulator" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0" } +paste = "1.0.14" +serde_json = "1.0.108" + +# Substrate +grandpa-primitives = { package = "sp-consensus-grandpa", version = "10.0.0" } +sp-authority-discovery = { version = "23.0.0" } +sp-runtime = { version = "28.0.0" } +frame-support = { version = "25.0.0" } +sp-core = { version = "25.0.0" } +sp-consensus-babe = { version = "0.29.0" } +pallet-assets = { version = "26.0.0" } +pallet-balances = { version = "25.0.0" } +pallet-message-queue = { version = "28.0.0" } +pallet-im-online = { version = "24.0.0" } +pallet-staking = { version = "25.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "10.0.0" } + +# Polkadot +polkadot-primitives = { version = "4.0.0" } +polkadot-runtime-parachains = { version = "4.0.0" } +xcm = { package = "staging-xcm", version = "4.0.0" } +pallet-xcm = { version = "4.0.0" } +polkadot-core-primitives = { version = "4.0.0" } +polkadot-parachain-primitives = { version = "3.0.0" } + +# Cumulus +parachains-common = { version = "4.0.0" } +cumulus-primitives-core = { version = "0.4.0" } +xcm-emulator = { version = "0.2.0" } +cumulus-pallet-xcmp-queue = { version = "0.4.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.4.0" } +asset-test-utils = { version = "4.0.0" } +cumulus-pallet-dmp-queue = { version = "0.4.0" } +penpal-runtime = { version = "0.11.0" } + +# Local runtimes +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } +kusama-runtime-constants = { path = "../../../relay/kusama/constants" } +polkadot-runtime = { path = "../../../relay/polkadot" } +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants" } +asset-hub-polkadot-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-polkadot" } +asset-hub-kusama-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-kusama" } +collectives-polkadot-runtime = { path = "../../../system-parachains/collectives/collectives-polkadot" } +bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } +bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } + +# Bridges +bp-messages = { version = "0.4.0" } +pallet-bridge-messages = { version = "0.4.0" } +bridge-runtime-common = { version = "0.4.0" } + +[features] +runtime-benchmarks = [ + "penpal-runtime/runtime-benchmarks" +] diff --git a/integration-tests/emulated/common/src/constants.rs b/integration-tests/emulated/common/src/constants.rs new file mode 100644 index 0000000000..e0cfb9f658 --- /dev/null +++ b/integration-tests/emulated/common/src/constants.rs @@ -0,0 +1,802 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +// Substrate +use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; +use grandpa_primitives::AuthorityId as GrandpaId; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_core::{sr25519, storage::Storage, Pair, Public}; +use sp_runtime::{ + traits::{IdentifyAccount, Verify}, + BuildStorage, MultiSignature, Perbill, +}; + +// Cumulus +use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber}; +use polkadot_parachain_primitives::primitives::{HeadData, ValidationCode}; +use polkadot_primitives::{AssignmentId, ValidatorId}; +use polkadot_runtime_parachains::{ + configuration::HostConfiguration, + paras::{ParaGenesisArgs, ParaKind}, +}; +use xcm; + +pub const XCM_V2: u32 = 3; +pub const XCM_V3: u32 = 2; +pub const REF_TIME_THRESHOLD: u64 = 33; +pub const PROOF_SIZE_THRESHOLD: u64 = 33; + +type AccountPublic = ::Signer; + +/// Helper function to generate a crypto pair from seed +fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +/// Helper function to generate an account ID from seed. +fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +pub mod accounts { + use super::*; + pub const ALICE: &str = "Alice"; + pub const BOB: &str = "Bob"; + pub const CHARLIE: &str = "Charlie"; + pub const DAVE: &str = "Dave"; + pub const EVE: &str = "Eve"; + pub const FERDIE: &str = "Ferdei"; + pub const ALICE_STASH: &str = "Alice//stash"; + pub const BOB_STASH: &str = "Bob//stash"; + pub const CHARLIE_STASH: &str = "Charlie//stash"; + pub const DAVE_STASH: &str = "Dave//stash"; + pub const EVE_STASH: &str = "Eve//stash"; + pub const FERDIE_STASH: &str = "Ferdie//stash"; + pub const FERDIE_BEEFY: &str = "Ferdie//stash"; + + pub fn init_balances() -> Vec { + vec![ + get_account_id_from_seed::(ALICE), + get_account_id_from_seed::(BOB), + get_account_id_from_seed::(CHARLIE), + get_account_id_from_seed::(DAVE), + get_account_id_from_seed::(EVE), + get_account_id_from_seed::(FERDIE), + get_account_id_from_seed::(ALICE_STASH), + get_account_id_from_seed::(BOB_STASH), + get_account_id_from_seed::(CHARLIE_STASH), + get_account_id_from_seed::(DAVE_STASH), + get_account_id_from_seed::(EVE_STASH), + get_account_id_from_seed::(FERDIE_STASH), + ] + } +} + +pub mod collators { + use super::*; + + pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_from_seed::("Bob"), + ), + ] + } + + pub fn invulnerables() -> Vec<(AccountId, AuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), + ] + } +} + +pub mod validators { + use super::*; + + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } +} + +/// The default XCM version to set in genesis config. +const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; + +// Polkadot +pub mod polkadot { + use super::*; + pub const ED: Balance = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT; + const STASH: u128 = 100 * polkadot_runtime_constants::currency::UNITS; + + pub fn get_host_config() -> HostConfiguration { + HostConfiguration { + max_upward_queue_count: 10, + max_upward_queue_size: 51200, + max_upward_message_size: 51200, + max_upward_message_num_per_candidate: 10, + max_downward_message_size: 51200, + hrmp_sender_deposit: 100_000_000_000, + hrmp_recipient_deposit: 100_000_000_000, + hrmp_channel_max_capacity: 1000, + hrmp_channel_max_message_size: 102400, + hrmp_channel_max_total_size: 102400, + hrmp_max_parachain_outbound_channels: 30, + hrmp_max_parachain_inbound_channels: 30, + ..Default::default() + } + } + + fn session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, + ) -> polkadot_runtime::SessionKeys { + polkadot_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } + } + + pub fn genesis() -> Storage { + let genesis_config = polkadot_runtime::RuntimeGenesisConfig { + system: polkadot_runtime::SystemConfig { + code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(), + ..Default::default() + }, + balances: polkadot_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + session: polkadot_runtime::SessionConfig { + keys: validators::initial_authorities() + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + polkadot::session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + staking: polkadot_runtime::StakingConfig { + validator_count: validators::initial_authorities().len() as u32, + minimum_validator_count: 1, + stakers: validators::initial_authorities() + .iter() + .map(|x| { + (x.0.clone(), x.1.clone(), STASH, polkadot_runtime::StakerStatus::Validator) + }) + .collect(), + invulnerables: validators::initial_authorities() + .iter() + .map(|x| x.0.clone()) + .collect(), + force_era: pallet_staking::Forcing::ForceNone, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: polkadot_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() }, + paras: polkadot_runtime::ParasConfig { + paras: vec![ + ( + asset_hub_polkadot::PARA_ID.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + asset_hub_polkadot_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ( + bridge_hub_polkadot::PARA_ID.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + bridge_hub_polkadot_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ( + penpal::PARA_ID_A.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + penpal_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ( + penpal::PARA_ID_B.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + penpal_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ], + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Kusama +pub mod kusama { + use super::*; + pub const ED: Balance = kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT; + use kusama_runtime_constants::currency::UNITS as KSM; + const ENDOWMENT: u128 = 1_000_000 * KSM; + const STASH: u128 = 100 * KSM; + + pub fn get_host_config() -> HostConfiguration { + HostConfiguration { + max_upward_queue_count: 10, + max_upward_queue_size: 51200, + max_upward_message_size: 51200, + max_upward_message_num_per_candidate: 10, + max_downward_message_size: 51200, + hrmp_sender_deposit: 5_000_000_000_000, + hrmp_recipient_deposit: 5_000_000_000_000, + hrmp_channel_max_capacity: 1000, + hrmp_channel_max_message_size: 102400, + hrmp_channel_max_total_size: 102400, + hrmp_max_parachain_outbound_channels: 30, + hrmp_max_parachain_inbound_channels: 30, + ..Default::default() + } + } + + fn session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, + ) -> kusama_runtime::SessionKeys { + kusama_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } + } + + pub fn genesis() -> Storage { + let genesis_config = kusama_runtime::RuntimeGenesisConfig { + system: kusama_runtime::SystemConfig { + code: kusama_runtime::WASM_BINARY.unwrap().to_vec(), + ..Default::default() + }, + balances: kusama_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .map(|k: &AccountId| (k.clone(), ENDOWMENT)) + .collect(), + }, + session: kusama_runtime::SessionConfig { + keys: validators::initial_authorities() + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + kusama::session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + staking: kusama_runtime::StakingConfig { + validator_count: validators::initial_authorities().len() as u32, + minimum_validator_count: 1, + stakers: validators::initial_authorities() + .iter() + .map(|x| { + (x.0.clone(), x.1.clone(), STASH, kusama_runtime::StakerStatus::Validator) + }) + .collect(), + invulnerables: validators::initial_authorities() + .iter() + .map(|x| x.0.clone()) + .collect(), + force_era: pallet_staking::Forcing::NotForcing, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: kusama_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() }, + paras: kusama_runtime::ParasConfig { + paras: vec![ + ( + asset_hub_kusama::PARA_ID.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + asset_hub_kusama_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ( + bridge_hub_kusama::PARA_ID.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + bridge_hub_kusama_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ( + penpal::PARA_ID_A.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + penpal_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ( + penpal::PARA_ID_B.into(), + ParaGenesisArgs { + genesis_head: HeadData::default(), + validation_code: ValidationCode( + penpal_runtime::WASM_BINARY.unwrap().to_vec(), + ), + para_kind: ParaKind::Parachain, + }, + ), + ], + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Asset Hub Polkadot +pub mod asset_hub_polkadot { + use super::*; + pub const PARA_ID: u32 = 1000; + pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + + pub fn genesis() -> Storage { + let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { + system: asset_hub_polkadot_runtime::SystemConfig { + code: asset_hub_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + ..Default::default() + }, + balances: asset_hub_polkadot_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables_asset_hub_polkadot() + .iter() + .cloned() + .map(|(acc, _)| acc) + .collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: asset_hub_polkadot_runtime::SessionConfig { + keys: collators::invulnerables_asset_hub_polkadot() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Asset Hub Kusama +pub mod asset_hub_kusama { + use super::*; + pub const PARA_ID: u32 = 1000; + pub const ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + + pub fn genesis() -> Storage { + let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { + system: asset_hub_kusama_runtime::SystemConfig { + code: asset_hub_kusama_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + ..Default::default() + }, + balances: asset_hub_kusama_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables() + .iter() + .cloned() + .map(|(acc, _)| acc) + .collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: asset_hub_kusama_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_kusama_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Bridge Hub Polkadot +pub mod bridge_hub_polkadot { + use super::*; + pub const PARA_ID: u32 = 1002; + pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + + pub fn genesis() -> Storage { + let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + system: bridge_hub_polkadot_runtime::SystemConfig { + code: bridge_hub_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + ..Default::default() + }, + balances: bridge_hub_polkadot_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables() + .iter() + .cloned() + .map(|(acc, _)| acc) + .collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: bridge_hub_polkadot_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Bridge Hub Kusama +pub mod bridge_hub_kusama { + use super::*; + pub const PARA_ID: u32 = 1002; + pub const ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + + pub fn genesis() -> Storage { + let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig { + system: bridge_hub_kusama_runtime::SystemConfig { + code: bridge_hub_kusama_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + ..Default::default() + }, + balances: bridge_hub_kusama_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables() + .iter() + .cloned() + .map(|(acc, _)| acc) + .collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: bridge_hub_kusama_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_kusama_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Collectives +pub mod collectives { + use super::*; + pub const PARA_ID: u32 = 1001; + pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + + pub fn genesis() -> Storage { + let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig { + system: collectives_polkadot_runtime::SystemConfig { + code: collectives_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + ..Default::default() + }, + balances: collectives_polkadot_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables() + .iter() + .cloned() + .map(|(acc, _)| acc) + .collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: collectives_polkadot_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + collectives_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} + +// Penpal +pub mod penpal { + use super::*; + pub const PARA_ID_A: u32 = 2000; + pub const PARA_ID_B: u32 = 2001; + pub const ED: Balance = penpal_runtime::EXISTENTIAL_DEPOSIT; + + pub fn genesis(para_id: u32) -> Storage { + let genesis_config = penpal_runtime::RuntimeGenesisConfig { + system: penpal_runtime::SystemConfig { + code: penpal_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + ..Default::default() + }, + balances: penpal_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096)) + .collect(), + }, + parachain_info: penpal_runtime::ParachainInfoConfig { + parachain_id: para_id.into(), + ..Default::default() + }, + collator_selection: penpal_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables() + .iter() + .cloned() + .map(|(acc, _)| acc) + .collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: penpal_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + penpal_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: penpal_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + sudo: penpal_runtime::SudoConfig { + key: Some(get_account_id_from_seed::("Alice")), + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() + } +} diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs new file mode 100644 index 0000000000..5969b8ac84 --- /dev/null +++ b/integration-tests/emulated/common/src/impls.rs @@ -0,0 +1,645 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +pub use codec::{Decode, Encode}; +pub use paste; + +pub use crate::{ + constants::{PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD}, + xcm_helpers::xcm_transact_unpaid_execution, +}; + +// Substrate +pub use frame_support::{assert_ok, traits::fungibles::Inspect}; +pub use pallet_assets; +pub use pallet_message_queue; +use sp_core::Get; + +// Cumulus +use bp_messages::{ + target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, + LaneId, MessageKey, OutboundLaneData, +}; +use bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatchResult; +pub use cumulus_pallet_dmp_queue; +pub use cumulus_pallet_parachain_system; +pub use cumulus_pallet_xcmp_queue; +pub use cumulus_primitives_core::{ + relay_chain::HrmpChannelId, DmpMessageHandler, ParaId, XcmpMessageHandler, +}; +use pallet_bridge_messages::{Config, Instance1, OutboundLanes, Pallet}; +pub use parachains_common::{AccountId, Balance}; +pub use xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, BridgeMessage, + BridgeMessageDispatchError, BridgeMessageHandler, Chain, Parachain, RelayChain, TestExt, +}; + +// Polkadot +pub use pallet_xcm; +pub use polkadot_runtime_parachains::{ + dmp, hrmp, + inclusion::{AggregateMessageOrigin, UmpQueueId}, +}; +pub use xcm::{ + prelude::{OriginKind, Outcome, VersionedXcm, Weight}, + v3::Error, + DoubleEncoded, +}; + +pub struct BridgeHubMessageHandler { + _marker: std::marker::PhantomData<(S, T, I)>, +} + +struct LaneIdWrapper(LaneId); + +impl From for u32 { + fn from(lane_id: LaneIdWrapper) -> u32 { + u32::from_be_bytes(lane_id.0 .0) + } +} + +impl From for LaneIdWrapper { + fn from(id: u32) -> LaneIdWrapper { + LaneIdWrapper(LaneId(id.to_be_bytes())) + } +} + +// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged +// type BridgeHubPolkadotRuntime = ::Runtime; +// type BridgeHubKusamaRuntime = ::Runtime; + +// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged +// pub type PolkadotKusamaMessageHandler +// = BridgeHubMessageHandler; +// pub type KusamaPolkadotMessageHandler +// = BridgeHubMessageHandler; + +impl BridgeMessageHandler for BridgeHubMessageHandler +where + S: Config, + T: Config, + I: 'static, + >::InboundPayload: From>, + >::MessageDispatch: + MessageDispatch, +{ + fn get_source_outbound_messages() -> Vec { + // get the source active outbound lanes + let active_lanes = S::ActiveOutboundLanes::get(); + + let mut messages: Vec = Default::default(); + + // collect messages from `OutboundMessages` for each active outbound lane in the source + for lane in active_lanes { + let latest_generated_nonce = + OutboundLanes::::get(lane).latest_generated_nonce; + let latest_received_nonce = + OutboundLanes::::get(lane).latest_received_nonce; + + (latest_received_nonce + 1..=latest_generated_nonce).for_each(|nonce| { + let encoded_payload: Vec = + Pallet::::outbound_message_data(*lane, nonce) + .expect("Bridge message does not exist") + .into(); + let payload = Vec::::decode(&mut &encoded_payload[..]) + .expect("Decodign XCM message failed"); + let id: u32 = LaneIdWrapper(*lane).into(); + let message = BridgeMessage { id, nonce, payload }; + + messages.push(message); + }); + } + messages + } + + fn dispatch_target_inbound_message( + message: BridgeMessage, + ) -> Result<(), BridgeMessageDispatchError> { + type TargetMessageDispatch = >::MessageDispatch; + type InboundPayload = >::InboundPayload; + + let lane_id = LaneIdWrapper::from(message.id).0; + let nonce = message.nonce; + let payload = Ok(From::from(message.payload)); + + // Directly dispatch outbound messages assuming everything is correct + // and bypassing the `Relayers` and `InboundLane` logic + let dispatch_result = TargetMessageDispatch::::dispatch(DispatchMessage { + key: MessageKey { lane_id, nonce }, + data: DispatchMessageData::> { payload }, + }); + + let result = match dispatch_result.dispatch_level_result { + XcmBlobMessageDispatchResult::Dispatched => Ok(()), + XcmBlobMessageDispatchResult::InvalidPayload => Err(BridgeMessageDispatchError( + Box::new(XcmBlobMessageDispatchResult::InvalidPayload), + )), + XcmBlobMessageDispatchResult::NotDispatched(e) => Err(BridgeMessageDispatchError( + Box::new(XcmBlobMessageDispatchResult::NotDispatched(e)), + )), + }; + result + } + + fn notify_source_message_delivery(lane_id: u32) { + let data = OutboundLanes::::get(LaneIdWrapper::from(lane_id).0); + let new_data = OutboundLaneData { + oldest_unpruned_nonce: data.oldest_unpruned_nonce + 1, + latest_received_nonce: data.latest_received_nonce + 1, + ..data + }; + + OutboundLanes::::insert(LaneIdWrapper::from(lane_id).0, new_data); + } +} + +#[macro_export] +macro_rules! impl_accounts_helpers_for_relay_chain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// Fund a set of accounts with a balance + pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { + ::execute_with(|| { + for account in accounts { + $crate::impls::assert_ok!(]>::Balances::force_set_balance( + ::RuntimeOrigin::root(), + account.0.into(), + account.1, + )); + } + }); + } + /// Fund a sovereign account based on its Parachain Id + pub fn fund_para_sovereign(amount: $crate::impls::Balance, para_id: $crate::impls::ParaId) -> sp_runtime::AccountId32 { + let sovereign_account = ::sovereign_account_id_of_child_para(para_id); + Self::fund_accounts(vec![(sovereign_account.clone(), amount)]); + sovereign_account + } + } + } + }; +} + +#[macro_export] +macro_rules! impl_assert_events_helpers_for_relay_chain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; + + impl $chain { + /// Asserts a dispatchable is completely executed and XCM sent + pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::XcmPallet( + $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } + ) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + }, + ] + ); + } + + /// Asserts a dispatchable is incompletely executed and XCM sent + pub fn assert_xcm_pallet_attempted_incomplete( + expected_weight: Option<$crate::impls::Weight>, + expected_error: Option<$crate::impls::Error>, + ) { + $crate::impls::assert_expected_events!( + Self, + vec![ + // Dispatchable is properly executed and XCM message sent + [<$chain RuntimeEvent>]::XcmPallet( + $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } + ) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + error: *error == expected_error.unwrap_or(*error), + }, + ] + ); + } + + /// Asserts a XCM message is sent + pub fn assert_xcm_pallet_sent() { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::XcmPallet($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + } + + /// Asserts a XCM from System Parachain is succesfully received and proccessed + pub fn assert_ump_queue_processed( + expected_success: bool, + expected_id: Option<$crate::impls::ParaId>, + expected_weight: Option<$crate::impls::Weight>, + ) { + $crate::impls::assert_expected_events!( + Self, + vec![ + // XCM is succesfully received and proccessed + [<$chain RuntimeEvent>]::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + origin: $crate::impls::AggregateMessageOrigin::Ump($crate::impls::UmpQueueId::Para(id)), + weight_used, + success, + .. + }) => { + id: *id == expected_id.unwrap_or(*id), + weight_used: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight_used), + *weight_used + ), + success: *success == expected_success, + }, + ] + ); + } + } + } + }; +} + +#[macro_export] +macro_rules! impl_hrmp_channels_helpers_for_relay_chain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// Init open channel request with another Parachain + pub fn init_open_channel_call( + recipient_para_id: $crate::impls::ParaId, + max_capacity: u32, + max_message_size: u32, + ) -> $crate::impls::DoubleEncoded<()> { + use $crate::impls::Encode; + + ::RuntimeCall::Hrmp($crate::impls::hrmp::Call::< + ::Runtime, + >::hrmp_init_open_channel { + recipient: recipient_para_id, + proposed_max_capacity: max_capacity, + proposed_max_message_size: max_message_size, + }) + .encode() + .into() + } + /// Recipient Parachain accept the open request from another Parachain + pub fn accept_open_channel_call(sender_para_id: $crate::impls::ParaId) -> $crate::impls::DoubleEncoded<()> { + use $crate::impls::Encode; + + ::RuntimeCall::Hrmp($crate::impls::hrmp::Call::< + ::Runtime, + >::hrmp_accept_open_channel { + sender: sender_para_id, + }) + .encode() + .into() + } + + /// A root origin force to open a channel between two Parachains + pub fn force_process_hrmp_open(sender: $crate::impls::ParaId, recipient: $crate::impls::ParaId) { + use $crate::impls::Chain; + + ::execute_with(|| { + let relay_root_origin = ::RuntimeOrigin::root(); + + // Force process HRMP open channel requests without waiting for the next session + $crate::impls::assert_ok!(]>::Hrmp::force_process_hrmp_open( + relay_root_origin, + u32::MAX, + )); + + let channel_id = $crate::impls::HrmpChannelId { sender, recipient }; + + let hrmp_channel_exist = $crate::impls::hrmp::HrmpChannels::< + ::Runtime, + >::contains_key(&channel_id); + + // Check the HRMP channel has been successfully registered + assert!(hrmp_channel_exist) + }); + } + } + } + }; +} + +#[macro_export] +macro_rules! impl_accounts_helpers_for_parachain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// Fund a set of accounts with a balance + pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { + ::execute_with(|| { + for account in accounts { + $crate::impls::assert_ok!(]>::Balances::force_set_balance( + ::RuntimeOrigin::root(), + account.0.into(), + account.1, + )); + } + }); + } + } + } + }; +} + +#[macro_export] +macro_rules! impl_assert_events_helpers_for_parachain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; + + impl $chain { + /// Asserts a dispatchable is completely executed and XCM sent + pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::PolkadotXcm( + $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } + ) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + }, + ] + ); + } + + /// Asserts a dispatchable is incompletely executed and XCM sent + pub fn assert_xcm_pallet_attempted_incomplete( + expected_weight: Option<$crate::impls::Weight>, + expected_error: Option<$crate::impls::Error>, + ) { + $crate::impls::assert_expected_events!( + Self, + vec![ + // Dispatchable is properly executed and XCM message sent + [<$chain RuntimeEvent>]::PolkadotXcm( + $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } + ) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + error: *error == expected_error.unwrap_or(*error), + }, + ] + ); + } + + /// Asserts a dispatchable throws and error when trying to be sent + pub fn assert_xcm_pallet_attempted_error(expected_error: Option<$crate::impls::Error>) { + $crate::impls::assert_expected_events!( + Self, + vec![ + // Execution fails in the origin with `Barrier` + [<$chain RuntimeEvent>]::PolkadotXcm( + $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Error(error) } + ) => { + error: *error == expected_error.unwrap_or(*error), + }, + ] + ); + } + + /// Asserts a XCM message is sent + pub fn assert_xcm_pallet_sent() { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::PolkadotXcm($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + } + + /// Asserts a XCM message is sent to Relay Chain + pub fn assert_parachain_system_ump_sent() { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::ParachainSystem( + $crate::impls::cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } + ) => {}, + ] + ); + } + + /// Asserts a XCM from Relay Chain is completely executed + pub fn assert_dmp_queue_complete(expected_weight: Option<$crate::impls::Weight>) { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { + outcome: $crate::impls::Outcome::Complete(weight), .. + }) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + }, + ] + ); + } + + /// Asserts a XCM from Relay Chain is incompletely executed + pub fn assert_dmp_queue_incomplete( + expected_weight: Option<$crate::impls::Weight>, + expected_error: Option<$crate::impls::Error>, + ) { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { + outcome: $crate::impls::Outcome::Incomplete(weight, error), .. + }) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + error: *error == expected_error.unwrap_or(*error), + }, + ] + ); + } + + /// Asserts a XCM from another Parachain is completely executed + pub fn assert_xcmp_queue_success(expected_weight: Option<$crate::impls::Weight>) { + $crate::impls::assert_expected_events!( + Self, + vec![ + [<$chain RuntimeEvent>]::XcmpQueue( + $crate::impls::cumulus_pallet_xcmp_queue::Event::Success { weight, .. } + ) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), + }, + ] + ); + } + } + } + }; +} + +#[macro_export] +macro_rules! impl_assets_helpers_for_parachain { + ( $chain:ident, $relay_chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// Returns the encoded call for `force_create` from the assets pallet + pub fn force_create_asset_call( + asset_id: u32, + owner: $crate::impls::AccountId, + is_sufficient: bool, + min_balance: $crate::impls::Balance, + ) -> $crate::impls::DoubleEncoded<()> { + use $crate::impls::{Chain, Encode}; + + ::RuntimeCall::Assets($crate::impls::pallet_assets::Call::< + ::Runtime, + $crate::impls::pallet_assets::Instance1, + >::force_create { + id: asset_id.into(), + owner: owner.into(), + is_sufficient, + min_balance, + }) + .encode() + .into() + } + + /// Returns a `VersionedXcm` for `force_create` from the assets pallet + pub fn force_create_asset_xcm( + origin_kind: $crate::impls::OriginKind, + asset_id: u32, + owner: $crate::impls::AccountId, + is_sufficient: bool, + min_balance: $crate::impls::Balance, + ) -> $crate::impls::VersionedXcm<()> { + let call = Self::force_create_asset_call(asset_id, owner, is_sufficient, min_balance); + $crate::impls::xcm_transact_unpaid_execution(call, origin_kind) + } + + /// Mint assets making use of the assets pallet + pub fn mint_asset( + signed_origin: ::RuntimeOrigin, + id: u32, + beneficiary: $crate::impls::AccountId, + amount_to_mint: u128, + ) { + ::execute_with(|| { + $crate::impls::assert_ok!(]>::Assets::mint( + signed_origin, + id.into(), + beneficiary.clone().into(), + amount_to_mint + )); + + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + + $crate::impls::assert_expected_events!( + Self, + vec![ + RuntimeEvent::Assets($crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == id, + owner: *owner == beneficiary.clone().into(), + amount: *amount == amount_to_mint, + }, + ] + ); + }); + } + + /// Force create and mint assets making use of the assets pallet + pub fn force_create_and_mint_asset( + id: u32, + min_balance: u128, + is_sufficient: bool, + asset_owner: $crate::impls::AccountId, + amount_to_mint: u128, + ) { + use $crate::impls::{bx, Chain, RelayChain, Parachain, Inspect, TestExt}; + // Init values for Relay Chain + let root_origin = <$relay_chain as Chain>::RuntimeOrigin::root(); + let destination = <$relay_chain>::child_location_of(<$chain>::para_id()); + let xcm = Self::force_create_asset_xcm( + $crate::impls::OriginKind::Superuser, + id, + asset_owner.clone(), + is_sufficient, + min_balance, + ); + + <$relay_chain>::execute_with(|| { + $crate::impls::assert_ok!(<$relay_chain as [<$relay_chain Pallet>]>::XcmPallet::send( + root_origin, + bx!(destination.into()), + bx!(xcm), + )); + + <$relay_chain>::assert_xcm_pallet_sent(); + }); + + Self::execute_with(|| { + Self::assert_dmp_queue_complete(Some($crate::impls::Weight::from_parts(1_020_000_000, 200_000))); + + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + + $crate::impls::assert_expected_events!( + Self, + vec![ + // Asset has been created + RuntimeEvent::Assets($crate::impls::pallet_assets::Event::ForceCreated { asset_id, owner }) => { + asset_id: *asset_id == id, + owner: *owner == asset_owner.clone(), + }, + ] + ); + + assert!(]>::Assets::asset_exists(id.into())); + }); + + let signed_origin = ::RuntimeOrigin::signed(asset_owner.clone()); + + // Mint asset for System Parachain's sender + Self::mint_asset(signed_origin, id, asset_owner, amount_to_mint); + } + } + } + }; +} diff --git a/integration-tests/emulated/common/src/lib.rs b/integration-tests/emulated/common/src/lib.rs new file mode 100644 index 0000000000..d2eb63090f --- /dev/null +++ b/integration-tests/emulated/common/src/lib.rs @@ -0,0 +1,328 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#![cfg(not(feature = "runtime-benchmarks"))] + +pub mod constants; +pub mod impls; +pub mod xcm_helpers; + +use constants::{ + accounts::{ALICE, BOB}, + asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives, + kusama, penpal, polkadot, +}; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use xcm_emulator::{ + // decl_test_bridges, + decl_test_networks, + decl_test_parachains, + decl_test_relay_chains, + decl_test_sender_receiver_accounts_parameter_types, + DefaultMessageProcessor, +}; + +use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7; + +decl_test_relay_chains! { + #[api_version(5)] + pub struct Polkadot { + genesis = polkadot::genesis(), + on_init = (), + runtime = polkadot_runtime, + core = { + MessageProcessor: DefaultMessageProcessor, + SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: polkadot_runtime::XcmPallet, + Balances: polkadot_runtime::Balances, + Hrmp: polkadot_runtime::Hrmp, + } + }, + #[api_version(5)] + pub struct Kusama { + genesis = kusama::genesis(), + on_init = (), + runtime = kusama_runtime, + core = { + MessageProcessor: DefaultMessageProcessor, + SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: kusama_runtime::XcmPallet, + Balances: kusama_runtime::Balances, + Hrmp: kusama_runtime::Hrmp, + } + }, +} + +decl_test_parachains! { + // Polkadot Parachains + pub struct AssetHubPolkadot { + genesis = asset_hub_polkadot::genesis(), + on_init = { + asset_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_polkadot_runtime, + core = { + XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, + DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue, + LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, + Assets: asset_hub_polkadot_runtime::Assets, + Balances: asset_hub_polkadot_runtime::Balances, + } + }, + pub struct Collectives { + genesis = collectives::genesis(), + on_init = { + collectives_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = collectives_polkadot_runtime, + core = { + XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, + DmpMessageHandler: collectives_polkadot_runtime::DmpQueue, + LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: collectives_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, + Balances: collectives_polkadot_runtime::Balances, + } + }, + pub struct BridgeHubPolkadot { + genesis = bridge_hub_polkadot::genesis(), + on_init = { + bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_polkadot_runtime, + core = { + XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, + DmpMessageHandler: bridge_hub_polkadot_runtime::DmpQueue, + LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, + } + }, + pub struct PenpalPolkadotA { + genesis = penpal::genesis(penpal::PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + DmpMessageHandler: penpal_runtime::DmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + } + }, + pub struct PenpalPolkadotB { + genesis = penpal::genesis(penpal::PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + DmpMessageHandler: penpal_runtime::DmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + } + }, + // Kusama Parachains + pub struct AssetHubKusama { + genesis = asset_hub_kusama::genesis(), + on_init = { + asset_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_kusama_runtime, + core = { + XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, + DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue, + LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, + Assets: asset_hub_kusama_runtime::Assets, + ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, + PoolAssets: asset_hub_kusama_runtime::PoolAssets, + AssetConversion: asset_hub_kusama_runtime::AssetConversion, + Balances: asset_hub_kusama_runtime::Balances, + } + }, + pub struct BridgeHubKusama { + genesis = bridge_hub_kusama::genesis(), + on_init = { + bridge_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_kusama_runtime, + core = { + XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, + DmpMessageHandler: bridge_hub_kusama_runtime::DmpQueue, + LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, + } + }, + pub struct PenpalKusamaA { + genesis = penpal::genesis(penpal::PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + DmpMessageHandler: penpal_runtime::DmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + } + }, + pub struct PenpalKusamaB { + genesis = penpal::genesis(penpal::PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + DmpMessageHandler: penpal_runtime::DmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + } + }, +} + +decl_test_networks! { + pub struct PolkadotMockNet { + relay_chain = Polkadot, + parachains = vec![ + AssetHubPolkadot, + Collectives, + BridgeHubPolkadot, + PenpalPolkadotA, + PenpalPolkadotB, + ], + // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged + // bridge = PolkadotKusamaMockBridge + bridge = () + }, + pub struct KusamaMockNet { + relay_chain = Kusama, + parachains = vec![ + AssetHubKusama, + BridgeHubKusama, + PenpalKusamaA, + PenpalKusamaB, + ], + // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged + // bridge = KusamaPolkadotMockBridge + bridge = () + }, +} + +// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged +// decl_test_bridges! { +// pub struct PolkadotKusamaMockBridge { +// source = BridgeHubPolkadot, +// target = BridgeHubKusama, +// handler = PolkadotKusamaMessageHandler +// }, +// pub struct KusamaPolkadotMockBridge { +// source = BridgeHubKusama, +// target = BridgeHubPolkadot, +// handler = KusamaPolkadotMessageHandler +// } +// } + +// Polkadot implementation +impl_accounts_helpers_for_relay_chain!(Polkadot); +impl_assert_events_helpers_for_relay_chain!(Polkadot); +impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); + +// Kusama implementation +impl_accounts_helpers_for_relay_chain!(Kusama); +impl_assert_events_helpers_for_relay_chain!(Kusama); +impl_hrmp_channels_helpers_for_relay_chain!(Kusama); + +// AssetHubPolkadot implementation +impl_accounts_helpers_for_parachain!(AssetHubPolkadot); +impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); +impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); + +// AssetHubKusama implementation +impl_accounts_helpers_for_parachain!(AssetHubKusama); +impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); +impl_assert_events_helpers_for_parachain!(AssetHubKusama); + +// PenpalPolkadot implementations +impl_assert_events_helpers_for_parachain!(PenpalPolkadotA); +impl_assert_events_helpers_for_parachain!(PenpalPolkadotB); + +// PenpalKusama implementations +impl_assert_events_helpers_for_parachain!(PenpalKusamaA); +impl_assert_events_helpers_for_parachain!(PenpalKusamaB); + +// Collectives implementation +impl_accounts_helpers_for_parachain!(Collectives); +impl_assert_events_helpers_for_parachain!(Collectives); + +decl_test_sender_receiver_accounts_parameter_types! { + // Relays + Polkadot { sender: ALICE, receiver: BOB }, + Kusama { sender: ALICE, receiver: BOB }, + // Asset Hubs + AssetHubPolkadot { sender: ALICE, receiver: BOB }, + AssetHubKusama { sender: ALICE, receiver: BOB }, + // Collectives + Collectives { sender: ALICE, receiver: BOB }, + // Bridged Hubs + BridgeHubPolkadot { sender: ALICE, receiver: BOB }, + BridgeHubKusama { sender: ALICE, receiver: BOB }, + // Penpals + PenpalPolkadotA { sender: ALICE, receiver: BOB }, + PenpalPolkadotB { sender: ALICE, receiver: BOB }, + PenpalKusamaA { sender: ALICE, receiver: BOB }, + PenpalKusamaB { sender: ALICE, receiver: BOB } +} diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs new file mode 100644 index 0000000000..a65b2057af --- /dev/null +++ b/integration-tests/emulated/common/src/macros.rs @@ -0,0 +1,107 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +#[macro_export] +macro_rules! test_parachain_is_trusted_teleporter { + ( $sender_para:ty, $sender_xcm_config:ty, vec![$( $receiver_para:ty ),+], ($assets:expr, $amount:expr) ) => { + $crate::paste::paste! { + // init Origin variables + let sender = [<$sender_para Sender>]::get(); + let mut para_sender_balance_before = + <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + let origin = <$sender_para as $crate::Chain>::RuntimeOrigin::signed(sender.clone()); + let fee_asset_item = 0; + let weight_limit = $crate::WeightLimit::Unlimited; + + $( + { + // init Destination variables + let receiver = [<$receiver_para Receiver>]::get(); + let para_receiver_balance_before = + <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + let para_destination = + <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); + let beneficiary: MultiLocation = + $crate::AccountId32 { network: None, id: receiver.clone().into() }.into(); + + // Send XCM message from Origin Parachain + // We are only testing the limited teleport version, which should be ok since success will + // depend only on a proper `XcmConfig` at destination. + <$sender_para>::execute_with(|| { + assert_ok!(<$sender_para as [<$sender_para Pallet>]>::PolkadotXcm::limited_teleport_assets( + origin.clone(), + bx!(para_destination.into()), + bx!(beneficiary.into()), + bx!($assets.clone().into()), + fee_asset_item, + weight_limit.clone(), + )); + + type RuntimeEvent = <$sender_para as $crate::Chain>::RuntimeEvent; + + assert_expected_events!( + $sender_para, + vec![ + RuntimeEvent::PolkadotXcm( + $crate::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } + ) => {}, + RuntimeEvent::XcmpQueue( + $crate::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + ) => {}, + RuntimeEvent::Balances( + $crate::pallet_balances::Event::Withdraw { who: sender, amount } + ) => {}, + ] + ); + }); + + // Receive XCM message in Destination Parachain + <$receiver_para>::execute_with(|| { + type RuntimeEvent = <$receiver_para as $crate::Chain>::RuntimeEvent; + + assert_expected_events!( + $receiver_para, + vec![ + RuntimeEvent::Balances( + $crate::pallet_balances::Event::Deposit { who: receiver, .. } + ) => {}, + RuntimeEvent::XcmpQueue( + $crate::cumulus_pallet_xcmp_queue::Event::Success { .. } + ) => {}, + ] + ); + }); + + // Check if balances are updated accordingly in Origin and Destination Parachains + let para_sender_balance_after = + <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + let para_receiver_balance_after = + <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + let delivery_fees = <$sender_para>::execute_with(|| { + asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< + <$sender_xcm_config as xcm_executor::Config>::XcmSender, + >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) + }); + + assert_eq!(para_sender_balance_before - $amount - delivery_fees, para_sender_balance_after); + assert!(para_receiver_balance_after > para_receiver_balance_before); + + // Update sender balance + para_sender_balance_before = <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + } + )+ + } + }; +} diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs new file mode 100644 index 0000000000..4096cdbba0 --- /dev/null +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -0,0 +1,66 @@ +// Copyright Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus 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. + +// Cumulus 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 Cumulus. If not, see . + +use parachains_common::AccountId; +use xcm::{ + prelude::{ + AccountId32, All, BuyExecution, DepositAsset, MultiAsset, MultiAssets, MultiLocation, + OriginKind, RefundSurplus, Transact, UnpaidExecution, VersionedXcm, Weight, WeightLimit, + WithdrawAsset, Xcm, X1, + }, + DoubleEncoded, +}; + +/// Helper method to build a XCM with a `Transact` instruction and paying for its execution +pub fn xcm_transact_paid_execution( + call: DoubleEncoded<()>, + origin_kind: OriginKind, + native_asset: MultiAsset, + beneficiary: AccountId, +) -> VersionedXcm<()> { + let weight_limit = WeightLimit::Unlimited; + let require_weight_at_most = Weight::from_parts(1000000000, 200000); + let native_assets: MultiAssets = native_asset.clone().into(); + + VersionedXcm::from(Xcm(vec![ + WithdrawAsset(native_assets), + BuyExecution { fees: native_asset, weight_limit }, + Transact { require_weight_at_most, origin_kind, call }, + RefundSurplus, + DepositAsset { + assets: All.into(), + beneficiary: MultiLocation { + parents: 0, + interior: X1(AccountId32 { network: None, id: beneficiary.into() }), + }, + }, + ])) +} + +/// Helper method to build a XCM with a `Transact` instruction without paying for its execution +pub fn xcm_transact_unpaid_execution( + call: DoubleEncoded<()>, + origin_kind: OriginKind, +) -> VersionedXcm<()> { + let weight_limit = WeightLimit::Unlimited; + let require_weight_at_most = Weight::from_parts(1000000000, 200000); + let check_origin = None; + + VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit, check_origin }, + Transact { require_weight_at_most, origin_kind, call }, + ])) +} From 923f6c1ee7a5d15954c48d04c5b5fa651c034ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=B3nal=20Murray?= Date: Thu, 4 Jan 2024 16:12:25 +0000 Subject: [PATCH 13/27] Add kusama and polkadot SP constants (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR brings the Kusama and Polkadot constants for System Parachains into the control of the Fellowship. Following up on https://github.com/paritytech/polkadot-sdk/pull/2620 and paired with https://github.com/paritytech/polkadot-sdk/pull/2666. Types are still used from the `parachains-common` crate, but constants are moved into a new crate `system-parachains-constants` in this repo. The re-exports `pub use parachains_common as common` in both asset hubs and collectives have been removed. This is a breaking change for anybody using them in this way, but these should be directly imported from `parachains-common`. This should be noted on the changelog. --------- Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Bastian Köcher --- Cargo.lock | 20 +++ Cargo.toml | 1 + .../asset-hubs/asset-hub-kusama/Cargo.toml | 2 + .../asset-hubs/asset-hub-kusama/src/lib.rs | 15 +- .../asset-hub-kusama/src/xcm_config.rs | 2 +- .../asset-hub-kusama/tests/tests.rs | 5 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 2 + .../asset-hubs/asset-hub-polkadot/src/lib.rs | 13 +- .../asset-hub-polkadot/src/xcm_config.rs | 2 +- .../asset-hub-polkadot/tests/tests.rs | 4 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 + .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 7 +- .../bridge-hub-kusama/src/xcm_config.rs | 2 +- .../bridge-hub-kusama/tests/tests.rs | 3 +- .../bridge-hub-polkadot/Cargo.toml | 2 + .../bridge-hub-polkadot/src/lib.rs | 7 +- .../bridge-hub-polkadot/src/xcm_config.rs | 2 +- .../bridge-hub-polkadot/tests/tests.rs | 3 +- .../collectives-polkadot/Cargo.toml | 8 +- .../src/fellowship/mod.rs | 2 +- .../collectives-polkadot/src/lib.rs | 8 +- .../collectives-polkadot/src/xcm_config.rs | 2 +- system-parachains/constants/Cargo.toml | 31 ++++ system-parachains/constants/src/kusama.rs | 123 +++++++++++++++ system-parachains/constants/src/lib.rs | 57 +++++++ system-parachains/constants/src/polkadot.rs | 144 ++++++++++++++++++ .../gluttons/glutton-kusama/Cargo.toml | 2 + 27 files changed, 433 insertions(+), 38 deletions(-) create mode 100644 system-parachains/constants/Cargo.toml create mode 100644 system-parachains/constants/src/kusama.rs create mode 100644 system-parachains/constants/src/lib.rs create mode 100644 system-parachains/constants/src/polkadot.rs diff --git a/Cargo.lock b/Cargo.lock index e59cb4ac97..046fe1d689 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -619,6 +619,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -710,6 +711,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -1369,6 +1371,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -1433,6 +1436,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -1936,6 +1940,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -4007,6 +4012,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -11988,6 +11994,20 @@ dependencies = [ "libc", ] +[[package]] +name = "system-parachains-constants" +version = "1.0.0" +dependencies = [ + "frame-support", + "kusama-runtime-constants", + "parachains-common", + "polkadot-core-primitives", + "polkadot-primitives", + "polkadot-runtime-constants", + "smallvec", + "sp-runtime", +] + [[package]] name = "tap" version = "1.0.1" diff --git a/Cargo.toml b/Cargo.toml index 1062ab77cf..8baf12752c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ members = [ "system-parachains/bridge-hubs/bridge-hub-kusama", "system-parachains/bridge-hubs/bridge-hub-polkadot", "system-parachains/collectives/collectives-polkadot", + "system-parachains/constants", "system-parachains/gluttons/glutton-kusama", "integration-tests/emulated/assets/asset-hub-kusama", "integration-tests/emulated/assets/asset-hub-polkadot", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index c7abca8d60..b5e514e71f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -81,6 +81,7 @@ cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } parachains-common = { default-features = false , version = "4.0.0" } +system-parachains-constants = { path = "../../constants", default-features = false } assets-common = { default-features = false , version = "0.4.0" } [dev-dependencies] @@ -223,6 +224,7 @@ std = [ "sp-version/std", "sp-weights/std", "substrate-wasm-builder", + "system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 1d03f75a01..45baa5a16e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -67,15 +67,16 @@ use frame_system::{ }; use pallet_asset_conversion_tx_payment::AssetConversionAdapter; use pallet_nfts::PalletFeatures; -pub use parachains_common as common; use parachains_common::{ - impls::DealWithFees, - kusama::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header, Nonce, - Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, - NORMAL_DISPATCH_RATIO, SLOT_DURATION, + impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, + Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; +use system_parachains_constants::{ + kusama::{consensus::*, currency::*, fee::WeightToFee}, + AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + SLOT_DURATION, +}; use xcm::opaque::v3::MultiLocation; use xcm_config::{ FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, KsmLocation, @@ -1483,9 +1484,9 @@ fn ensure_key_ss58() { mod tests { use super::*; use crate::{CENTS, MILLICENTS}; - use parachains_common::kusama::fee; use sp_runtime::traits::Zero; use sp_weights::WeightToFee; + use system_parachains_constants::kusama::fee; /// We can fit at least 1000 transfers in a block. #[test] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 7b836886d0..1f9eb0acad 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -36,10 +36,10 @@ use parachains_common::{ AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, }, - TREASURY_PALLET_ID, }; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 20477cb24e..f207fb83de 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -34,10 +34,9 @@ use frame_support::{ traits::fungibles::InspectEnumerable, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{ - kusama::fee::WeightToFee, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, -}; +use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance}; use sp_runtime::traits::MaybeEquivalence; +use system_parachains_constants::kusama::fee::WeightToFee; use xcm::latest::prelude::*; use xcm_executor::traits::{Identity, JustTry, WeightTrader}; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index a3125308b7..0b626126ed 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -76,6 +76,7 @@ cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } parachains-common = { default-features = false , version = "4.0.0" } +system-parachains-constants = { path = "../../constants", default-features = false } assets-common = { default-features = false , version = "0.4.0" } [dev-dependencies] @@ -204,6 +205,7 @@ std = [ "sp-version/std", "sp-weights/std", "substrate-wasm-builder", + "system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 2c62e27069..8dc01e93e3 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -98,15 +98,18 @@ use frame_system::{ EnsureRoot, EnsureSigned, }; use pallet_nfts::PalletFeatures; -pub use parachains_common as common; use parachains_common::{ impls::{AssetsToBlockAuthor, DealWithFees}, - polkadot::{consensus::*, currency::*, fee::WeightToFee}, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, BlockNumber, - Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, - NORMAL_DISPATCH_RATIO, SLOT_DURATION, + Hash, Header, Nonce, Signature, }; + use sp_runtime::RuntimeDebug; +use system_parachains_constants::{ + polkadot::{consensus::*, currency::*, fee::WeightToFee}, + AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + SLOT_DURATION, +}; use xcm_config::{ DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig, XcmOriginToTransactDispatchOrigin, @@ -1317,9 +1320,9 @@ cumulus_pallet_parachain_system::register_validate_block! { mod tests { use super::*; use crate::{CENTS, MILLICENTS}; - use parachains_common::polkadot::fee; use sp_runtime::traits::Zero; use sp_weights::WeightToFee; + use system_parachains_constants::polkadot::fee; /// We can fit at least 1000 transfers in a block. #[test] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 01604814c1..8d5b6339b7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -31,11 +31,11 @@ use parachains_common::{ AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, }, - TREASURY_PALLET_ID, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 5af2c63c18..c56381e099 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -35,10 +35,10 @@ use frame_support::{ weights::{Weight, WeightToFee as WeightToFeeT}, }; use parachains_common::{ - polkadot::fee::WeightToFee, AccountId, AssetHubPolkadotAuraId as AuraId, - AssetIdForTrustBackedAssets, Balance, + AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, }; use sp_runtime::traits::MaybeEquivalence; +use system_parachains_constants::polkadot::fee::WeightToFee; use xcm::latest::prelude::*; use xcm_executor::traits::{Identity, JustTry, WeightTrader}; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index ed7d2bf1f1..cecd47bb88 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -74,6 +74,7 @@ cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } parachains-common = { default-features = false , version = "4.0.0" } +system-parachains-constants = { path = "../../constants", default-features = false } [dev-dependencies] bridge-hub-test-utils = { version = "0.4.0" } @@ -133,6 +134,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 32675645b1..d8ae0d3f08 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -68,10 +68,11 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, +}; +use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, - HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; // XCM Imports diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 6e917c05d6..a448ffeadc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -29,10 +29,10 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, - TREASURY_PALLET_ID, }; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 893524e12f..54ebc96a7a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -20,7 +20,8 @@ pub use bridge_hub_kusama_runtime::{ }; use codec::Decode; use frame_support::parameter_types; -use parachains_common::{kusama::fee::WeightToFee, AccountId, AuraId}; +use parachains_common::{AccountId, AuraId}; +use system_parachains_constants::kusama::fee::WeightToFee; const ALICE: [u8; 32] = [1u8; 32]; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 2e74c27c78..46aef5b926 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -74,6 +74,7 @@ cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } parachains-common = { default-features = false , version = "4.0.0" } +system-parachains-constants = { path = "../../constants", default-features = false } [dev-dependencies] bridge-hub-test-utils = { version = "0.4.0" } @@ -133,6 +134,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 039c9aa76a..425cd1fe20 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -69,10 +69,11 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, +}; +use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, - HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; // XCM Imports use xcm::prelude::*; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 17d7c177ac..472eba4ce7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -28,11 +28,11 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, - TREASURY_PALLET_ID, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::AccountIdConversion; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 0be87bd46f..1529f77025 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -20,7 +20,8 @@ pub use bridge_hub_polkadot_runtime::{ }; use codec::Decode; use frame_support::parameter_types; -use parachains_common::{polkadot::fee::WeightToFee, AccountId, AuraId}; +use parachains_common::{AccountId, AuraId}; +use system_parachains_constants::polkadot::fee::WeightToFee; const ALICE: [u8; 32] = [1u8; 32]; diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index c54e7352be..d45f676231 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -80,6 +80,7 @@ cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } parachains-common = { default-features = false , version = "4.0.0" } +system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] substrate-wasm-builder = { optional = true , version = "14.0.0" } @@ -94,8 +95,8 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-asset-rate/runtime-benchmarks", "pallet-alliance/runtime-benchmarks", + "pallet-asset-rate/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", @@ -127,8 +128,8 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", - "pallet-asset-rate/try-runtime", "pallet-alliance/try-runtime", + "pallet-asset-rate/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", @@ -170,8 +171,8 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "log/std", - "pallet-asset-rate/std", "pallet-alliance/std", + "pallet-asset-rate/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", @@ -214,6 +215,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 230d40585b..8a5885e476 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -38,7 +38,6 @@ pub use origins::{ }; use pallet_ranked_collective::EnsureOfRank; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; -use parachains_common::polkadot::account; use polkadot_runtime_common::impls::{ LocatableAssetConverter, VersionedLocatableAsset, VersionedMultiLocationConverter, }; @@ -48,6 +47,7 @@ use sp_core::{ConstU128, ConstU32}; use sp_runtime::traits::{ AccountIdConversion, ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst, }; +use system_parachains_constants::polkadot::account; use xcm::latest::BodyId; use xcm_builder::{AliasesIntoAccountId32, LocatableAssetId, PayOverXcm}; diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 89bda923a3..1a0e82c052 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -77,15 +77,15 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, }; -pub use parachains_common as common; use parachains_common::{ - impls::DealWithFees, + impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, +}; +use sp_runtime::RuntimeDebug; +use system_parachains_constants::{ polkadot::{account::*, consensus::*, currency::*, fee::WeightToFee}, - AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use sp_runtime::RuntimeDebug; use xcm_config::{ GovernanceLocation, TreasurerBodyId, XcmConfig, XcmOriginToTransactDispatchOrigin, }; diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index ced66b2c5d..0047b40aec 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -28,11 +28,11 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, - TREASURY_PALLET_ID, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants}; use sp_runtime::traits::AccountIdConversion; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml new file mode 100644 index 0000000000..20bd904bf3 --- /dev/null +++ b/system-parachains/constants/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "system-parachains-constants" +description = "Common constants for System Parachains runtimes" +repository.workspace = true +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +smallvec = "1.8.0" + +frame-support = { default-features = false , version = "25.0.0" } +kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} +parachains-common = { default-features = false , version = "4.0.0" } +polkadot-core-primitives = { default-features = false, version = "4.0.0"} +polkadot-primitives = { default-features = false , version = "4.0.0" } +polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} +sp-runtime = { default-features = false , version = "28.0.0" } + +[features] +default = [ "std" ] +std = [ + "frame-support/std", + "kusama-runtime-constants/std", + "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-primitives/std", + "polkadot-runtime-constants/std", + "sp-runtime/std", +] diff --git a/system-parachains/constants/src/kusama.rs b/system-parachains/constants/src/kusama.rs new file mode 100644 index 0000000000..3ae72f6514 --- /dev/null +++ b/system-parachains/constants/src/kusama.rs @@ -0,0 +1,123 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +/// Consensus-related. +pub mod consensus { + /// Maximum number of blocks simultaneously accepted by the Runtime, not yet included + /// into the relay chain. + pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; + /// How many parachain blocks are processed by the relay chain per parent. Limits the + /// number of blocks authored per slot. + pub const BLOCK_PROCESSING_VELOCITY: u32 = 1; + /// Relay chain slot duration, in milliseconds. + pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; +} + +/// Constants relating to KSM. +pub mod currency { + use polkadot_core_primitives::Balance; + + /// The existential deposit. 1/10th of the relay deposit. + pub const EXISTENTIAL_DEPOSIT: Balance = + kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT / 10; + + pub const UNITS: Balance = 1_000_000_000_000; + pub const QUID: Balance = UNITS / 30; + pub const CENTS: Balance = QUID / 100; + pub const GRAND: Balance = QUID * 1_000; + pub const MILLICENTS: Balance = CENTS / 1_000; + + /// Deposit for stored data. 1/100th of the relay deposit. + pub const fn deposit(items: u32, bytes: u32) -> Balance { + kusama_runtime_constants::currency::deposit(items, bytes) / 100 + } +} + +/// Constants related to Kusama fee payment. +pub mod fee { + use frame_support::{ + pallet_prelude::Weight, + weights::{ + constants::ExtrinsicBaseWeight, FeePolynomial, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, + }, + }; + use polkadot_core_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 frame_support::weights::WeightToFee for WeightToFee { + type Balance = Balance; + + fn weight_to_fee(weight: &Weight) -> Self::Balance { + let time_poly: FeePolynomial = RefTimeToFee::polynomial().into(); + let proof_poly: FeePolynomial = ProofSizeToFee::polynomial().into(); + + // Take the maximum instead of the sum to charge by the more scarce resource. + time_poly.eval(weight.ref_time()).max(proof_poly.eval(weight.proof_size())) + } + } + + /// Maps the reference time component of `Weight` to a fee. + pub struct RefTimeToFee; + impl WeightToFeePolynomial for RefTimeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // In Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + // The standard system parachain configuration is 1/10 of that, as in 1/100 CENT. + let p = super::currency::CENTS; + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } + + /// Maps the proof size component of `Weight` to a fee. + pub struct ProofSizeToFee; + impl WeightToFeePolynomial for ProofSizeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // Map 10kb proof to 1 CENT. + let p = super::currency::CENTS; + let q = 10_000; + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } +} diff --git a/system-parachains/constants/src/lib.rs b/system-parachains/constants/src/lib.rs new file mode 100644 index 0000000000..d0d320d968 --- /dev/null +++ b/system-parachains/constants/src/lib.rs @@ -0,0 +1,57 @@ +// 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 . + +#![cfg_attr(not(feature = "std"), no_std)] + +pub mod kusama; +pub mod polkadot; + +use frame_support::{ + weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, + PalletId, +}; +pub use parachains_common::BlockNumber; +use sp_runtime::Perbill; + +/// This determines the average expected block time that we are targeting. Blocks will be +/// produced at a minimum duration defined by `SLOT_DURATION`. `SLOT_DURATION` is picked up by +/// `pallet_timestamp` which is in turn picked up by `pallet_aura` to implement `fn +/// slot_duration()`. +/// +/// Change this to adjust the block time. +pub const MILLISECS_PER_BLOCK: u64 = 12000; +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// Time is measured by 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; + +/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is +/// used to limit the maximal weight of a single extrinsic. +pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); +/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by +/// Operational extrinsics. +pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); + +/// We allow for 0.5 seconds of compute with a 6 second average block time. +pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), + polkadot_primitives::MAX_POV_SIZE as u64, +); + +/// Treasury pallet id of the local chain, used to convert into AccountId +pub const TREASURY_PALLET_ID: PalletId = PalletId(*b"py/trsry"); diff --git a/system-parachains/constants/src/polkadot.rs b/system-parachains/constants/src/polkadot.rs new file mode 100644 index 0000000000..dfca992715 --- /dev/null +++ b/system-parachains/constants/src/polkadot.rs @@ -0,0 +1,144 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +/// Universally recognized accounts. +pub mod account { + use frame_support::PalletId; + + /// Polkadot treasury pallet id, used to convert into AccountId + pub const POLKADOT_TREASURY_PALLET_ID: PalletId = PalletId(*b"py/trsry"); + /// Alliance pallet ID. + /// Used as a temporary place to deposit a slashed imbalance before teleporting to the Treasury. + pub const ALLIANCE_PALLET_ID: PalletId = PalletId(*b"py/allia"); + /// Referenda pallet ID. + /// Used as a temporary place to deposit a slashed imbalance before teleporting to the Treasury. + pub const REFERENDA_PALLET_ID: PalletId = PalletId(*b"py/refer"); + /// Ambassador Referenda pallet ID. + /// Used as a temporary place to deposit a slashed imbalance before teleporting to the Treasury. + pub const AMBASSADOR_REFERENDA_PALLET_ID: PalletId = PalletId(*b"py/amref"); + /// Identity pallet ID. + /// Used as a temporary place to deposit a slashed imbalance before teleporting to the Treasury. + pub const IDENTITY_PALLET_ID: PalletId = PalletId(*b"py/ident"); + /// Fellowship treasury pallet ID + pub const FELLOWSHIP_TREASURY_PALLET_ID: PalletId = PalletId(*b"py/feltr"); +} + +/// Consensus-related. +pub mod consensus { + /// Maximum number of blocks simultaneously accepted by the Runtime, not yet included + /// into the relay chain. + pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; + /// How many parachain blocks are processed by the relay chain per parent. Limits the + /// number of blocks authored per slot. + pub const BLOCK_PROCESSING_VELOCITY: u32 = 1; + /// Relay chain slot duration, in milliseconds. + pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; +} + +/// Constants relating to DOT. +pub mod currency { + use polkadot_core_primitives::Balance; + + /// The existential deposit. + pub const EXISTENTIAL_DEPOSIT: Balance = + polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT / 10; + + 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 { + polkadot_runtime_constants::currency::deposit(items, bytes) / 100 + } +} + +/// Constants related to Polkadot fee payment. +pub mod fee { + use frame_support::{ + pallet_prelude::Weight, + weights::{ + constants::ExtrinsicBaseWeight, FeePolynomial, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, + }, + }; + use polkadot_core_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 frame_support::weights::WeightToFee for WeightToFee { + type Balance = Balance; + + fn weight_to_fee(weight: &Weight) -> Self::Balance { + let time_poly: FeePolynomial = RefTimeToFee::polynomial().into(); + let proof_poly: FeePolynomial = ProofSizeToFee::polynomial().into(); + + // Take the maximum instead of the sum to charge by the more scarce resource. + time_poly.eval(weight.ref_time()).max(proof_poly.eval(weight.proof_size())) + } + } + + /// Maps the reference time component of `Weight` to a fee. + pub struct RefTimeToFee; + impl WeightToFeePolynomial for RefTimeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // In Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + // The standard system parachain configuration is 1/10 of that, as in 1/100 CENT. + let p = super::currency::CENTS; + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } + + /// Maps the proof size component of `Weight` to a fee. + pub struct ProofSizeToFee; + impl WeightToFeePolynomial for ProofSizeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // Map 10kb proof to 1 CENT. + let p = super::currency::CENTS; + let q = 10_000; + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } +} diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index f86a9159d1..1399159633 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -46,6 +46,7 @@ cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } cumulus-primitives-core = { default-features = false , version = "0.4.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } parachains-common = { default-features = false , version = "4.0.0" } +system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] substrate-wasm-builder = { version = "14.0.0" } @@ -94,6 +95,7 @@ std = [ "sp-storage/std", "sp-transaction-pool/std", "sp-version/std", + "system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", From ce1ed26e0e687385025a98509fc9f0f4792a56ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Thu, 4 Jan 2024 20:37:14 +0100 Subject: [PATCH 14/27] Improve release changelogs (#117) This improves the release by only adding the relevant parts of the CHANGELOG.md file. Besides that it also adds information on how to reproduce the build with srtool. Closes: https://github.com/polkadot-fellows/runtimes/issues/66 --------- Co-authored-by: Oliver Tale-Yazdi --- .github/changelog-processor.py | 23 ++++++++++++++++++++--- .github/workflows/release.yml | 19 ++++++++++++++----- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.github/changelog-processor.py b/.github/changelog-processor.py index b005c620d8..10750aade7 100755 --- a/.github/changelog-processor.py +++ b/.github/changelog-processor.py @@ -26,21 +26,38 @@ help="Should a release be made? Prints `1` or `0`.", action="store_true" ) +group.add_argument( + "--print-changelog-from-last-release", + dest="changelog_last_release", + help="Print the changelog from the last release.", + action="store_true" +) args = parser.parse_args() with open(args.changelog, "r") as changelog: lines = changelog.readlines() + changelog_last_release = "" + found_last_version = False + # Find the latest version for line in lines: if not line.startswith("## ["): + changelog_last_release += line continue + elif not found_last_version: + changelog_last_release += line + found_last_version = True + version = line.strip().removeprefix("## [").split("]")[0] + else: + break - version = line.strip().removeprefix("## [").split("]")[0] - break - if args.print_latest_version: + if args.changelog_last_release: + print(changelog_last_release, end = "") + sys.exit(0) + elif args.print_latest_version: print(version, end = "") sys.exit(0) elif args.should_release: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d19cbe550c..aa5dc01b45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,12 +105,21 @@ jobs: CONTEXT=$(find . -name '*_srtool_output.json') SRTOOL() { <$(<<<$CONTEXT head -n1) jq -r .$1; } WASM() { <${JSON} jq -r ".runtimes.compressed.subwasm.$1"; } + + # Copy the relevant parts of the changelog + .github/changelog-processor.py CHANGELOG.md --print-changelog-from-last-release > DRAFT + tee -a DRAFT <<-EOF - EOF - tee -a DRAFT Date: Thu, 4 Jan 2024 22:43:39 +0100 Subject: [PATCH 15/27] CI: Use shared cache (#135) Closes: https://github.com/polkadot-fellows/runtimes/issues/134 --- .github/workflows/clippy.yml | 2 ++ .github/workflows/test.yml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 6941e4dddc..5f4bed4e9f 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -27,6 +27,8 @@ jobs: - name: Fetch cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + with: + shared-key: "fellowship-cache" - name: Clippy run: cargo +nightly clippy --all-targets --locked -q diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ec7604957..480f10527a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,8 @@ jobs: - name: Fetch cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + with: + shared-key: "fellowship-cache" - name: Test run: cargo test --workspace --release --locked -q --features=runtime-metrics,try-runtime @@ -60,4 +62,4 @@ jobs: run: cargo test --workspace --release --locked -q --features=runtime-benchmarks,runtime-metrics,try-runtime env: RUSTFLAGS: "-C debug-assertions -D warnings" - SKIP_WASM_BUILD: 1 \ No newline at end of file + SKIP_WASM_BUILD: 1 From 101882e69e089eed8f0ec2180427be76bac6f630 Mon Sep 17 00:00:00 2001 From: Muharem Date: Fri, 5 Jan 2024 16:49:14 +0800 Subject: [PATCH 16/27] Local Pluralities Get Free Xcm Execution (#125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Local Root and Pluralities Get Free Xcm Execution After running e2e tests, we discovered that xcm programs sent from local pluralities such as Relay Chain Staking Admin or Collectives Fellowship were failing due to insufficient balance to cover execution/delivery fees. This PR addresses this issue by granting them a free execution. Additionally, we encountered similar failures when attempting to teleport slashed assets from Collectives to the Relay Chain Treasury. In this PR, we resolve this problem by teleporting those assets on behalf of the Collectives root location, allowing for a free delivery. --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Bastian Köcher Co-authored-by: Bastian Köcher --- CHANGELOG.md | 1 + relay/kusama/src/xcm_config.rs | 12 +++++-- relay/polkadot/src/xcm_config.rs | 12 +++++-- .../src/fellowship/mod.rs | 18 +++++----- .../collectives-polkadot/src/impls.rs | 33 ++++++++++++------- .../collectives-polkadot/src/lib.rs | 8 ++--- .../collectives-polkadot/src/xcm_config.rs | 24 ++++++++++---- 7 files changed, 70 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 942c6dc292..7824f1e3e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Election provider: use a geometric deposit base calculation for EPM signed submissions in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661 - Whitelist `force_default_xcm_version` in XCM call filter ([polkadot-fellows/runtimes#45](https://github.com/polkadot-fellows/runtimes/pull/45)) +- Set up an account ID for the local root location on Polkadot Collectives ([polkadot-fellows/runtimes#125](https://github.com/polkadot-fellows/runtimes/pull/125)) - Increase confirmation period for treasury spend tracks on Polkadot & Kusama ([polkadot-fellows/runtimes#119](https://github.com/polkadot-fellows/runtimes/pull/119)) ### Added diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 4e9798a122..75eb39ab69 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -23,7 +23,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Contains, Everything, Nothing}, + traits::{Contains, Equals, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; @@ -47,6 +47,7 @@ use xcm_builder::{ use xcm_executor::traits::WithOriginFilter; parameter_types! { + pub const RootLocation: MultiLocation = Here.into_location(); /// The location of the KSM 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". @@ -147,6 +148,9 @@ match_types! { pub type OnlyParachains: impl Contains = { MultiLocation { parents: 0, interior: X1(Parachain(_)) } }; + 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. @@ -321,6 +325,10 @@ impl Contains for SafeCallFilter { } } +/// Locations that will not be charged fees in the executor, neither for execution nor delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = (SystemParachains, Equals, LocalPlurality); + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -347,7 +355,7 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeesToAccount; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 65c0348fe1..e019879b36 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -23,7 +23,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Contains, Everything, Nothing}, + traits::{Contains, Equals, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; @@ -52,6 +52,7 @@ use xcm_builder::{ 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". @@ -161,6 +162,9 @@ match_types! { 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. @@ -324,6 +328,10 @@ impl Contains for SafeCallFilter { } } +/// Locations that will not be charged fees in the executor, neither for execution nor delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = (SystemParachains, Equals, LocalPlurality); + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -351,7 +359,7 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeesToAccount; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 8a5885e476..fe7ade4a12 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -19,9 +19,12 @@ mod origins; mod tracks; use crate::{ - impls::ToParentTreasury, weights, xcm_config::TreasurerBodyId, AccountId, AssetRate, Balance, - Balances, FellowshipReferenda, GovernanceLocation, PolkadotTreasuryAccount, Preimage, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, DAYS, + impls::ToParentTreasury, + weights, + xcm_config::{LocationToAccountId, TreasurerBodyId}, + AccountId, AssetRate, Balance, Balances, FellowshipReferenda, GovernanceLocation, + PolkadotTreasuryAccount, Preimage, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + Scheduler, DAYS, }; use cumulus_primitives_core::Junction::GeneralIndex; use frame_support::{ @@ -44,10 +47,7 @@ use polkadot_runtime_common::impls::{ use polkadot_runtime_constants::{currency::GRAND, time::HOURS, xcm::body::FELLOWSHIP_ADMIN_INDEX}; use sp_arithmetic::Permill; use sp_core::{ConstU128, ConstU32}; -use sp_runtime::traits::{ - AccountIdConversion, ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst, -}; -use system_parachains_constants::polkadot::account; +use sp_runtime::traits::{ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst}; use xcm::latest::BodyId; use xcm_builder::{AliasesIntoAccountId32, LocatableAssetId, PayOverXcm}; @@ -70,8 +70,6 @@ pub mod ranks { } parameter_types! { - // Referenda pallet account, used to temporarily deposit slashed imbalance before teleporting. - pub ReferendaPalletAccount: AccountId = account::REFERENDA_PALLET_ID.into_account_truncating(); pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); } @@ -101,7 +99,7 @@ impl pallet_referenda::Config for Runtime { >; type CancelOrigin = Architects; type KillOrigin = Masters; - type Slash = ToParentTreasury; + type Slash = ToParentTreasury; type Votes = pallet_ranked_collective::Votes; type Tally = pallet_ranked_collective::TallyOf; type SubmissionDeposit = ConstU128<0>; diff --git a/system-parachains/collectives/collectives-polkadot/src/impls.rs b/system-parachains/collectives/collectives-polkadot/src/impls.rs index fb2feb63ec..a59c181db6 100644 --- a/system-parachains/collectives/collectives-polkadot/src/impls.rs +++ b/system-parachains/collectives/collectives-polkadot/src/impls.rs @@ -24,7 +24,8 @@ use pallet_alliance::{ProposalIndex, ProposalProvider}; use parachains_common::impls::NegativeImbalance; use sp_runtime::DispatchError; use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*}; -use xcm::latest::{Fungibility, Junction, Parent, WeightLimit}; +use xcm::latest::{Fungibility, Junction, Junctions::Here, MultiLocation, Parent, WeightLimit}; +use xcm_executor::traits::ConvertLocation; type AccountIdOf = ::AccountId; @@ -38,19 +39,19 @@ pub type BalanceOf = /// Implements `OnUnbalanced::on_unbalanced` to teleport slashed assets to relay chain treasury /// account. -pub struct ToParentTreasury( - PhantomData<(TreasuryAccount, PalletAccount, T)>, +pub struct ToParentTreasury( + PhantomData<(TreasuryAccount, AccountIdConverter, T)>, ); -impl OnUnbalanced> - for ToParentTreasury +impl OnUnbalanced> + for ToParentTreasury where T: pallet_balances::Config + pallet_xcm::Config + frame_system::Config, <::RuntimeOrigin as OriginTrait>::AccountId: From>, [u8; 32]: From<::AccountId>, TreasuryAccount: Get>, - PalletAccount: Get>, BalanceOf: Into, + AccountIdConverter: ConvertLocation>, { fn on_unbalanced(amount: NegativeImbalance) { let amount = match amount.drop_zero() { @@ -58,16 +59,24 @@ where Err(amount) => amount, }; let imbalance = amount.peek(); - let pallet_acc: AccountIdOf = PalletAccount::get(); - let treasury_acc: AccountIdOf = TreasuryAccount::get(); - - >::resolve_creating(&pallet_acc, amount); + let root_location: MultiLocation = Here.into(); + let root_account: AccountIdOf = + match AccountIdConverter::convert_location(&root_location) { + Some(a) => a, + None => { + log::warn!("Failed to convert root origin into account id"); + return + }, + }; + let treasury_account: AccountIdOf = TreasuryAccount::get(); + + >::resolve_creating(&root_account, amount); let result = >::limited_teleport_assets( - <::RuntimeOrigin>::signed(pallet_acc.into()), + <::RuntimeOrigin>::root(), Box::new(Parent.into()), Box::new( - Junction::AccountId32 { network: None, id: treasury_acc.into() } + Junction::AccountId32 { network: None, id: treasury_account.into() } .into_location() .into(), ), diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 1a0e82c052..4e3d34d9eb 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -87,7 +87,8 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, TreasurerBodyId, XcmConfig, XcmOriginToTransactDispatchOrigin, + GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmConfig, + XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -509,9 +510,6 @@ pub const MAX_ALLIES: u32 = 100; parameter_types! { pub const AllyDeposit: Balance = 1_000 * UNITS; // 1,000 DOT bond to join as an Ally - // The Alliance pallet account, used as a temporary place to deposit a slashed imbalance - // before the teleport to the Treasury. - pub AlliancePalletAccount: AccountId = ALLIANCE_PALLET_ID.into_account_truncating(); pub PolkadotTreasuryAccount: AccountId = POLKADOT_TREASURY_PALLET_ID.into_account_truncating(); // The number of blocks a member must wait between giving a retirement notice and retiring. // Supposed to be greater than time required to `kick_member` with alliance motion. @@ -525,7 +523,7 @@ impl pallet_alliance::Config for Runtime { type MembershipManager = RootOrAllianceTwoThirdsMajority; type AnnouncementOrigin = RootOrAllianceTwoThirdsMajority; type Currency = Balances; - type Slashed = ToParentTreasury; + type Slashed = ToParentTreasury; type InitializeMembers = AllianceMotion; type MembershipChanged = AllianceMotion; type RetirementPeriod = AllianceRetirementPeriod; diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 0047b40aec..c336764488 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -38,15 +38,16 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FixedWeightBounds, HashedDescription, IsConcrete, OriginToPluralityVoice, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, HashedDescription, IsConcrete, + OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { + pub const RootLocation: MultiLocation = MultiLocation::here(); pub const DotLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); @@ -71,6 +72,8 @@ pub type LocationToAccountId = ( AccountId32Aliases, // Foreign locations alias into accounts according to a hash of their standard description. HashedDescription>, + // Here/local root location to `AccountId`. + HashedDescription, ); /// Means for transacting the native currency on this chain. @@ -132,6 +135,9 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(_) } }; + pub type LocalPlurality: impl Contains = { + MultiLocation { parents: 0, interior: X1(Plurality { .. }) } + }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly @@ -261,8 +267,12 @@ match_types! { /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, + Equals, + LocalPlurality, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// - DOT with the parent Relay Chain and sibling parachains. From 3caec691e13dc858f8fefbcddda15d43fc434140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Fri, 5 Jan 2024 11:46:53 +0100 Subject: [PATCH 17/27] Removes already applied migrations (#118) --- relay/polkadot/src/lib.rs | 89 +------------------ .../asset-hubs/asset-hub-kusama/src/lib.rs | 45 +--------- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 47 ++-------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 27 +----- .../bridge-hub-polkadot/src/lib.rs | 2 +- .../collectives-polkadot/src/lib.rs | 50 +---------- 6 files changed, 13 insertions(+), 247 deletions(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 03ed0a78cb..4fd2d286fc 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -57,9 +57,9 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, Get, - InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, - ProcessMessageError, WithdrawReasons, + fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Get, InstanceFilter, + KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, + WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, PalletId, @@ -1688,51 +1688,6 @@ pub type Migrations = migrations::Unreleased; #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - use frame_support::traits::LockIdentifier; - use frame_system::pallet_prelude::BlockNumberFor; - - parameter_types! { - pub const DemocracyPalletName: &'static str = "Democracy"; - pub const CouncilPalletName: &'static str = "Council"; - pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; - pub const PhragmenElectionPalletName: &'static str = "PhragmenElection"; - pub const TechnicalMembershipPalletName: &'static str = "TechnicalMembership"; - pub const TipsPalletName: &'static str = "Tips"; - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; - } - - // Special Config for Gov V1 pallets, allowing us to run migrations for them without - // implementing their configs on [`Runtime`]. - pub struct UnlockConfig; - impl pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { - type Currency = Balances; - type MaxVotes = ConstU32<100>; - type MaxDeposits = ConstU32<100>; - type AccountId = AccountId; - type BlockNumber = BlockNumberFor; - type DbWeight = ::DbWeight; - type PalletName = DemocracyPalletName; - } - impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig - for UnlockConfig - { - type Currency = Balances; - type MaxVotesPerVoter = ConstU32<16>; - type PalletId = PhragmenElectionPalletId; - type AccountId = AccountId; - type DbWeight = ::DbWeight; - type PalletName = PhragmenElectionPalletName; - } - impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { - type Currency = Balances; - type Hash = Hash; - type DataDepositPerByte = DataDepositPerByte; - type TipReportDepositBase = TipReportDepositBase; - type AccountId = AccountId; - type BlockNumber = BlockNumberFor; - type DbWeight = ::DbWeight; - type PalletName = TipsPalletName; - } /// Upgrade Session keys to include BEEFY key. /// When this is removed, should also remove `OldSessionKeys`. @@ -1744,50 +1699,12 @@ pub mod migrations { } } - pub struct ParachainsToUnlock; - impl Contains for ParachainsToUnlock { - fn contains(id: &ParaId) -> bool { - let id: u32 = (*id).into(); - // polkadot parachains/parathreads that are locked and never produced block - match id { - 2003 | 2015 | 2017 | 2018 | 2025 | 2028 | 2036 | 2038 | 2053 | 2055 | 2090 | - 2097 | 2106 | 3336 | 3338 | 3342 => true, - _ => false, - } - } - } - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_im_online::migration::v1::Migration, - parachains_configuration::migration::v7::MigrateToV7, - parachains_configuration::migration::v8::MigrateToV8, - - // Gov v1 storage migrations - // https://github.com/paritytech/polkadot/issues/6749 - pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, - pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, - pallet_tips::migrations::unreserve_deposits::UnreserveDeposits, - - // Delete all Gov v1 pallet storage key/values. - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - - parachains_configuration::migration::v9::MigrateToV9, - // Migrate parachain info format - paras_registrar::migration::VersionCheckedMigrateToV1, - // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned_migrations::V5toV6, pallet_nomination_pools::migration::versioned_migrations::V6ToV7, - - runtime_parachains::scheduler::migration::v1::MigrateToV1 ); } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 45baa5a16e..5c93017890 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -910,50 +910,7 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( - pallet_collator_selection::migration::v1::MigrateToV1, - pallet_multisig::migrations::v1::MigrateToV1, - InitStorageVersions, -); - -/// Migration to initialize storage versions for pallets added after genesis. -/// -/// Ideally this would be done automatically (see -/// ), but it probably won't be ready for some -/// time and it's beneficial to get storage version issues smoothed over before merging -/// so we're just setting them manually. -pub struct InitStorageVersions; - -impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { - fn on_runtime_upgrade() -> Weight { - use frame_support::traits::{GetStorageVersion, StorageVersion}; - use sp_runtime::traits::Saturating; - - let mut writes = 0; - - if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); - writes.saturating_inc(); - } - - if Nfts::on_chain_storage_version() == StorageVersion::new(0) { - Nfts::current_storage_version().put::(); - writes.saturating_inc(); - } - - if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) { - ForeignAssets::current_storage_version().put::(); - writes.saturating_inc(); - } - - if PoolAssets::on_chain_storage_version() == StorageVersion::new(0) { - PoolAssets::current_storage_version().put::(); - writes.saturating_inc(); - } - - ::DbWeight::get().reads_writes(4, writes) - } -} +pub type Migrations = (); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 8dc01e93e3..7bdffa19bb 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -88,7 +88,7 @@ use frame_support::{ parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, - InstanceFilter, + InstanceFilter, OnRuntimeUpgrade, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -820,49 +820,14 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. pub type Migrations = - (pallet_collator_selection::migration::v1::MigrateToV1, InitStorageVersions); + frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>; -/// Migration to initialize storage versions for pallets added after genesis. -/// -/// Ideally this would be done automatically (see -/// ), but it probably won't be ready for some -/// time and it's beneficial to get storage version issues smoothed over before merging -/// so we're just setting them manually. -pub struct InitStorageVersions; +/// Migration for Uniques to V1 +pub struct UniquesMigration; -impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { +impl OnRuntimeUpgrade for UniquesMigration { fn on_runtime_upgrade() -> Weight { - use frame_support::traits::{GetStorageVersion, StorageVersion}; - use sp_runtime::traits::Saturating; - - let mut writes = 0; - - if Multisig::on_chain_storage_version() == StorageVersion::new(0) { - Multisig::current_storage_version().put::(); - writes.saturating_inc(); - } - - if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); - writes.saturating_inc(); - } - - if Nfts::on_chain_storage_version() == StorageVersion::new(0) { - Nfts::current_storage_version().put::(); - writes.saturating_inc(); - } - - if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) { - ForeignAssets::current_storage_version().put::(); - writes.saturating_inc(); - } - - if Uniques::on_chain_storage_version() == StorageVersion::new(0) { - Uniques::current_storage_version().put::(); - writes.saturating_inc(); - } - - ::DbWeight::get().reads_writes(4, writes) + pallet_uniques::migration::migrate_to_v1::>() } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index d8ae0d3f08..5e5f7e9e0e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -108,32 +108,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = - (pallet_collator_selection::migration::v1::MigrateToV1, InitStorageVersions); - -/// Migration to initialize storage versions for pallets added after genesis. -/// -/// Ideally this would be done automatically (see -/// ), but it probably won't be ready for some -/// time and it's beneficial to get storage version issues smoothed over before merging -/// so we're just setting them manually. -pub struct InitStorageVersions; - -impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { - fn on_runtime_upgrade() -> Weight { - use frame_support::traits::{GetStorageVersion, StorageVersion}; - use sp_runtime::traits::Saturating; - - let mut writes = 0; - - if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); - writes.saturating_inc(); - } - - ::DbWeight::get().reads_writes(1, writes) - } -} +pub type Migrations = (); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 425cd1fe20..c18dcc3d2f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -108,7 +108,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1,); +pub type Migrations = (); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 4e3d34d9eb..9e29e0a077 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -683,55 +683,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// All migrations executed on runtime upgrade as a nested tuple of types implementing /// `OnRuntimeUpgrade`. Included migrations must be idempotent. -type Migrations = ( - // unreleased - pallet_collator_selection::migration::v1::MigrateToV1, - InitStorageVersions, -); - -/// Migration to initialize storage versions for pallets added after genesis. -/// -/// Ideally this would be done automatically (see -/// ), but it probably won't be ready for some -/// time and it's beneficial to get storage version issues smoothed over before merging -/// so we're just setting them manually. -pub struct InitStorageVersions; - -impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { - fn on_runtime_upgrade() -> Weight { - use frame_support::traits::{GetStorageVersion, StorageVersion}; - use sp_runtime::traits::Saturating; - - let mut writes = 0; - - if Multisig::on_chain_storage_version() == StorageVersion::new(0) { - Multisig::current_storage_version().put::(); - writes.saturating_inc(); - } - - if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); - writes.saturating_inc(); - } - - if Preimage::on_chain_storage_version() == StorageVersion::new(0) { - Preimage::current_storage_version().put::(); - writes.saturating_inc(); - } - - if Scheduler::on_chain_storage_version() == StorageVersion::new(0) { - Scheduler::current_storage_version().put::(); - writes.saturating_inc(); - } - - if FellowshipReferenda::on_chain_storage_version() == StorageVersion::new(0) { - FellowshipReferenda::current_storage_version().put::(); - writes.saturating_inc(); - } - - ::DbWeight::get().reads_writes(5, writes) - } -} +type Migrations = (); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< From 48ccfae6141d2924f579d81e8b1877efd208693f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 5 Jan 2024 18:33:23 +0400 Subject: [PATCH 18/27] Update Runtime Weights (#129) For https://github.com/polkadot-fellows/runtimes/issues/68#issuecomment-1849742955. Uses instructions introduced to the readme in https://github.com/polkadot-fellows/runtimes/pull/127 to re-bench all runtimes. TODO - [x] Is this much change % expected? Is benchmarking on vCPUs flawed because they are arbitrarily shared with other cloud customers? - It seems to be fine, the changes align with actual changes in configuration of the runtimes (thanks @ggwpez!). - [x] Polkadot - [x] Kusama - [x] Asset Hub Polkadot - [x] Asset Hub Kusama - [x] Bridge Hub Polkadot - [x] Bridge Hub Kusama - [x] Collectives Polkadot - [ ] Look into why subweight shows some errors ## Polkadot Changes Screenshot 2023-12-19 at 11 06 20 Screenshot 2023-12-19 at 11 08 24 Screenshot 2023-12-19 at 11 10 14 ## Kusama Changes Screenshot 2023-12-19 at 11 12 19 Screenshot 2023-12-19 at 11 12 43 ## Asset Hub Polkadot Changes Screenshot 2023-12-19 at 20 34 25 ## Asset Hub Kusama Changes Screenshot 2023-12-19 at 20 43 37 ## Bridge Hub Polkadot Screenshot 2023-12-20 at 11 49 13 ## Bridge Hub Kusama Screenshot 2023-12-20 at 11 48 39 ## Collectives Polkadot Screenshot 2023-12-20 at 11 50 33 Screenshot 2023-12-20 at 11 51 07 --------- Signed-off-by: Oliver Tale-Yazdi Co-authored-by: Oliver Tale-Yazdi Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Adrian Catangiu --- .../src/tests/reserve_transfer.rs | 2 +- .../src/tests/reserve_transfer.rs | 2 +- .../asset-hub-polkadot/src/tests/teleport.rs | 4 +- .../emulated/common/src/impls.rs | 8 +- relay/kusama/src/lib.rs | 2 +- .../weights/frame_benchmarking_baseline.rs | 54 +- .../frame_election_provider_support.rs | 50 +- relay/kusama/src/weights/frame_system.rs | 76 +-- relay/kusama/src/weights/mod.rs | 8 +- relay/kusama/src/weights/pallet_asset_rate.rs | 62 +- relay/kusama/src/weights/pallet_bags_list.rs | 44 +- relay/kusama/src/weights/pallet_balances.rs | 99 ---- .../src/weights/pallet_balances_balances.rs | 62 +- ...allet_balances_nis_counterpart_balances.rs | 62 +- relay/kusama/src/weights/pallet_bounties.rs | 78 +-- .../src/weights/pallet_child_bounties.rs | 62 +- .../src/weights/pallet_collective_council.rs | 322 ----------- .../pallet_collective_technical_committee.rs | 322 ----------- .../src/weights/pallet_conviction_voting.rs | 78 +-- relay/kusama/src/weights/pallet_democracy.rs | 513 ----------------- .../pallet_election_provider_multi_phase.rs | 98 ++-- .../src/weights/pallet_elections_phragmen.rs | 303 ---------- .../kusama/src/weights/pallet_fast_unstake.rs | 86 +-- relay/kusama/src/weights/pallet_identity.rs | 186 +++--- relay/kusama/src/weights/pallet_im_online.rs | 36 +- relay/kusama/src/weights/pallet_indices.rs | 46 +- relay/kusama/src/weights/pallet_membership.rs | 202 ------- .../src/weights/pallet_message_queue.rs | 66 ++- relay/kusama/src/weights/pallet_multisig.rs | 90 +-- relay/kusama/src/weights/pallet_nis.rs | 90 +-- .../src/weights/pallet_nomination_pools.rs | 239 ++++---- relay/kusama/src/weights/pallet_offences.rs | 62 +- relay/kusama/src/weights/pallet_preimage.rs | 203 ++++--- relay/kusama/src/weights/pallet_proxy.rs | 122 ++-- .../src/weights/pallet_ranked_collective.rs | 66 ++- relay/kusama/src/weights/pallet_recovery.rs | 82 +-- .../pallet_referenda_fellowship_referenda.rs | 150 ++--- .../src/weights/pallet_referenda_referenda.rs | 150 ++--- relay/kusama/src/weights/pallet_scheduler.rs | 104 ++-- relay/kusama/src/weights/pallet_session.rs | 46 +- relay/kusama/src/weights/pallet_society.rs | 106 ++-- relay/kusama/src/weights/pallet_staking.rs | 360 ++++++------ relay/kusama/src/weights/pallet_timestamp.rs | 34 +- relay/kusama/src/weights/pallet_tips.rs | 159 ------ relay/kusama/src/weights/pallet_treasury.rs | 102 ++-- relay/kusama/src/weights/pallet_utility.rs | 58 +- relay/kusama/src/weights/pallet_vesting.rs | 154 ++--- relay/kusama/src/weights/pallet_whitelist.rs | 74 ++- relay/kusama/src/weights/pallet_xcm.rs | 90 +-- .../weights/pallet_xcm_benchmarks_fungible.rs | 184 ------ .../weights/pallet_xcm_benchmarks_generic.rs | 393 ------------- .../src/weights/runtime_common_auctions.rs | 44 +- .../src/weights/runtime_common_claims.rs | 58 +- .../src/weights/runtime_common_crowdloan.rs | 70 +-- .../weights/runtime_common_paras_registrar.rs | 92 +-- .../src/weights/runtime_common_slots.rs | 62 +- .../runtime_parachains_configuration.rs | 86 +-- .../weights/runtime_parachains_disputes.rs | 30 +- .../runtime_parachains_disputes_slashing.rs | 44 +- .../src/weights/runtime_parachains_hrmp.rs | 106 ++-- .../weights/runtime_parachains_inclusion.rs | 34 +- .../weights/runtime_parachains_initializer.rs | 34 +- .../src/weights/runtime_parachains_paras.rs | 118 ++-- .../runtime_parachains_paras_inherent.rs | 74 +-- .../xcm/pallet_xcm_benchmarks_fungible.rs | 87 +-- .../xcm/pallet_xcm_benchmarks_generic.rs | 156 +++--- .../weights/frame_benchmarking_baseline.rs | 54 +- .../frame_election_provider_support.rs | 50 +- relay/polkadot/src/weights/frame_system.rs | 78 +-- relay/polkadot/src/weights/mod.rs | 6 - .../polkadot/src/weights/pallet_asset_rate.rs | 62 +- .../polkadot/src/weights/pallet_bags_list.rs | 44 +- relay/polkadot/src/weights/pallet_balances.rs | 62 +- relay/polkadot/src/weights/pallet_bounties.rs | 98 ++-- .../src/weights/pallet_child_bounties.rs | 74 +-- .../src/weights/pallet_collective_council.rs | 327 ----------- .../pallet_collective_technical_committee.rs | 327 ----------- .../src/weights/pallet_conviction_voting.rs | 84 +-- .../polkadot/src/weights/pallet_democracy.rs | 528 ------------------ .../pallet_election_provider_multi_phase.rs | 106 ++-- .../src/weights/pallet_elections_phragmen.rs | 318 ----------- .../src/weights/pallet_fast_unstake.rs | 94 ++-- relay/polkadot/src/weights/pallet_identity.rs | 186 +++--- .../polkadot/src/weights/pallet_im_online.rs | 36 +- relay/polkadot/src/weights/pallet_indices.rs | 46 +- .../polkadot/src/weights/pallet_membership.rs | 207 ------- .../src/weights/pallet_message_queue.rs | 66 ++- relay/polkadot/src/weights/pallet_multisig.rs | 92 +-- .../src/weights/pallet_nomination_pools.rs | 238 ++++---- relay/polkadot/src/weights/pallet_offences.rs | 62 +- relay/polkadot/src/weights/pallet_preimage.rs | 201 ++++--- relay/polkadot/src/weights/pallet_proxy.rs | 122 ++-- .../polkadot/src/weights/pallet_referenda.rs | 150 ++--- .../polkadot/src/weights/pallet_scheduler.rs | 104 ++-- relay/polkadot/src/weights/pallet_session.rs | 56 +- relay/polkadot/src/weights/pallet_staking.rs | 358 ++++++------ .../polkadot/src/weights/pallet_timestamp.rs | 34 +- relay/polkadot/src/weights/pallet_tips.rs | 164 ------ relay/polkadot/src/weights/pallet_treasury.rs | 102 ++-- relay/polkadot/src/weights/pallet_utility.rs | 58 +- relay/polkadot/src/weights/pallet_vesting.rs | 154 ++--- .../polkadot/src/weights/pallet_whitelist.rs | 86 +-- relay/polkadot/src/weights/pallet_xcm.rs | 86 +-- .../src/weights/runtime_common_auctions.rs | 44 +- .../src/weights/runtime_common_claims.rs | 58 +- .../src/weights/runtime_common_crowdloan.rs | 70 +-- .../weights/runtime_common_paras_registrar.rs | 92 +-- .../src/weights/runtime_common_slots.rs | 62 +- .../runtime_parachains_configuration.rs | 86 +-- .../weights/runtime_parachains_disputes.rs | 30 +- .../runtime_parachains_disputes_slashing.rs | 44 +- .../src/weights/runtime_parachains_hrmp.rs | 118 ++-- .../weights/runtime_parachains_inclusion.rs | 34 +- .../weights/runtime_parachains_initializer.rs | 34 +- .../src/weights/runtime_parachains_paras.rs | 118 ++-- .../runtime_parachains_paras_inherent.rs | 74 +-- .../xcm/pallet_xcm_benchmarks_fungible.rs | 230 ++++---- .../src/weights/cumulus_pallet_xcmp_queue.rs | 30 +- .../src/weights/frame_system.rs | 68 +-- .../src/weights/pallet_asset_conversion.rs | 52 +- .../src/weights/pallet_assets_foreign.rs | 186 +++--- .../src/weights/pallet_assets_local.rs | 186 +++--- .../src/weights/pallet_assets_pool.rs | 184 +++--- .../src/weights/pallet_balances.rs | 64 ++- .../src/weights/pallet_collator_selection.rs | 104 ++-- .../src/weights/pallet_multisig.rs | 92 +-- .../weights/pallet_nft_fractionalization.rs | 30 +- .../src/weights/pallet_nfts.rs | 218 ++++---- .../src/weights/pallet_proxy.rs | 118 ++-- .../src/weights/pallet_session.rs | 42 +- .../src/weights/pallet_timestamp.rs | 30 +- .../src/weights/pallet_uniques.rs | 144 ++--- .../src/weights/pallet_utility.rs | 54 +- .../src/weights/pallet_xcm.rs | 102 ++-- .../weights/pallet_xcm_benchmarks_fungible.rs | 194 ------- .../xcm/pallet_xcm_benchmarks_fungible.rs | 268 ++++----- .../src/weights/cumulus_pallet_xcmp_queue.rs | 30 +- .../src/weights/frame_system.rs | 66 +-- .../src/weights/pallet_assets_foreign.rs | 186 +++--- .../src/weights/pallet_assets_local.rs | 182 +++--- .../src/weights/pallet_balances.rs | 64 ++- .../src/weights/pallet_collator_selection.rs | 104 ++-- .../src/weights/pallet_multisig.rs | 90 +-- .../src/weights/pallet_nfts.rs | 218 ++++---- .../src/weights/pallet_proxy.rs | 118 ++-- .../src/weights/pallet_session.rs | 42 +- .../src/weights/pallet_timestamp.rs | 30 +- .../src/weights/pallet_uniques.rs | 144 ++--- .../src/weights/pallet_utility.rs | 54 +- .../src/weights/pallet_xcm.rs | 102 ++-- .../weights/pallet_xcm_benchmarks_fungible.rs | 194 ------- .../xcm/pallet_xcm_benchmarks_fungible.rs | 260 +++++---- .../src/weights/cumulus_pallet_xcmp_queue.rs | 30 +- .../src/weights/frame_system.rs | 68 +-- .../src/weights/pallet_balances.rs | 58 +- .../src/weights/pallet_collator_selection.rs | 86 +-- .../src/weights/pallet_multisig.rs | 88 +-- .../src/weights/pallet_session.rs | 30 +- .../src/weights/pallet_timestamp.rs | 30 +- .../src/weights/pallet_utility.rs | 54 +- .../src/weights/pallet_xcm.rs | 98 ++-- .../weights/pallet_xcm_benchmarks_fungible.rs | 194 ------- .../xcm/pallet_xcm_benchmarks_fungible.rs | 258 +++++---- .../src/weights/cumulus_pallet_xcmp_queue.rs | 30 +- .../src/weights/frame_system.rs | 68 +-- .../src/weights/pallet_balances.rs | 58 +- .../src/weights/pallet_collator_selection.rs | 86 +-- .../src/weights/pallet_multisig.rs | 90 +-- .../src/weights/pallet_session.rs | 30 +- .../src/weights/pallet_timestamp.rs | 30 +- .../src/weights/pallet_utility.rs | 54 +- .../src/weights/pallet_xcm.rs | 98 ++-- .../weights/pallet_xcm_benchmarks_fungible.rs | 194 ------- .../xcm/pallet_xcm_benchmarks_fungible.rs | 252 +++++---- .../src/weights/cumulus_pallet_xcmp_queue.rs | 30 +- .../src/weights/frame_system.rs | 74 +-- .../src/weights/pallet_alliance.rs | 202 +++---- .../src/weights/pallet_asset_rate.rs | 31 +- .../src/weights/pallet_balances.rs | 64 ++- .../src/weights/pallet_collator_selection.rs | 104 ++-- .../src/weights/pallet_collective.rs | 148 ++--- .../src/weights/pallet_core_fellowship.rs | 62 +- .../src/weights/pallet_multisig.rs | 88 +-- .../src/weights/pallet_preimage.rs | 199 ++++--- .../src/weights/pallet_proxy.rs | 118 ++-- .../src/weights/pallet_ranked_collective.rs | 62 +- .../src/weights/pallet_referenda.rs | 158 +++--- .../src/weights/pallet_salary.rs | 58 +- .../src/weights/pallet_scheduler.rs | 100 ++-- .../src/weights/pallet_session.rs | 42 +- .../src/weights/pallet_timestamp.rs | 30 +- .../src/weights/pallet_utility.rs | 54 +- .../src/weights/pallet_xcm.rs | 98 ++-- 193 files changed, 8377 insertions(+), 12539 deletions(-) delete mode 100644 relay/kusama/src/weights/pallet_balances.rs delete mode 100644 relay/kusama/src/weights/pallet_collective_council.rs delete mode 100644 relay/kusama/src/weights/pallet_collective_technical_committee.rs delete mode 100644 relay/kusama/src/weights/pallet_democracy.rs delete mode 100644 relay/kusama/src/weights/pallet_elections_phragmen.rs delete mode 100644 relay/kusama/src/weights/pallet_membership.rs delete mode 100644 relay/kusama/src/weights/pallet_tips.rs delete mode 100644 relay/kusama/src/weights/pallet_xcm_benchmarks_fungible.rs delete mode 100644 relay/kusama/src/weights/pallet_xcm_benchmarks_generic.rs delete mode 100644 relay/polkadot/src/weights/pallet_collective_council.rs delete mode 100644 relay/polkadot/src/weights/pallet_collective_technical_committee.rs delete mode 100644 relay/polkadot/src/weights/pallet_democracy.rs delete mode 100644 relay/polkadot/src/weights/pallet_elections_phragmen.rs delete mode 100644 relay/polkadot/src/weights/pallet_membership.rs delete mode 100644 relay/polkadot/src/weights/pallet_tips.rs delete mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs delete mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index cc2e7a66b3..8792a14f6c 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -36,7 +36,7 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) { } fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubKusama::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); + AssetHubKusama::assert_dmp_queue_incomplete(Some(Error::WeightNotComputable)); } fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index 96c4358abd..5fe9d6b1f0 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -36,7 +36,7 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) { } fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubPolkadot::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); + AssetHubPolkadot::assert_dmp_queue_incomplete(Some(Error::WeightNotComputable)); } fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs index 8d2aec13bd..aadf41f823 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -45,7 +45,7 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( true, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(370_000_000, 7_000)), + Some(Weight::from_parts(254_182_000, 7_186)), ); assert_expected_events!( @@ -68,7 +68,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( false, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(235_000_000, 3_500)), + Some(Weight::from_parts(122_581_000, 3_593)), ); } diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs index 5969b8ac84..e55f1bbe9c 100644 --- a/integration-tests/emulated/common/src/impls.rs +++ b/integration-tests/emulated/common/src/impls.rs @@ -474,20 +474,14 @@ macro_rules! impl_assert_events_helpers_for_parachain { /// Asserts a XCM from Relay Chain is incompletely executed pub fn assert_dmp_queue_incomplete( - expected_weight: Option<$crate::impls::Weight>, expected_error: Option<$crate::impls::Error>, ) { $crate::impls::assert_expected_events!( Self, vec![ [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: $crate::impls::Outcome::Incomplete(weight, error), .. + outcome: $crate::impls::Outcome::Error(error), .. }) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), error: *error == expected_error.unwrap_or(*error), }, ] diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index ec693bfe2f..539fa8cafc 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -327,7 +327,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances::WeightInfo; + type WeightInfo = weights::pallet_balances_balances::WeightInfo; type FreezeIdentifier = RuntimeFreezeReason; type MaxFreezes = ConstU32<8>; type RuntimeHoldReason = RuntimeHoldReason; diff --git a/relay/kusama/src/weights/frame_benchmarking_baseline.rs b/relay/kusama/src/weights/frame_benchmarking_baseline.rs index 7cd564d7ed..799c721cc7 100644 --- a/relay/kusama/src/weights/frame_benchmarking_baseline.rs +++ b/relay/kusama/src/weights/frame_benchmarking_baseline.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_benchmarking::baseline -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,8 +56,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 141_000 picoseconds. - Weight::from_parts(182_446, 0) + // Minimum execution time: 176_000 picoseconds. + Weight::from_parts(222_859, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -59,8 +65,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 140_000 picoseconds. - Weight::from_parts(181_688, 0) + // Minimum execution time: 180_000 picoseconds. + Weight::from_parts(221_491, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -68,8 +74,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 140_000 picoseconds. - Weight::from_parts(178_127, 0) + // Minimum execution time: 182_000 picoseconds. + Weight::from_parts(230_303, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -77,16 +83,16 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 135_000 picoseconds. - Weight::from_parts(175_786, 0) + // Minimum execution time: 172_000 picoseconds. + Weight::from_parts(221_747, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_633_308_000 picoseconds. - Weight::from_parts(21_658_241_000, 0) + // Minimum execution time: 23_650_625_000 picoseconds. + Weight::from_parts(23_673_347_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -94,10 +100,10 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 176_000 picoseconds. - Weight::from_parts(2_627_074, 0) + // Minimum execution time: 222_000 picoseconds. + Weight::from_parts(2_393_539, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 6_117 - .saturating_add(Weight::from_parts(55_299_711, 0).saturating_mul(i.into())) + // Standard Error: 5_602 + .saturating_add(Weight::from_parts(54_833_106, 0).saturating_mul(i.into())) } } diff --git a/relay/kusama/src/weights/frame_election_provider_support.rs b/relay/kusama/src/weights/frame_election_provider_support.rs index 65173981c0..745e087d1e 100644 --- a/relay/kusama/src/weights/frame_election_provider_support.rs +++ b/relay/kusama/src/weights/frame_election_provider_support.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_election_provider_support -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,13 +58,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_339_278_000 picoseconds. - Weight::from_parts(6_431_084_000, 0) + // Minimum execution time: 6_736_004_000 picoseconds. + Weight::from_parts(6_831_324_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 134_006 - .saturating_add(Weight::from_parts(5_754_252, 0).saturating_mul(v.into())) - // Standard Error: 13_700_316 - .saturating_add(Weight::from_parts(1_424_664_173, 0).saturating_mul(d.into())) + // Standard Error: 138_494 + .saturating_add(Weight::from_parts(5_911_748, 0).saturating_mul(v.into())) + // Standard Error: 14_159_156 + .saturating_add(Weight::from_parts(1_406_526_309, 0).saturating_mul(d.into())) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. @@ -67,12 +73,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_326_658_000 picoseconds. - Weight::from_parts(4_390_844_000, 0) + // Minimum execution time: 4_606_100_000 picoseconds. + Weight::from_parts(4_689_124_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 118_967 - .saturating_add(Weight::from_parts(4_561_230, 0).saturating_mul(v.into())) - // Standard Error: 12_162_815 - .saturating_add(Weight::from_parts(1_340_777_050, 0).saturating_mul(d.into())) + // Standard Error: 122_337 + .saturating_add(Weight::from_parts(4_841_683, 0).saturating_mul(v.into())) + // Standard Error: 12_507_359 + .saturating_add(Weight::from_parts(1_343_800_901, 0).saturating_mul(d.into())) } } diff --git a/relay/kusama/src/weights/frame_system.rs b/relay/kusama/src/weights/frame_system.rs index f3bc385b95..7b91d447dd 100644 --- a/relay/kusama/src/weights/frame_system.rs +++ b/relay/kusama/src/weights/frame_system.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +56,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_794_000 picoseconds. - Weight::from_parts(691_547, 0) + // Minimum execution time: 1_804_000 picoseconds. + Weight::from_parts(1_300_161, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(386, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_475_000 picoseconds. - Weight::from_parts(58_654_048, 0) + // Minimum execution time: 5_267_000 picoseconds. + Weight::from_parts(5_426_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_656, 0).saturating_mul(b.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_608, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +81,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_393_000 picoseconds. - Weight::from_parts(3_660_000, 0) + // Minimum execution time: 3_008_000 picoseconds. + Weight::from_parts(3_316_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -89,8 +95,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 92_055_300_000 picoseconds. - Weight::from_parts(95_101_886_000, 0) + // Minimum execution time: 104_050_936_000 picoseconds. + Weight::from_parts(108_664_674_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -102,11 +108,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_887_000 picoseconds. - Weight::from_parts(1_964_000, 0) + // Minimum execution time: 1_833_000 picoseconds. + Weight::from_parts(1_925_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_853 - .saturating_add(Weight::from_parts(698_445, 0).saturating_mul(i.into())) + // Standard Error: 1_926 + .saturating_add(Weight::from_parts(752_115, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -116,11 +122,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_851_000 picoseconds. - Weight::from_parts(1_914_000, 0) + // Minimum execution time: 1_800_000 picoseconds. + Weight::from_parts(1_910_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 841 - .saturating_add(Weight::from_parts(524_502, 0).saturating_mul(i.into())) + // Standard Error: 890 + .saturating_add(Weight::from_parts(550_902, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -129,12 +135,12 @@ impl frame_system::WeightInfo for WeightInfo { fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `82 + p * (69 ±0)` - // Estimated: `86 + p * (70 ±0)` - // Minimum execution time: 3_570_000 picoseconds. - Weight::from_parts(3_691_000, 0) - .saturating_add(Weight::from_parts(0, 86)) - // Standard Error: 1_327 - .saturating_add(Weight::from_parts(1_165_480, 0).saturating_mul(p.into())) + // Estimated: `85 + p * (70 ±0)` + // Minimum execution time: 3_716_000 picoseconds. + Weight::from_parts(3_765_000, 0) + .saturating_add(Weight::from_parts(0, 85)) + // Standard Error: 1_737 + .saturating_add(Weight::from_parts(1_184_275, 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/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index 7c935b73e0..5e3b1d22b2 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -19,21 +19,16 @@ pub mod frame_election_provider_support; pub mod frame_system; pub mod pallet_asset_rate; pub mod pallet_bags_list; -pub mod pallet_balances; +pub mod pallet_balances_balances; pub mod pallet_balances_nis_counterpart_balances; pub mod pallet_bounties; pub mod pallet_child_bounties; -pub mod pallet_collective_council; -pub mod pallet_collective_technical_committee; pub mod pallet_conviction_voting; -pub mod pallet_democracy; pub mod pallet_election_provider_multi_phase; -pub mod pallet_elections_phragmen; pub mod pallet_fast_unstake; pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; -pub mod pallet_membership; pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nis; @@ -48,7 +43,6 @@ pub mod pallet_session; pub mod pallet_society; pub mod pallet_staking; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/relay/kusama/src/weights/pallet_asset_rate.rs b/relay/kusama/src/weights/pallet_asset_rate.rs index e6fbff6374..375859d372 100644 --- a/relay/kusama/src/weights/pallet_asset_rate.rs +++ b/relay/kusama/src/weights/pallet_asset_rate.rs @@ -17,24 +17,28 @@ //! Autogenerated weights for `pallet_asset_rate` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-03, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `cob`, CPU: `` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/debug/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=2 +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_asset_rate // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./runtime/kusama/src/weights/ -// --header=./file_header.txt +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,39 +51,39 @@ use core::marker::PhantomData; /// Weight functions for `pallet_asset_rate`. pub struct WeightInfo(PhantomData); impl pallet_asset_rate::WeightInfo for WeightInfo { - /// Storage: AssetRate ConversionRateToNative (r:1 w:1) - /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: // Measured: `42` - // Estimated: `4702` - // Minimum execution time: 53_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) - .saturating_add(Weight::from_parts(0, 4702)) + // Estimated: `4703` + // Minimum execution time: 10_397_000 picoseconds. + Weight::from_parts(10_865_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: AssetRate ConversionRateToNative (r:1 w:1) - /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) fn update() -> Weight { // Proof Size summary in bytes: - // Measured: `110` - // Estimated: `4702` - // Minimum execution time: 60_000_000 picoseconds. - Weight::from_parts(60_000_000, 0) - .saturating_add(Weight::from_parts(0, 4702)) + // Measured: `111` + // Estimated: `4703` + // Minimum execution time: 10_796_000 picoseconds. + Weight::from_parts(11_152_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: AssetRate ConversionRateToNative (r:1 w:1) - /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) fn remove() -> Weight { // Proof Size summary in bytes: - // Measured: `110` - // Estimated: `4702` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(74_000_000, 0) - .saturating_add(Weight::from_parts(0, 4702)) + // Measured: `111` + // Estimated: `4703` + // Minimum execution time: 11_395_000 picoseconds. + Weight::from_parts(11_920_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/kusama/src/weights/pallet_bags_list.rs b/relay/kusama/src/weights/pallet_bags_list.rs index 02f6dd0c6d..a616f69c2b 100644 --- a/relay/kusama/src/weights/pallet_bags_list.rs +++ b/relay/kusama/src/weights/pallet_bags_list.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_bags_list -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,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: `1654` + // Measured: `1722` // Estimated: `11506` - // Minimum execution time: 55_734_000 picoseconds. - Weight::from_parts(57_968_000, 0) + // Minimum execution time: 53_380_000 picoseconds. + Weight::from_parts(55_063_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -73,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: `1548` + // Measured: `1619` // Estimated: `8877` - // Minimum execution time: 53_675_000 picoseconds. - Weight::from_parts(56_246_000, 0) + // Minimum execution time: 52_348_000 picoseconds. + Weight::from_parts(53_150_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -93,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: `1857` + // Measured: `1925` // Estimated: `11506` - // Minimum execution time: 62_031_000 picoseconds. - Weight::from_parts(64_060_000, 0) + // Minimum execution time: 60_568_000 picoseconds. + Weight::from_parts(62_277_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/kusama/src/weights/pallet_balances.rs b/relay/kusama/src/weights/pallet_balances.rs deleted file mode 100644 index a8498f52f8..0000000000 --- a/relay/kusama/src/weights/pallet_balances.rs +++ /dev/null @@ -1,99 +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_balances` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_balances -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_balances`. -pub struct WeightInfo(PhantomData); -impl pallet_balances::WeightInfo for WeightInfo { - // Storage: System Account (r:1 w:1) - fn transfer_allow_death() -> Weight { - // Minimum execution time: 40_902 nanoseconds. - Weight::from_parts(41_638_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: System Account (r:1 w:1) - fn transfer_keep_alive() -> Weight { - // Minimum execution time: 30_093 nanoseconds. - Weight::from_parts(30_732_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: System Account (r:1 w:1) - fn force_set_balance_creating() -> Weight { - // Minimum execution time: 23_901 nanoseconds. - Weight::from_parts(24_238_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: System Account (r:1 w:1) - fn force_set_balance_killing() -> Weight { - // Minimum execution time: 26_402 nanoseconds. - Weight::from_parts(27_026_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: System Account (r:2 w:2) - fn force_transfer() -> Weight { - // Minimum execution time: 40_328 nanoseconds. - Weight::from_parts(41_242_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: System Account (r:1 w:1) - fn transfer_all() -> Weight { - // Minimum execution time: 35_401 nanoseconds. - Weight::from_parts(36_122_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: System Account (r:1 w:1) - fn force_unreserve() -> Weight { - // Minimum execution time: 20_178 nanoseconds. - Weight::from_parts(20_435_000 as u64, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - fn upgrade_accounts(_: u32) -> Weight { - Weight::from_parts(0, 0) - } -} diff --git a/relay/kusama/src/weights/pallet_balances_balances.rs b/relay/kusama/src/weights/pallet_balances_balances.rs index f1b1ac0bfc..fc835945d4 100644 --- a/relay/kusama/src/weights/pallet_balances_balances.rs +++ b/relay/kusama/src/weights/pallet_balances_balances.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 48_573_000 picoseconds. - Weight::from_parts(50_094_000, 0) + // Minimum execution time: 44_547_000 picoseconds. + Weight::from_parts(45_649_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +69,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_868_000 picoseconds. - Weight::from_parts(38_274_000, 0) + // Minimum execution time: 34_881_000 picoseconds. + Weight::from_parts(35_648_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,8 +81,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_897_000 picoseconds. - Weight::from_parts(14_535_000, 0) + // Minimum execution time: 12_730_000 picoseconds. + Weight::from_parts(13_130_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -87,8 +93,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 20_665_000 picoseconds. - Weight::from_parts(21_264_000, 0) + // Minimum execution time: 17_400_000 picoseconds. + Weight::from_parts(18_055_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,8 +105,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 50_296_000 picoseconds. - Weight::from_parts(52_038_000, 0) + // Minimum execution time: 45_950_000 picoseconds. + Weight::from_parts(47_055_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,8 +117,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 45_583_000 picoseconds. - Weight::from_parts(47_876_000, 0) + // Minimum execution time: 43_493_000 picoseconds. + Weight::from_parts(44_508_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -123,8 +129,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 16_067_000 picoseconds. - Weight::from_parts(16_860_000, 0) + // Minimum execution time: 15_555_000 picoseconds. + Weight::from_parts(16_040_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -137,11 +143,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: 15_298_000 picoseconds. - Weight::from_parts(15_600_000, 0) + // Minimum execution time: 14_854_000 picoseconds. + Weight::from_parts(15_004_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 7_506 - .saturating_add(Weight::from_parts(13_822_795, 0).saturating_mul(u.into())) + // Standard Error: 9_575 + .saturating_add(Weight::from_parts(13_519_567, 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/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs b/relay/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs index d1850f9bda..9f14c6ce74 100644 --- a/relay/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs +++ b/relay/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6164` - // Minimum execution time: 48_326_000 picoseconds. - Weight::from_parts(50_201_000, 0) + // Minimum execution time: 42_467_000 picoseconds. + Weight::from_parts(43_354_000, 0) .saturating_add(Weight::from_parts(0, 6164)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -67,8 +73,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6164` - // Minimum execution time: 35_533_000 picoseconds. - Weight::from_parts(37_055_000, 0) + // Minimum execution time: 32_477_000 picoseconds. + Weight::from_parts(33_478_000, 0) .saturating_add(Weight::from_parts(0, 6164)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,8 +85,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3577` - // Minimum execution time: 11_497_000 picoseconds. - Weight::from_parts(11_973_000, 0) + // Minimum execution time: 10_233_000 picoseconds. + Weight::from_parts(10_532_000, 0) .saturating_add(Weight::from_parts(0, 3577)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -93,8 +99,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3593` - // Minimum execution time: 20_340_000 picoseconds. - Weight::from_parts(20_862_000, 0) + // Minimum execution time: 16_813_000 picoseconds. + Weight::from_parts(17_301_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -107,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `6196` - // Minimum execution time: 49_727_000 picoseconds. - Weight::from_parts(51_600_000, 0) + // Minimum execution time: 43_323_000 picoseconds. + Weight::from_parts(44_459_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -121,8 +127,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6164` - // Minimum execution time: 44_260_000 picoseconds. - Weight::from_parts(46_378_000, 0) + // Minimum execution time: 41_133_000 picoseconds. + Weight::from_parts(42_324_000, 0) .saturating_add(Weight::from_parts(0, 6164)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -135,8 +141,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3593` - // Minimum execution time: 16_499_000 picoseconds. - Weight::from_parts(17_124_000, 0) + // Minimum execution time: 15_321_000 picoseconds. + Weight::from_parts(15_818_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -151,11 +157,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (256 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 15_985_000 picoseconds. - Weight::from_parts(16_500_000, 0) + // Minimum execution time: 14_670_000 picoseconds. + Weight::from_parts(15_163_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 16_209 - .saturating_add(Weight::from_parts(15_705_003, 0).saturating_mul(u.into())) + // Standard Error: 21_875 + .saturating_add(Weight::from_parts(15_226_945, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) diff --git a/relay/kusama/src/weights/pallet_bounties.rs b/relay/kusama/src/weights/pallet_bounties.rs index ba9a6f48c6..56845f751d 100644 --- a/relay/kusama/src/weights/pallet_bounties.rs +++ b/relay/kusama/src/weights/pallet_bounties.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_bounties -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,11 +64,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `210` // Estimated: `3593` - // Minimum execution time: 25_824_000 picoseconds. - Weight::from_parts(27_588_647, 0) + // Minimum execution time: 21_913_000 picoseconds. + Weight::from_parts(22_966_313, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(685, 0).saturating_mul(d.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(715, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -74,8 +80,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `302` // Estimated: `3642` - // Minimum execution time: 9_443_000 picoseconds. - Weight::from_parts(9_849_000, 0) + // Minimum execution time: 11_467_000 picoseconds. + Weight::from_parts(12_002_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -86,8 +92,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `322` // Estimated: `3642` - // Minimum execution time: 8_377_000 picoseconds. - Weight::from_parts(8_804_000, 0) + // Minimum execution time: 11_259_000 picoseconds. + Weight::from_parts(11_725_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -100,8 +106,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `498` // Estimated: `3642` - // Minimum execution time: 40_781_000 picoseconds. - Weight::from_parts(41_726_000, 0) + // Minimum execution time: 36_791_000 picoseconds. + Weight::from_parts(38_005_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -114,8 +120,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `494` // Estimated: `3642` - // Minimum execution time: 27_635_000 picoseconds. - Weight::from_parts(28_358_000, 0) + // Minimum execution time: 27_340_000 picoseconds. + Weight::from_parts(28_068_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -128,8 +134,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `438` // Estimated: `3642` - // Minimum execution time: 20_083_000 picoseconds. - Weight::from_parts(20_634_000, 0) + // Minimum execution time: 17_495_000 picoseconds. + Weight::from_parts(18_215_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -146,8 +152,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `802` // Estimated: `8799` - // Minimum execution time: 113_955_000 picoseconds. - Weight::from_parts(115_980_000, 0) + // Minimum execution time: 98_597_000 picoseconds. + Weight::from_parts(101_091_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) @@ -164,8 +170,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `482` // Estimated: `3642` - // Minimum execution time: 45_435_000 picoseconds. - Weight::from_parts(46_404_000, 0) + // Minimum execution time: 38_842_000 picoseconds. + Weight::from_parts(39_866_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -182,8 +188,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `718` // Estimated: `6196` - // Minimum execution time: 75_690_000 picoseconds. - Weight::from_parts(77_669_000, 0) + // Minimum execution time: 68_274_000 picoseconds. + Weight::from_parts(69_184_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -194,8 +200,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `358` // Estimated: `3642` - // Minimum execution time: 13_491_000 picoseconds. - Weight::from_parts(14_370_000, 0) + // Minimum execution time: 11_540_000 picoseconds. + Weight::from_parts(11_942_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -211,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: 4_155_000 picoseconds. - Weight::from_parts(4_292_000, 0) + // Minimum execution time: 2_815_000 picoseconds. + Weight::from_parts(2_960_000, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 13_183 - .saturating_add(Weight::from_parts(39_064_582, 0).saturating_mul(b.into())) + // Standard Error: 14_707 + .saturating_add(Weight::from_parts(32_310_700, 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/kusama/src/weights/pallet_child_bounties.rs b/relay/kusama/src/weights/pallet_child_bounties.rs index 386e97964f..6183475363 100644 --- a/relay/kusama/src/weights/pallet_child_bounties.rs +++ b/relay/kusama/src/weights/pallet_child_bounties.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_child_bounties -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -62,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_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_collective -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: Council Members (r:1 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:100 w:100) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `19164 + m * (7799 ±17) + p * (10110 ±17)` - // Minimum execution time: 17_032_000 picoseconds. - Weight::from_parts(17_263_000, 0) - .saturating_add(Weight::from_parts(0, 19164)) - // Standard Error: 51_363 - .saturating_add(Weight::from_parts(5_779_193, 0).saturating_mul(m.into())) - // Standard Error: 51_363 - .saturating_add(Weight::from_parts(8_434_866, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 7799).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 10110).saturating_mul(p.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `136 + m * (32 ±0)` - // Estimated: `1622 + m * (32 ±0)` - // Minimum execution time: 15_686_000 picoseconds. - Weight::from_parts(15_185_500, 0) - .saturating_add(Weight::from_parts(0, 1622)) - // Standard Error: 26 - .saturating_add(Weight::from_parts(1_363, 0).saturating_mul(b.into())) - // Standard Error: 277 - .saturating_add(Weight::from_parts(15_720, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:0) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `136 + m * (32 ±0)` - // Estimated: `5224 + m * (64 ±0)` - // Minimum execution time: 18_314_000 picoseconds. - Weight::from_parts(17_659_522, 0) - .saturating_add(Weight::from_parts(0, 5224)) - // Standard Error: 22 - .saturating_add(Weight::from_parts(1_153, 0).saturating_mul(b.into())) - // Standard Error: 237 - .saturating_add(Weight::from_parts(25_439, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalCount (r:1 w:1) - /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `426 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `9685 + m * (165 ±0) + p * (180 ±0)` - // Minimum execution time: 23_916_000 picoseconds. - Weight::from_parts(25_192_989, 0) - .saturating_add(Weight::from_parts(0, 9685)) - // Standard Error: 50 - .saturating_add(Weight::from_parts(2_327, 0).saturating_mul(b.into())) - // Standard Error: 528 - .saturating_add(Weight::from_parts(17_763, 0).saturating_mul(m.into())) - // Standard Error: 522 - .saturating_add(Weight::from_parts(116_903, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `875 + m * (64 ±0)` - // Estimated: `6698 + m * (128 ±0)` - // Minimum execution time: 21_641_000 picoseconds. - Weight::from_parts(22_373_888, 0) - .saturating_add(Weight::from_parts(0, 6698)) - // Standard Error: 299 - .saturating_add(Weight::from_parts(41_168, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `464 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `8211 + m * (260 ±0) + p * (144 ±0)` - // Minimum execution time: 26_158_000 picoseconds. - Weight::from_parts(27_675_242, 0) - .saturating_add(Weight::from_parts(0, 8211)) - // Standard Error: 845 - .saturating_add(Weight::from_parts(10_799, 0).saturating_mul(m.into())) - // Standard Error: 824 - .saturating_add(Weight::from_parts(141_199, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `766 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `12372 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)` - // Minimum execution time: 37_601_000 picoseconds. - Weight::from_parts(41_302_278, 0) - .saturating_add(Weight::from_parts(0, 12372)) - // Standard Error: 67 - .saturating_add(Weight::from_parts(1_608, 0).saturating_mul(b.into())) - // Standard Error: 716 - .saturating_add(Weight::from_parts(14_628, 0).saturating_mul(m.into())) - // Standard Error: 698 - .saturating_add(Weight::from_parts(129_997, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `484 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `10240 + m * (325 ±0) + p * (180 ±0)` - // Minimum execution time: 29_185_000 picoseconds. - Weight::from_parts(30_594_183, 0) - .saturating_add(Weight::from_parts(0, 10240)) - // Standard Error: 865 - .saturating_add(Weight::from_parts(30_165, 0).saturating_mul(m.into())) - // Standard Error: 844 - .saturating_add(Weight::from_parts(131_623, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `786 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `14575 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)` - // Minimum execution time: 43_157_000 picoseconds. - Weight::from_parts(43_691_874, 0) - .saturating_add(Weight::from_parts(0, 14575)) - // Standard Error: 61 - .saturating_add(Weight::from_parts(1_862, 0).saturating_mul(b.into())) - // Standard Error: 654 - .saturating_add(Weight::from_parts(17_183, 0).saturating_mul(m.into())) - // Standard Error: 638 - .saturating_add(Weight::from_parts(133_193, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into())) - } - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `293 + p * (32 ±0)` - // Estimated: `2364 + p * (96 ±0)` - // Minimum execution time: 14_666_000 picoseconds. - Weight::from_parts(16_623_386, 0) - .saturating_add(Weight::from_parts(0, 2364)) - // Standard Error: 430 - .saturating_add(Weight::from_parts(111_461, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into())) - } -} diff --git a/relay/kusama/src/weights/pallet_collective_technical_committee.rs b/relay/kusama/src/weights/pallet_collective_technical_committee.rs deleted file mode 100644 index 0bf5d2839b..0000000000 --- a/relay/kusama/src/weights/pallet_collective_technical_committee.rs +++ /dev/null @@ -1,322 +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_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_collective -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: TechnicalCommittee Members (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:100 w:100) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `19320 + m * (7799 ±16) + p * (10110 ±16)` - // Minimum execution time: 17_755_000 picoseconds. - Weight::from_parts(18_022_000, 0) - .saturating_add(Weight::from_parts(0, 19320)) - // Standard Error: 48_475 - .saturating_add(Weight::from_parts(5_505_299, 0).saturating_mul(m.into())) - // Standard Error: 48_475 - .saturating_add(Weight::from_parts(8_260_850, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 7799).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 10110).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `175 + m * (32 ±0)` - // Estimated: `1661 + m * (32 ±0)` - // Minimum execution time: 16_765_000 picoseconds. - Weight::from_parts(15_653_912, 0) - .saturating_add(Weight::from_parts(0, 1661)) - // Standard Error: 25 - .saturating_add(Weight::from_parts(1_539, 0).saturating_mul(b.into())) - // Standard Error: 261 - .saturating_add(Weight::from_parts(17_896, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:0) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `175 + m * (32 ±0)` - // Estimated: `5302 + m * (64 ±0)` - // Minimum execution time: 19_194_000 picoseconds. - Weight::from_parts(18_366_867, 0) - .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(1_342, 0).saturating_mul(b.into())) - // Standard Error: 200 - .saturating_add(Weight::from_parts(22_738, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalCount (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `465 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `9880 + m * (165 ±0) + p * (180 ±0)` - // Minimum execution time: 24_958_000 picoseconds. - Weight::from_parts(25_925_520, 0) - .saturating_add(Weight::from_parts(0, 9880)) - // Standard Error: 54 - .saturating_add(Weight::from_parts(2_430, 0).saturating_mul(b.into())) - // Standard Error: 570 - .saturating_add(Weight::from_parts(17_303, 0).saturating_mul(m.into())) - // Standard Error: 563 - .saturating_add(Weight::from_parts(119_736, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `914 + m * (64 ±0)` - // Estimated: `6776 + m * (128 ±0)` - // Minimum execution time: 22_620_000 picoseconds. - Weight::from_parts(23_356_968, 0) - .saturating_add(Weight::from_parts(0, 6776)) - // Standard Error: 273 - .saturating_add(Weight::from_parts(40_919, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `503 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `8367 + m * (260 ±0) + p * (144 ±0)` - // Minimum execution time: 27_667_000 picoseconds. - Weight::from_parts(29_094_490, 0) - .saturating_add(Weight::from_parts(0, 8367)) - // Standard Error: 842 - .saturating_add(Weight::from_parts(25_691, 0).saturating_mul(m.into())) - // Standard Error: 821 - .saturating_add(Weight::from_parts(133_244, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `805 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `12528 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)` - // Minimum execution time: 41_678_000 picoseconds. - Weight::from_parts(42_218_269, 0) - .saturating_add(Weight::from_parts(0, 12528)) - // Standard Error: 59 - .saturating_add(Weight::from_parts(1_661, 0).saturating_mul(b.into())) - // Standard Error: 624 - .saturating_add(Weight::from_parts(16_946, 0).saturating_mul(m.into())) - // Standard Error: 608 - .saturating_add(Weight::from_parts(129_170, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `523 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `10435 + m * (325 ±0) + p * (180 ±0)` - // Minimum execution time: 30_447_000 picoseconds. - Weight::from_parts(32_661_910, 0) - .saturating_add(Weight::from_parts(0, 10435)) - // Standard Error: 531 - .saturating_add(Weight::from_parts(29_960, 0).saturating_mul(m.into())) - // Standard Error: 517 - .saturating_add(Weight::from_parts(120_475, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `825 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `14770 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)` - // Minimum execution time: 44_068_000 picoseconds. - Weight::from_parts(44_673_420, 0) - .saturating_add(Weight::from_parts(0, 14770)) - // Standard Error: 59 - .saturating_add(Weight::from_parts(1_779, 0).saturating_mul(b.into())) - // Standard Error: 625 - .saturating_add(Weight::from_parts(17_794, 0).saturating_mul(m.into())) - // Standard Error: 609 - .saturating_add(Weight::from_parts(134_062, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `332 + p * (32 ±0)` - // Estimated: `2481 + p * (96 ±0)` - // Minimum execution time: 15_528_000 picoseconds. - Weight::from_parts(17_434_864, 0) - .saturating_add(Weight::from_parts(0, 2481)) - // Standard Error: 405 - .saturating_add(Weight::from_parts(111_909, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into())) - } -} diff --git a/relay/kusama/src/weights/pallet_conviction_voting.rs b/relay/kusama/src/weights/pallet_conviction_voting.rs index 9cbf82d340..e5b55ac3d6 100644 --- a/relay/kusama/src/weights/pallet_conviction_voting.rs +++ b/relay/kusama/src/weights/pallet_conviction_voting.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_conviction_voting -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,15 +60,15 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:1 w:1) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: - // Measured: `13445` + // Measured: `13479` // Estimated: `42428` - // Minimum execution time: 133_083_000 picoseconds. - Weight::from_parts(138_472_000, 0) + // Minimum execution time: 124_791_000 picoseconds. + Weight::from_parts(146_174_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -76,15 +82,15 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:2 w:2) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: - // Measured: `14166` + // Measured: `14200` // Estimated: `83866` - // Minimum execution time: 196_626_000 picoseconds. - Weight::from_parts(208_107_000, 0) + // Minimum execution time: 189_562_000 picoseconds. + Weight::from_parts(218_076_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -99,8 +105,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13918` // Estimated: `83866` - // Minimum execution time: 170_336_000 picoseconds. - Weight::from_parts(178_672_000, 0) + // Minimum execution time: 171_990_000 picoseconds. + Weight::from_parts(192_363_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -113,8 +119,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13005` // Estimated: `30706` - // Minimum execution time: 77_989_000 picoseconds. - Weight::from_parts(81_826_000, 0) + // Minimum execution time: 73_343_000 picoseconds. + Weight::from_parts(89_489_000, 0) .saturating_add(Weight::from_parts(0, 30706)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -130,17 +136,17 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 512]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `29640 + r * (365 ±0)` + // Measured: `29674 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 66_375_000 picoseconds. - Weight::from_parts(1_660_796_858, 0) + // Minimum execution time: 68_221_000 picoseconds. + Weight::from_parts(1_715_991_661, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 143_238 - .saturating_add(Weight::from_parts(39_100_130, 0).saturating_mul(r.into())) + // Standard Error: 156_851 + .saturating_add(Weight::from_parts(43_155_748, 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)) @@ -158,11 +164,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `29555 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 44_850_000 picoseconds. - Weight::from_parts(1_595_379_097, 0) + // Minimum execution time: 38_939_000 picoseconds. + Weight::from_parts(1_658_364_718, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 140_352 - .saturating_add(Weight::from_parts(39_176_354, 0).saturating_mul(r.into())) + // Standard Error: 152_890 + .saturating_add(Weight::from_parts(43_287_259, 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)) @@ -176,13 +182,13 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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: 98_466_000 picoseconds. - Weight::from_parts(102_780_000, 0) + // Minimum execution time: 96_189_000 picoseconds. + Weight::from_parts(113_746_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/kusama/src/weights/pallet_democracy.rs b/relay/kusama/src/weights/pallet_democracy.rs deleted file mode 100644 index 794c8c8159..0000000000 --- a/relay/kusama/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,513 +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_democracy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_democracy -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_democracy`. -pub struct WeightInfo(PhantomData); -impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: Democracy PublicPropCount (r:1 w:1) - /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:0 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - fn propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `4768` - // Estimated: `26379` - // Minimum execution time: 35_098_000 picoseconds. - Weight::from_parts(35_696_000, 0) - .saturating_add(Weight::from_parts(0, 26379)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - fn second() -> Weight { - // Proof Size summary in bytes: - // Measured: `3523` - // Estimated: `6695` - // Minimum execution time: 32_218_000 picoseconds. - Weight::from_parts(32_458_000, 0) - .saturating_add(Weight::from_parts(0, 6695)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - fn vote_new() -> Weight { - // Proof Size summary in bytes: - // Measured: `3437` - // Estimated: `15690` - // Minimum execution time: 46_641_000 picoseconds. - Weight::from_parts(47_324_000, 0) - .saturating_add(Weight::from_parts(0, 15690)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - fn vote_existing() -> Weight { - // Proof Size summary in bytes: - // Measured: `3459` - // Estimated: `15690` - // Minimum execution time: 47_172_000 picoseconds. - Weight::from_parts(47_732_000, 0) - .saturating_add(Weight::from_parts(0, 15690)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Cancellations (r:1 w:1) - /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn emergency_cancel() -> Weight { - // Proof Size summary in bytes: - // Measured: `333` - // Estimated: `10682` - // Minimum execution time: 25_744_000 picoseconds. - Weight::from_parts(26_226_000, 0) - .saturating_add(Weight::from_parts(0, 10682)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:3 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:0 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - fn blacklist() -> Weight { - // Proof Size summary in bytes: - // Measured: `5877` - // Estimated: `42332` - // Minimum execution time: 88_365_000 picoseconds. - Weight::from_parts(90_080_000, 0) - .saturating_add(Weight::from_parts(0, 42332)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - fn external_propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `3383` - // Estimated: `8320` - // Minimum execution time: 12_868_000 picoseconds. - Weight::from_parts(13_178_000, 0) - .saturating_add(Weight::from_parts(0, 8320)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - fn external_propose_majority() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_714_000 picoseconds. - Weight::from_parts(3_895_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - fn external_propose_default() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_565_000 picoseconds. - Weight::from_parts(3_831_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:1) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:2) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - fn fast_track() -> Weight { - // Proof Size summary in bytes: - // Measured: `253` - // Estimated: `6624` - // Minimum execution time: 26_453_000 picoseconds. - Weight::from_parts(26_938_000, 0) - .saturating_add(Weight::from_parts(0, 6624)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn veto_external() -> Weight { - // Proof Size summary in bytes: - // Measured: `3486` - // Estimated: `11838` - // Minimum execution time: 30_869_000 picoseconds. - Weight::from_parts(31_397_000, 0) - .saturating_add(Weight::from_parts(0, 11838)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn cancel_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `5788` - // Estimated: `31993` - // Minimum execution time: 72_692_000 picoseconds. - Weight::from_parts(73_692_000, 0) - .saturating_add(Weight::from_parts(0, 31993)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - fn cancel_referendum() -> Weight { - // Proof Size summary in bytes: - // Measured: `238` - // Estimated: `3518` - // Minimum execution time: 19_506_000 picoseconds. - Weight::from_parts(19_823_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + r * (86 ±0)` - // Estimated: `3968 + r * (2676 ±0)` - // Minimum execution time: 6_019_000 picoseconds. - Weight::from_parts(9_632_674, 0) - .saturating_add(Weight::from_parts(0, 3968)) - // Standard Error: 6_651 - .saturating_add(Weight::from_parts(2_769_264, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy LastTabledWasExternal (r:1 w:0) - /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + r * (86 ±0)` - // Estimated: `25258 + r * (2676 ±0)` - // Minimum execution time: 9_143_000 picoseconds. - Weight::from_parts(12_247_629, 0) - .saturating_add(Weight::from_parts(0, 25258)) - // Standard Error: 6_077 - .saturating_add(Weight::from_parts(2_764_547, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy VotingOf (r:3 w:3) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn delegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `797 + r * (108 ±0)` - // Estimated: `25554 + r * (2676 ±0)` - // Minimum execution time: 41_153_000 picoseconds. - Weight::from_parts(42_787_487, 0) - .saturating_add(Weight::from_parts(0, 25554)) - // Standard Error: 7_883 - .saturating_add(Weight::from_parts(3_862_521, 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)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy VotingOf (r:2 w:2) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn undelegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `460 + r * (108 ±0)` - // Estimated: `14520 + r * (2676 ±0)` - // Minimum execution time: 20_767_000 picoseconds. - Weight::from_parts(21_768_239, 0) - .saturating_add(Weight::from_parts(0, 14520)) - // Standard Error: 9_791 - .saturating_add(Weight::from_parts(3_862_103, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy PublicProps (r:0 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - fn clear_public_proposals() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_663_000 picoseconds. - Weight::from_parts(3_798_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn unlock_remove(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `530` - // Estimated: `15617` - // Minimum execution time: 19_923_000 picoseconds. - Weight::from_parts(25_945_279, 0) - .saturating_add(Weight::from_parts(0, 15617)) - // Standard Error: 1_366 - .saturating_add(Weight::from_parts(22_003, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn unlock_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `531 + r * (22 ±0)` - // Estimated: `15617` - // Minimum execution time: 24_393_000 picoseconds. - Weight::from_parts(25_690_593, 0) - .saturating_add(Weight::from_parts(0, 15617)) - // Standard Error: 553 - .saturating_add(Weight::from_parts(59_042, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// The range of component `r` is `[1, 100]`. - fn remove_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `695 + r * (26 ±0)` - // Estimated: `10926` - // Minimum execution time: 15_551_000 picoseconds. - Weight::from_parts(17_809_948, 0) - .saturating_add(Weight::from_parts(0, 10926)) - // Standard Error: 1_907 - .saturating_add(Weight::from_parts(86_496, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// The range of component `r` is `[1, 100]`. - fn remove_other_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `695 + r * (26 ±0)` - // Estimated: `10926` - // Minimum execution time: 16_027_000 picoseconds. - Weight::from_parts(17_860_077, 0) - .saturating_add(Weight::from_parts(0, 10926)) - // Standard Error: 1_950 - .saturating_add(Weight::from_parts(87_722, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn set_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `323` - // Estimated: `5173` - // Minimum execution time: 17_551_000 picoseconds. - Weight::from_parts(17_776_000, 0) - .saturating_add(Weight::from_parts(0, 5173)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn clear_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `253` - // Estimated: `5135` - // Minimum execution time: 16_020_000 picoseconds. - Weight::from_parts(16_477_000, 0) - .saturating_add(Weight::from_parts(0, 5135)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn set_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `4855` - // Estimated: `21743` - // Minimum execution time: 33_144_000 picoseconds. - Weight::from_parts(33_457_000, 0) - .saturating_add(Weight::from_parts(0, 21743)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn clear_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `4789` - // Estimated: `21705` - // Minimum execution time: 31_022_000 picoseconds. - Weight::from_parts(31_534_000, 0) - .saturating_add(Weight::from_parts(0, 21705)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn set_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `144` - // Estimated: `3556` - // Minimum execution time: 14_512_000 picoseconds. - Weight::from_parts(14_769_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn clear_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `269` - // Estimated: `7184` - // Minimum execution time: 17_966_000 picoseconds. - Weight::from_parts(18_270_000, 0) - .saturating_add(Weight::from_parts(0, 7184)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/relay/kusama/src/weights/pallet_election_provider_multi_phase.rs b/relay/kusama/src/weights/pallet_election_provider_multi_phase.rs index a36ef0ad91..176da442bd 100644 --- a/relay/kusama/src/weights/pallet_election_provider_multi_phase.rs +++ b/relay/kusama/src/weights/pallet_election_provider_multi_phase.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_election_provider_multi_phase -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,35 +71,35 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `821` // Estimated: `3481` - // Minimum execution time: 19_685_000 picoseconds. - Weight::from_parts(20_365_000, 0) + // Minimum execution time: 17_098_000 picoseconds. + Weight::from_parts(17_919_000, 0) .saturating_add(Weight::from_parts(0, 3481)) .saturating_add(T::DbWeight::get().reads(8)) } - /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) - /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_open_signed() -> Weight { // Proof Size summary in bytes: // Measured: `80` // Estimated: `1565` - // Minimum execution time: 7_940_000 picoseconds. - Weight::from_parts(8_410_000, 0) + // Minimum execution time: 8_261_000 picoseconds. + Weight::from_parts(8_610_000, 0) .saturating_add(Weight::from_parts(0, 1565)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) - /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_open_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `80` // Estimated: `1565` - // Minimum execution time: 8_522_000 picoseconds. - Weight::from_parts(8_815_000, 0) + // Minimum execution time: 8_983_000 picoseconds. + Weight::from_parts(9_338_000, 0) .saturating_add(Weight::from_parts(0, 1565)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +112,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 26_955_000 picoseconds. - Weight::from_parts(27_755_000, 0) + // Minimum execution time: 22_468_000 picoseconds. + Weight::from_parts(23_038_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -118,8 +124,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 18_209_000 picoseconds. - Weight::from_parts(19_574_000, 0) + // Minimum execution time: 15_489_000 picoseconds. + Weight::from_parts(16_016_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,11 +142,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 640_266_000 picoseconds. - Weight::from_parts(59_371_643, 0) + // Minimum execution time: 638_166_000 picoseconds. + Weight::from_parts(85_170_117, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_341 - .saturating_add(Weight::from_parts(651_879, 0).saturating_mul(v.into())) + // Standard Error: 11_382 + .saturating_add(Weight::from_parts(737_436, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) @@ -167,11 +173,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `831 + a * (1152 ±0) + d * (47 ±0)` // Estimated: `4281 + a * (1152 ±0) + d * (48 ±0)` - // Minimum execution time: 512_122_000 picoseconds. - Weight::from_parts(544_460_000, 0) + // Minimum execution time: 476_398_000 picoseconds. + Weight::from_parts(559_140_000, 0) .saturating_add(Weight::from_parts(0, 4281)) - // Standard Error: 10_155 - .saturating_add(Weight::from_parts(567_970, 0).saturating_mul(a.into())) + // Standard Error: 10_849 + .saturating_add(Weight::from_parts(656_138, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 1152).saturating_mul(a.into())) @@ -181,20 +187,20 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0) /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) - /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1) /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1) /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit() -> Weight { // Proof Size summary in bytes: // Measured: `1169` // Estimated: `2654` - // Minimum execution time: 48_376_000 picoseconds. - Weight::from_parts(49_386_000, 0) + // Minimum execution time: 46_164_000 picoseconds. + Weight::from_parts(47_868_000, 0) .saturating_add(Weight::from_parts(0, 2654)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -221,11 +227,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `185 + t * (32 ±0) + v * (809 ±0)` // Estimated: `1670 + t * (32 ±0) + v * (809 ±0)` - // Minimum execution time: 8_166_223_000 picoseconds. - Weight::from_parts(8_230_462_000, 0) + // Minimum execution time: 8_302_223_000 picoseconds. + Weight::from_parts(8_584_119_000, 0) .saturating_add(Weight::from_parts(0, 1670)) - // Standard Error: 100_850 - .saturating_add(Weight::from_parts(9_115_530, 0).saturating_mul(a.into())) + // Standard Error: 103_987 + .saturating_add(Weight::from_parts(9_482_036, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) @@ -247,13 +253,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `160 + t * (32 ±0) + v * (809 ±0)` // Estimated: `1645 + t * (32 ±0) + v * (809 ±0)` - // Minimum execution time: 6_836_136_000 picoseconds. - Weight::from_parts(6_972_203_000, 0) + // Minimum execution time: 6_938_885_000 picoseconds. + Weight::from_parts(7_130_861_000, 0) .saturating_add(Weight::from_parts(0, 1645)) - // Standard Error: 23_658 - .saturating_add(Weight::from_parts(287_019, 0).saturating_mul(v.into())) - // Standard Error: 70_110 - .saturating_add(Weight::from_parts(5_844_438, 0).saturating_mul(a.into())) + // Standard Error: 26_716 + .saturating_add(Weight::from_parts(513_730, 0).saturating_mul(v.into())) + // Standard Error: 79_172 + .saturating_add(Weight::from_parts(5_544_565, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) .saturating_add(Weight::from_parts(0, 809).saturating_mul(v.into())) diff --git a/relay/kusama/src/weights/pallet_elections_phragmen.rs b/relay/kusama/src/weights/pallet_elections_phragmen.rs deleted file mode 100644 index a5c1c4dfd3..0000000000 --- a/relay/kusama/src/weights/pallet_elections_phragmen.rs +++ /dev/null @@ -1,303 +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_elections_phragmen` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_elections_phragmen -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_elections_phragmen`. -pub struct WeightInfo(PhantomData); -impl pallet_elections_phragmen::WeightInfo for WeightInfo { - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// The range of component `v` is `[1, 16]`. - fn vote_equal(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `403 + v * (80 ±0)` - // Estimated: `14292 + v * (320 ±0)` - // Minimum execution time: 27_353_000 picoseconds. - Weight::from_parts(28_103_445, 0) - .saturating_add(Weight::from_parts(0, 14292)) - // Standard Error: 4_556 - .saturating_add(Weight::from_parts(117_766, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// The range of component `v` is `[2, 16]`. - fn vote_more(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `371 + v * (80 ±0)` - // Estimated: `14164 + v * (320 ±0)` - // Minimum execution time: 36_885_000 picoseconds. - Weight::from_parts(37_769_975, 0) - .saturating_add(Weight::from_parts(0, 14164)) - // Standard Error: 6_586 - .saturating_add(Weight::from_parts(123_567, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// The range of component `v` is `[2, 16]`. - fn vote_less(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `403 + v * (80 ±0)` - // Estimated: `14292 + v * (320 ±0)` - // Minimum execution time: 36_610_000 picoseconds. - Weight::from_parts(37_524_808, 0) - .saturating_add(Weight::from_parts(0, 14292)) - // Standard Error: 6_164 - .saturating_add(Weight::from_parts(147_944, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - fn remove_voter() -> Weight { - // Proof Size summary in bytes: - // Measured: `925` - // Estimated: `9154` - // Minimum execution time: 33_052_000 picoseconds. - Weight::from_parts(33_677_000, 0) - .saturating_add(Weight::from_parts(0, 9154)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Candidates (r:1 w:1) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `c` is `[1, 1000]`. - fn submit_candidacy(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `2712 + c * (48 ±0)` - // Estimated: `12585 + c * (144 ±0)` - // Minimum execution time: 32_163_000 picoseconds. - Weight::from_parts(24_757_419, 0) - .saturating_add(Weight::from_parts(0, 12585)) - // Standard Error: 902 - .saturating_add(Weight::from_parts(79_765, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:1) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `c` is `[1, 1000]`. - fn renounce_candidacy_candidate(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `284 + c * (48 ±0)` - // Estimated: `1756 + c * (48 ±0)` - // Minimum execution time: 24_805_000 picoseconds. - Weight::from_parts(17_940_635, 0) - .saturating_add(Weight::from_parts(0, 1756)) - // Standard Error: 888 - .saturating_add(Weight::from_parts(59_369, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) - } - /// Storage: PhragmenElection Members (r:1 w:1) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn renounce_candidacy_members() -> Weight { - // Proof Size summary in bytes: - // Measured: `2986` - // Estimated: `20870` - // Minimum execution time: 42_908_000 picoseconds. - Weight::from_parts(43_409_000, 0) - .saturating_add(Weight::from_parts(0, 20870)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - fn renounce_candidacy_runners_up() -> Weight { - // Proof Size summary in bytes: - // Measured: `1681` - // Estimated: `3166` - // Minimum execution time: 27_419_000 picoseconds. - Weight::from_parts(27_912_000, 0) - .saturating_add(Weight::from_parts(0, 3166)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) - fn remove_member_without_replacement() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000_000_000 picoseconds. - Weight::from_parts(2_000_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: PhragmenElection Members (r:1 w:1) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn remove_member_with_replacement() -> Weight { - // Proof Size summary in bytes: - // Measured: `2986` - // Estimated: `24463` - // Minimum execution time: 57_465_000 picoseconds. - Weight::from_parts(58_107_000, 0) - .saturating_add(Weight::from_parts(0, 24463)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: PhragmenElection Voting (r:10001 w:10000) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Locks (r:10000 w:10000) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: System Account (r:10000 w:10000) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[0, 5000]`. - fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `35989 + v * (808 ±0)` - // Estimated: `154956 + v * (12084 ±0)` - // Minimum execution time: 319_677_473_000 picoseconds. - Weight::from_parts(320_382_361_000, 0) - .saturating_add(Weight::from_parts(0, 154956)) - // Standard Error: 270_292 - .saturating_add(Weight::from_parts(38_671_603, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) - .saturating_add(Weight::from_parts(0, 12084).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:1) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:1) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:10001 w:0) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:962 w:962) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: PhragmenElection ElectionRounds (r:1 w:1) - /// Proof Skipped: PhragmenElection ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `c` is `[1, 1000]`. - /// The range of component `v` is `[1, 10000]`. - /// The range of component `e` is `[10000, 160000]`. - fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + v * (607 ±0) + e * (28 ±0)` - // Estimated: `4839313 + v * (5481 ±4) + e * (123 ±0) + c * (2560 ±0)` - // Minimum execution time: 30_795_431_000 picoseconds. - Weight::from_parts(30_861_700_000, 0) - .saturating_add(Weight::from_parts(0, 4839313)) - // Standard Error: 482_348 - .saturating_add(Weight::from_parts(37_626_560, 0).saturating_mul(v.into())) - // Standard Error: 30_954 - .saturating_add(Weight::from_parts(2_016_889, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(265)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes(6)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 5481).saturating_mul(v.into())) - .saturating_add(Weight::from_parts(0, 123).saturating_mul(e.into())) - .saturating_add(Weight::from_parts(0, 2560).saturating_mul(c.into())) - } -} diff --git a/relay/kusama/src/weights/pallet_fast_unstake.rs b/relay/kusama/src/weights/pallet_fast_unstake.rs index 3afa826abe..a59140afe5 100644 --- a/relay/kusama/src/weights/pallet_fast_unstake.rs +++ b/relay/kusama/src/weights/pallet_fast_unstake.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_fast_unstake -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,32 +67,32 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::Bonded` (r:64 w:64) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:64 w:64) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:64 w:64) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:64 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:64 w:64) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Validators` (r:64 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:64 w:0) /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(814), added: 3289, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:64 w:64) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:64 w:64) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:64 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:0 w:64) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:64) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 64]`. fn on_idle_unstake(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1176 + b * (343 ±0)` + // Measured: `1445 + b * (446 ±0)` // Estimated: `4676 + b * (3774 ±0)` - // Minimum execution time: 78_478_000 picoseconds. - Weight::from_parts(27_009_228, 0) + // Minimum execution time: 84_806_000 picoseconds. + Weight::from_parts(12_997_657, 0) .saturating_add(Weight::from_parts(0, 4676)) - // Standard Error: 24_017 - .saturating_add(Weight::from_parts(49_101_227, 0).saturating_mul(b.into())) + // Standard Error: 43_184 + .saturating_add(Weight::from_parts(57_173_844, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(b.into()))) .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into())) @@ -109,15 +115,15 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// The range of component `b` is `[1, 64]`. fn on_idle_check(v: u32, b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1344 + b * (48 ±0) + v * (18487 ±0)` + // Measured: `1343 + b * (48 ±0) + v * (18488 ±0)` // Estimated: `4676 + b * (49 ±0) + v * (20963 ±0)` - // Minimum execution time: 1_534_306_000 picoseconds. - Weight::from_parts(1_541_283_000, 0) + // Minimum execution time: 1_588_135_000 picoseconds. + Weight::from_parts(1_602_326_000, 0) .saturating_add(Weight::from_parts(0, 4676)) - // Standard Error: 13_599_065 - .saturating_add(Weight::from_parts(435_603_417, 0).saturating_mul(v.into())) - // Standard Error: 54_411_406 - .saturating_add(Weight::from_parts(1_716_153_455, 0).saturating_mul(b.into())) + // Standard Error: 14_079_022 + .saturating_add(Weight::from_parts(450_479_229, 0).saturating_mul(v.into())) + // Standard Error: 56_331_772 + .saturating_add(Weight::from_parts(1_769_747_220, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -151,15 +157,15 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `FastUnstake::CounterForQueue` (r:1 w:1) /// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn register_fast_unstake() -> Weight { // Proof Size summary in bytes: - // Measured: `1826` + // Measured: `1987` // Estimated: `4764` - // Minimum execution time: 112_251_000 picoseconds. - Weight::from_parts(115_657_000, 0) + // Minimum execution time: 107_877_000 picoseconds. + Weight::from_parts(110_360_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(9)) @@ -176,10 +182,10 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn deregister() -> Weight { // Proof Size summary in bytes: - // Measured: `1084` + // Measured: `1118` // Estimated: `4676` - // Minimum execution time: 39_564_000 picoseconds. - Weight::from_parts(40_892_000, 0) + // Minimum execution time: 35_829_000 picoseconds. + Weight::from_parts(37_196_000, 0) .saturating_add(Weight::from_parts(0, 4676)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -190,8 +196,8 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_148_000 picoseconds. - Weight::from_parts(2_344_000, 0) + // Minimum execution time: 2_016_000 picoseconds. + Weight::from_parts(2_140_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/kusama/src/weights/pallet_identity.rs b/relay/kusama/src/weights/pallet_identity.rs index fd7cb64b59..46ec51a056 100644 --- a/relay/kusama/src/weights/pallet_identity.rs +++ b/relay/kusama/src/weights/pallet_identity.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_identity -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +58,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 10_306_000 picoseconds. - Weight::from_parts(11_081_804, 0) + // Minimum execution time: 7_797_000 picoseconds. + Weight::from_parts(8_494_920, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_449 - .saturating_add(Weight::from_parts(97_986, 0).saturating_mul(r.into())) + // Standard Error: 1_393 + .saturating_add(Weight::from_parts(86_525, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -68,13 +74,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `442 + r * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 30_040_000 picoseconds. - Weight::from_parts(28_019_917, 0) + // Minimum execution time: 28_473_000 picoseconds. + Weight::from_parts(25_981_122, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 3_839 - .saturating_add(Weight::from_parts(136_514, 0).saturating_mul(r.into())) - // Standard Error: 749 - .saturating_add(Weight::from_parts(377_730, 0).saturating_mul(x.into())) + // Standard Error: 3_669 + .saturating_add(Weight::from_parts(145_207, 0).saturating_mul(r.into())) + // Standard Error: 716 + .saturating_add(Weight::from_parts(451_168, 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: 8_459_000 picoseconds. - Weight::from_parts(20_340_743, 0) + // Minimum execution time: 8_400_000 picoseconds. + Weight::from_parts(18_763_082, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_565 - .saturating_add(Weight::from_parts(2_774_345, 0).saturating_mul(s.into())) + // Standard Error: 4_192 + .saturating_add(Weight::from_parts(3_158_583, 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: 8_166_000 picoseconds. - Weight::from_parts(22_648_274, 0) + // Minimum execution time: 8_171_000 picoseconds. + Weight::from_parts(21_567_656, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_705 - .saturating_add(Weight::from_parts(1_220_351, 0).saturating_mul(p.into())) + // Standard Error: 3_475 + .saturating_add(Weight::from_parts(1_335_522, 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()))) @@ -133,15 +139,15 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 51_060_000 picoseconds. - Weight::from_parts(33_751_930, 0) + // Minimum execution time: 51_919_000 picoseconds. + Weight::from_parts(27_861_193, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 10_812 - .saturating_add(Weight::from_parts(125_445, 0).saturating_mul(r.into())) - // Standard Error: 2_111 - .saturating_add(Weight::from_parts(1_185_329, 0).saturating_mul(s.into())) - // Standard Error: 2_111 - .saturating_add(Weight::from_parts(216_485, 0).saturating_mul(x.into())) + // Standard Error: 9_525 + .saturating_add(Weight::from_parts(178_396, 0).saturating_mul(r.into())) + // Standard Error: 1_860 + .saturating_add(Weight::from_parts(1_315_185, 0).saturating_mul(s.into())) + // Standard Error: 1_860 + .saturating_add(Weight::from_parts(262_283, 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()))) @@ -156,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: 31_969_000 picoseconds. - Weight::from_parts(30_134_963, 0) + // Minimum execution time: 29_757_000 picoseconds. + Weight::from_parts(27_710_481, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_914 - .saturating_add(Weight::from_parts(180_377, 0).saturating_mul(r.into())) - // Standard Error: 958 - .saturating_add(Weight::from_parts(394_600, 0).saturating_mul(x.into())) + // Standard Error: 4_038 + .saturating_add(Weight::from_parts(140_007, 0).saturating_mul(r.into())) + // Standard Error: 788 + .saturating_add(Weight::from_parts(476_213, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -174,13 +180,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398 + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 28_981_000 picoseconds. - Weight::from_parts(26_801_675, 0) + // Minimum execution time: 26_725_000 picoseconds. + Weight::from_parts(25_628_729, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 5_104 - .saturating_add(Weight::from_parts(173_029, 0).saturating_mul(r.into())) - // Standard Error: 996 - .saturating_add(Weight::from_parts(398_205, 0).saturating_mul(x.into())) + // Standard Error: 4_050 + .saturating_add(Weight::from_parts(119_572, 0).saturating_mul(r.into())) + // Standard Error: 790 + .saturating_add(Weight::from_parts(470_950, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -191,11 +197,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_226_000 picoseconds. - Weight::from_parts(6_760_342, 0) + // Minimum execution time: 5_600_000 picoseconds. + Weight::from_parts(5_985_348, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_108 - .saturating_add(Weight::from_parts(84_335, 0).saturating_mul(r.into())) + // Standard Error: 1_040 + .saturating_add(Weight::from_parts(76_293, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -206,11 +212,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_247_000 picoseconds. - Weight::from_parts(8_556_860, 0) + // Minimum execution time: 5_904_000 picoseconds. + Weight::from_parts(7_848_913, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 4_626 - .saturating_add(Weight::from_parts(119_699, 0).saturating_mul(r.into())) + // Standard Error: 4_336 + .saturating_add(Weight::from_parts(112_817, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -221,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_186_000 picoseconds. - Weight::from_parts(8_492_136, 0) + // Minimum execution time: 5_575_000 picoseconds. + Weight::from_parts(7_636_274, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 4_752 - .saturating_add(Weight::from_parts(126_547, 0).saturating_mul(r.into())) + // Standard Error: 4_507 + .saturating_add(Weight::from_parts(118_641, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -239,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_783_000 picoseconds. - Weight::from_parts(21_934_956, 0) + // Minimum execution time: 21_420_000 picoseconds. + Weight::from_parts(20_651_547, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 6_549 - .saturating_add(Weight::from_parts(149_851, 0).saturating_mul(r.into())) - // Standard Error: 1_211 - .saturating_add(Weight::from_parts(621_479, 0).saturating_mul(x.into())) + // Standard Error: 3_622 + .saturating_add(Weight::from_parts(111_414, 0).saturating_mul(r.into())) + // Standard Error: 670 + .saturating_add(Weight::from_parts(753_154, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -264,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: 68_389_000 picoseconds. - Weight::from_parts(48_392_841, 0) + // Minimum execution time: 67_698_000 picoseconds. + Weight::from_parts(39_381_426, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 10_770 - .saturating_add(Weight::from_parts(126_118, 0).saturating_mul(r.into())) - // Standard Error: 2_103 - .saturating_add(Weight::from_parts(1_207_563, 0).saturating_mul(s.into())) - // Standard Error: 2_103 - .saturating_add(Weight::from_parts(223_848, 0).saturating_mul(x.into())) + // Standard Error: 34_947 + .saturating_add(Weight::from_parts(219_037, 0).saturating_mul(r.into())) + // Standard Error: 6_824 + .saturating_add(Weight::from_parts(1_337_803, 0).saturating_mul(s.into())) + // Standard Error: 6_824 + .saturating_add(Weight::from_parts(285_260, 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()))) @@ -288,11 +294,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `475 + s * (36 ±0)` // Estimated: `11003` - // Minimum execution time: 26_269_000 picoseconds. - Weight::from_parts(32_462_454, 0) + // Minimum execution time: 23_630_000 picoseconds. + Weight::from_parts(29_776_973, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_617 - .saturating_add(Weight::from_parts(99_670, 0).saturating_mul(s.into())) + // Standard Error: 1_393 + .saturating_add(Weight::from_parts(91_167, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -305,11 +311,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `591 + s * (3 ±0)` // Estimated: `11003` - // Minimum execution time: 14_052_000 picoseconds. - Weight::from_parts(15_611_703, 0) + // Minimum execution time: 13_776_000 picoseconds. + Weight::from_parts(15_381_183, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 525 - .saturating_add(Weight::from_parts(36_465, 0).saturating_mul(s.into())) + // Standard Error: 480 + .saturating_add(Weight::from_parts(40_516, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -324,11 +330,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `638 + s * (35 ±0)` // Estimated: `11003` - // Minimum execution time: 32_185_000 picoseconds. - Weight::from_parts(34_325_496, 0) + // Minimum execution time: 29_080_000 picoseconds. + Weight::from_parts(31_439_643, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_052 - .saturating_add(Weight::from_parts(89_297, 0).saturating_mul(s.into())) + // Standard Error: 777 + .saturating_add(Weight::from_parts(82_088, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -343,11 +349,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `704 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 24_016_000 picoseconds. - Weight::from_parts(26_441_577, 0) + // Minimum execution time: 23_088_000 picoseconds. + Weight::from_parts(24_742_483, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 803 - .saturating_add(Weight::from_parts(72_799, 0).saturating_mul(s.into())) + // Standard Error: 669 + .saturating_add(Weight::from_parts(75_769, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/kusama/src/weights/pallet_im_online.rs b/relay/kusama/src/weights/pallet_im_online.rs index 4d2071d7a0..5db95d66f6 100644 --- a/relay/kusama/src/weights/pallet_im_online.rs +++ b/relay/kusama/src/weights/pallet_im_online.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_im_online -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,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: 82_876_000 picoseconds. - Weight::from_parts(105_397_267, 0) + // Minimum execution time: 79_478_000 picoseconds. + Weight::from_parts(98_448_476, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 747 - .saturating_add(Weight::from_parts(35_069, 0).saturating_mul(k.into())) + // Standard Error: 667 + .saturating_add(Weight::from_parts(37_721, 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/kusama/src/weights/pallet_indices.rs b/relay/kusama/src/weights/pallet_indices.rs index f584211585..920a6f8b6d 100644 --- a/relay/kusama/src/weights/pallet_indices.rs +++ b/relay/kusama/src/weights/pallet_indices.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_indices -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3534` - // Minimum execution time: 21_571_000 picoseconds. - Weight::from_parts(22_377_000, 0) + // Minimum execution time: 18_058_000 picoseconds. + Weight::from_parts(18_542_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +71,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 33_847_000 picoseconds. - Weight::from_parts(35_717_000, 0) + // Minimum execution time: 30_905_000 picoseconds. + Weight::from_parts(31_835_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -77,8 +83,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 22_744_000 picoseconds. - Weight::from_parts(23_566_000, 0) + // Minimum execution time: 19_638_000 picoseconds. + Weight::from_parts(20_064_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +97,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 24_757_000 picoseconds. - Weight::from_parts(25_439_000, 0) + // Minimum execution time: 21_276_000 picoseconds. + Weight::from_parts(21_858_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -103,8 +109,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 24_273_000 picoseconds. - Weight::from_parts(25_138_000, 0) + // Minimum execution time: 20_219_000 picoseconds. + Weight::from_parts(20_782_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/kusama/src/weights/pallet_membership.rs b/relay/kusama/src/weights/pallet_membership.rs deleted file mode 100644 index 6b144bc879..0000000000 --- a/relay/kusama/src/weights/pallet_membership.rs +++ /dev/null @@ -1,202 +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_membership` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_membership -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_membership`. -pub struct WeightInfo(PhantomData); -impl pallet_membership::WeightInfo for WeightInfo { - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 99]`. - fn add_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `208 + m * (64 ±0)` - // Estimated: `6793 + m * (192 ±0)` - // Minimum execution time: 15_847_000 picoseconds. - Weight::from_parts(16_597_325, 0) - .saturating_add(Weight::from_parts(0, 6793)) - // Standard Error: 411 - .saturating_add(Weight::from_parts(35_801, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:0) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[2, 100]`. - fn remove_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `312 + m * (64 ±0)` - // Estimated: `8622 + m * (192 ±0)` - // Minimum execution time: 18_412_000 picoseconds. - Weight::from_parts(19_251_698, 0) - .saturating_add(Weight::from_parts(0, 8622)) - // Standard Error: 474 - .saturating_add(Weight::from_parts(32_206, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:0) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[2, 100]`. - fn swap_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `312 + m * (64 ±0)` - // Estimated: `8622 + m * (192 ±0)` - // Minimum execution time: 18_502_000 picoseconds. - Weight::from_parts(19_583_888, 0) - .saturating_add(Weight::from_parts(0, 8622)) - // Standard Error: 619 - .saturating_add(Weight::from_parts(44_408, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:0) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn reset_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `312 + m * (64 ±0)` - // Estimated: `8622 + m * (192 ±0)` - // Minimum execution time: 18_088_000 picoseconds. - Weight::from_parts(19_292_324, 0) - .saturating_add(Weight::from_parts(0, 8622)) - // Standard Error: 759 - .saturating_add(Weight::from_parts(162_348, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:1) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn change_key(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `312 + m * (64 ±0)` - // Estimated: `8622 + m * (192 ±0)` - // Minimum execution time: 19_134_000 picoseconds. - Weight::from_parts(20_242_466, 0) - .saturating_add(Weight::from_parts(0, 8622)) - // Standard Error: 962 - .saturating_add(Weight::from_parts(47_779, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:0) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalMembership Prime (r:0 w:1) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn set_prime(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `32 + m * (32 ±0)` - // Estimated: `4719 + m * (32 ±0)` - // Minimum execution time: 6_726_000 picoseconds. - Weight::from_parts(6_966_055, 0) - .saturating_add(Weight::from_parts(0, 4719)) - // Standard Error: 255 - .saturating_add(Weight::from_parts(13_950, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Prime (r:0 w:1) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn clear_prime(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_010_000 picoseconds. - Weight::from_parts(3_196_429, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 78 - .saturating_add(Weight::from_parts(471, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/relay/kusama/src/weights/pallet_message_queue.rs b/relay/kusama/src/weights/pallet_message_queue.rs index 155fff9125..3575502c48 100644 --- a/relay/kusama/src/weights/pallet_message_queue.rs +++ b/relay/kusama/src/weights/pallet_message_queue.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_message_queue -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 12_892_000 picoseconds. - Weight::from_parts(13_378_000, 0) + // Minimum execution time: 12_588_000 picoseconds. + Weight::from_parts(13_158_000, 0) .saturating_add(Weight::from_parts(0, 6050)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +73,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 12_121_000 picoseconds. - Weight::from_parts(12_575_000, 0) + // Minimum execution time: 11_160_000 picoseconds. + Weight::from_parts(11_690_000, 0) .saturating_add(Weight::from_parts(0, 6050)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,8 +85,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `42` // Estimated: `3520` - // Minimum execution time: 3_553_000 picoseconds. - Weight::from_parts(3_829_000, 0) + // Minimum execution time: 3_826_000 picoseconds. + Weight::from_parts(4_044_000, 0) .saturating_add(Weight::from_parts(0, 3520)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +97,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 5_399_000 picoseconds. - Weight::from_parts(5_646_000, 0) + // Minimum execution time: 5_518_000 picoseconds. + Weight::from_parts(5_787_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -103,8 +109,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 5_416_000 picoseconds. - Weight::from_parts(5_663_000, 0) + // Minimum execution time: 5_467_000 picoseconds. + Weight::from_parts(5_903_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -113,8 +119,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 92_498_000 picoseconds. - Weight::from_parts(93_426_000, 0) + // Minimum execution time: 91_065_000 picoseconds. + Weight::from_parts(91_677_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) @@ -125,8 +131,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `220` // Estimated: `3520` - // Minimum execution time: 9_329_000 picoseconds. - Weight::from_parts(9_579_000, 0) + // Minimum execution time: 8_625_000 picoseconds. + Weight::from_parts(9_076_000, 0) .saturating_add(Weight::from_parts(0, 3520)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -143,8 +149,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 56_363_000 picoseconds. - Weight::from_parts(58_243_000, 0) + // Minimum execution time: 55_504_000 picoseconds. + Weight::from_parts(56_531_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -161,8 +167,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 71_451_000 picoseconds. - Weight::from_parts(73_146_000, 0) + // Minimum execution time: 70_788_000 picoseconds. + Weight::from_parts(71_479_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -179,8 +185,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 112_064_000 picoseconds. - Weight::from_parts(114_022_000, 0) + // Minimum execution time: 113_713_000 picoseconds. + Weight::from_parts(114_904_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/kusama/src/weights/pallet_multisig.rs b/relay/kusama/src/weights/pallet_multisig.rs index 2073e2ce70..6be87de7ab 100644 --- a/relay/kusama/src/weights/pallet_multisig.rs +++ b/relay/kusama/src/weights/pallet_multisig.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +56,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_029_000 picoseconds. - Weight::from_parts(13_653_647, 0) + // Minimum execution time: 13_005_000 picoseconds. + Weight::from_parts(13_462_385, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 3 - .saturating_add(Weight::from_parts(508, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(560, 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`) @@ -64,13 +70,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `301 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 44_264_000 picoseconds. - Weight::from_parts(33_241_844, 0) + // Minimum execution time: 40_053_000 picoseconds. + Weight::from_parts(29_462_842, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 791 - .saturating_add(Weight::from_parts(126_162, 0).saturating_mul(s.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_412, 0).saturating_mul(z.into())) + // Standard Error: 939 + .saturating_add(Weight::from_parts(124_408, 0).saturating_mul(s.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_542, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,13 +88,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `320` // Estimated: `6811` - // Minimum execution time: 30_466_000 picoseconds. - Weight::from_parts(19_072_629, 0) + // Minimum execution time: 28_290_000 picoseconds. + Weight::from_parts(18_127_799, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 721 - .saturating_add(Weight::from_parts(119_724, 0).saturating_mul(s.into())) + // Standard Error: 744 + .saturating_add(Weight::from_parts(110_288, 0).saturating_mul(s.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_517, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_530, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,13 +108,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `426 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 48_911_000 picoseconds. - Weight::from_parts(36_233_544, 0) + // Minimum execution time: 46_478_000 picoseconds. + Weight::from_parts(33_212_320, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_081 - .saturating_add(Weight::from_parts(153_334, 0).saturating_mul(s.into())) - // Standard Error: 10 - .saturating_add(Weight::from_parts(1_505, 0).saturating_mul(z.into())) + // Standard Error: 1_190 + .saturating_add(Weight::from_parts(154_897, 0).saturating_mul(s.into())) + // Standard Error: 11 + .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,11 +125,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `301 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 30_713_000 picoseconds. - Weight::from_parts(31_711_572, 0) + // Minimum execution time: 28_327_000 picoseconds. + Weight::from_parts(29_150_814, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 705 - .saturating_add(Weight::from_parts(126_527, 0).saturating_mul(s.into())) + // Standard Error: 809 + .saturating_add(Weight::from_parts(120_414, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,11 +140,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `320` // Estimated: `6811` - // Minimum execution time: 16_140_000 picoseconds. - Weight::from_parts(18_739_375, 0) + // Minimum execution time: 14_895_000 picoseconds. + Weight::from_parts(17_187_839, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 911 - .saturating_add(Weight::from_parts(112_416, 0).saturating_mul(s.into())) + // Standard Error: 823 + .saturating_add(Weight::from_parts(114_125, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +155,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `492 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 31_722_000 picoseconds. - Weight::from_parts(33_093_370, 0) + // Minimum execution time: 29_190_000 picoseconds. + Weight::from_parts(30_602_563, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 775 - .saturating_add(Weight::from_parts(122_620, 0).saturating_mul(s.into())) + // Standard Error: 724 + .saturating_add(Weight::from_parts(121_437, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/kusama/src/weights/pallet_nis.rs b/relay/kusama/src/weights/pallet_nis.rs index d7affaea22..f46b69cfff 100644 --- a/relay/kusama/src/weights/pallet_nis.rs +++ b/relay/kusama/src/weights/pallet_nis.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_nis` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_nis -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,7 +54,7 @@ impl pallet_nis::WeightInfo for WeightInfo { /// Storage: `Nis::Queues` (r:1 w:1) /// Proof: `Nis::Queues` (`max_values`: None, `max_size`: Some(48022), added: 50497, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Nis::QueueTotals` (r:1 w:1) /// Proof: `Nis::QueueTotals` (`max_values`: Some(1), `max_size`: Some(10002), added: 10497, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 999]`. @@ -56,26 +62,26 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `10210 + l * (48 ±0)` // Estimated: `51487` - // Minimum execution time: 39_676_000 picoseconds. - Weight::from_parts(41_617_403, 0) + // Minimum execution time: 41_208_000 picoseconds. + Weight::from_parts(41_517_888, 0) .saturating_add(Weight::from_parts(0, 51487)) - // Standard Error: 1_340 - .saturating_add(Weight::from_parts(93_974, 0).saturating_mul(l.into())) + // Standard Error: 1_257 + .saturating_add(Weight::from_parts(93_830, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Nis::Queues` (r:1 w:1) /// Proof: `Nis::Queues` (`max_values`: None, `max_size`: Some(48022), added: 50497, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Nis::QueueTotals` (r:1 w:1) /// Proof: `Nis::QueueTotals` (`max_values`: Some(1), `max_size`: Some(10002), added: 10497, mode: `MaxEncodedLen`) fn place_bid_max() -> Weight { // Proof Size summary in bytes: // Measured: `58212` // Estimated: `51487` - // Minimum execution time: 144_367_000 picoseconds. - Weight::from_parts(150_343_000, 0) + // Minimum execution time: 145_118_000 picoseconds. + Weight::from_parts(153_236_000, 0) .saturating_add(Weight::from_parts(0, 51487)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -83,7 +89,7 @@ impl pallet_nis::WeightInfo for WeightInfo { /// Storage: `Nis::Queues` (r:1 w:1) /// Proof: `Nis::Queues` (`max_values`: None, `max_size`: Some(48022), added: 50497, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Nis::QueueTotals` (r:1 w:1) /// Proof: `Nis::QueueTotals` (`max_values`: Some(1), `max_size`: Some(10002), added: 10497, mode: `MaxEncodedLen`) /// The range of component `l` is `[1, 1000]`. @@ -91,11 +97,11 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `10210 + l * (48 ±0)` // Estimated: `51487` - // Minimum execution time: 45_783_000 picoseconds. - Weight::from_parts(37_520_860, 0) + // Minimum execution time: 46_270_000 picoseconds. + Weight::from_parts(37_109_080, 0) .saturating_add(Weight::from_parts(0, 51487)) - // Standard Error: 1_244 - .saturating_add(Weight::from_parts(80_867, 0).saturating_mul(l.into())) + // Standard Error: 1_389 + .saturating_add(Weight::from_parts(81_970, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -107,8 +113,8 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `225` // Estimated: `3593` - // Minimum execution time: 37_192_000 picoseconds. - Weight::from_parts(39_780_000, 0) + // Minimum execution time: 29_552_000 picoseconds. + Weight::from_parts(30_818_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -116,7 +122,7 @@ impl pallet_nis::WeightInfo for WeightInfo { /// Storage: `Nis::Receipts` (r:1 w:1) /// Proof: `Nis::Receipts` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Nis::Summary` (r:1 w:1) @@ -127,8 +133,8 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3593` - // Minimum execution time: 64_704_000 picoseconds. - Weight::from_parts(66_785_000, 0) + // Minimum execution time: 59_029_000 picoseconds. + Weight::from_parts(60_171_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -142,13 +148,13 @@ impl pallet_nis::WeightInfo for WeightInfo { /// Storage: `NisCounterpartBalances::Account` (r:1 w:1) /// Proof: `NisCounterpartBalances::Account` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) fn privatize() -> Weight { // Proof Size summary in bytes: // Measured: `544` // Estimated: `3593` - // Minimum execution time: 80_030_000 picoseconds. - Weight::from_parts(82_771_000, 0) + // Minimum execution time: 75_021_000 picoseconds. + Weight::from_parts(76_290_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -160,13 +166,13 @@ impl pallet_nis::WeightInfo for WeightInfo { /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) fn thaw_private() -> Weight { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3593` - // Minimum execution time: 46_403_000 picoseconds. - Weight::from_parts(49_817_000, 0) + // Minimum execution time: 46_012_000 picoseconds. + Weight::from_parts(47_042_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -183,8 +189,8 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `488` // Estimated: `3593` - // Minimum execution time: 84_401_000 picoseconds. - Weight::from_parts(89_120_000, 0) + // Minimum execution time: 77_142_000 picoseconds. + Weight::from_parts(79_034_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -199,8 +205,8 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `11487` - // Minimum execution time: 30_300_000 picoseconds. - Weight::from_parts(33_581_000, 0) + // Minimum execution time: 26_223_000 picoseconds. + Weight::from_parts(29_341_000, 0) .saturating_add(Weight::from_parts(0, 11487)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -211,8 +217,8 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `51487` - // Minimum execution time: 3_942_000 picoseconds. - Weight::from_parts(4_062_000, 0) + // Minimum execution time: 3_945_000 picoseconds. + Weight::from_parts(4_243_000, 0) .saturating_add(Weight::from_parts(0, 51487)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -223,8 +229,8 @@ impl pallet_nis::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_674_000 picoseconds. - Weight::from_parts(5_882_000, 0) + // Minimum execution time: 4_292_000 picoseconds. + Weight::from_parts(4_400_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/kusama/src/weights/pallet_nomination_pools.rs b/relay/kusama/src/weights/pallet_nomination_pools.rs index 3eae33b5b9..e5a345b377 100644 --- a/relay/kusama/src/weights/pallet_nomination_pools.rs +++ b/relay/kusama/src/weights/pallet_nomination_pools.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_nomination_pools -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -70,20 +76,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn join() -> Weight { // Proof Size summary in bytes: - // Measured: `3229` + // Measured: `3395` // Estimated: `8877` - // Minimum execution time: 176_164_000 picoseconds. - Weight::from_parts(180_489_000, 0) + // Minimum execution time: 178_262_000 picoseconds. + Weight::from_parts(181_014_000, 0) .saturating_add(Weight::from_parts(0, 8877)) - .saturating_add(T::DbWeight::get().reads(19)) - .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().reads(20)) + .saturating_add(T::DbWeight::get().writes(13)) } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) @@ -102,20 +110,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// 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: `3239` + // Measured: `3405` // Estimated: `8877` - // Minimum execution time: 172_892_000 picoseconds. - Weight::from_parts(178_103_000, 0) + // Minimum execution time: 175_832_000 picoseconds. + Weight::from_parts(179_848_000, 0) .saturating_add(Weight::from_parts(0, 8877)) - .saturating_add(T::DbWeight::get().reads(16)) - .saturating_add(T::DbWeight::get().writes(12)) + .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`) @@ -136,20 +146,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// 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: `3304` + // Measured: `3470` // Estimated: `8877` - // Minimum execution time: 206_668_000 picoseconds. - Weight::from_parts(212_317_000, 0) + // Minimum execution time: 208_219_000 picoseconds. + Weight::from_parts(213_443_000, 0) .saturating_add(Weight::from_parts(0, 8877)) - .saturating_add(T::DbWeight::get().reads(17)) - .saturating_add(T::DbWeight::get().writes(13)) + .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`) @@ -167,8 +179,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1171` // Estimated: `4182` - // Minimum execution time: 70_410_000 picoseconds. - Weight::from_parts(73_098_000, 0) + // Minimum execution time: 70_022_000 picoseconds. + Weight::from_parts(72_109_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -196,7 +208,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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) @@ -207,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: `3506` + // Measured: `3583` // Estimated: `8877` - // Minimum execution time: 159_391_000 picoseconds. - Weight::from_parts(161_163_000, 0) + // Minimum execution time: 161_515_000 picoseconds. + Weight::from_parts(163_501_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -226,19 +238,21 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1608` + // Measured: `1844` // Estimated: `4764` - // Minimum execution time: 57_036_000 picoseconds. - Weight::from_parts(59_489_074, 0) + // Minimum execution time: 65_179_000 picoseconds. + Weight::from_parts(67_896_285, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_371 - .saturating_add(Weight::from_parts(44_280, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Standard Error: 1_414 + .saturating_add(Weight::from_parts(48_635, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) @@ -255,9 +269,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1) /// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ClaimPermissions` (r:0 w:1) @@ -265,15 +281,15 @@ 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: `2036` + // Measured: `2234` // Estimated: `4764` - // Minimum execution time: 118_565_000 picoseconds. - Weight::from_parts(122_758_147, 0) + // Minimum execution time: 125_893_000 picoseconds. + Weight::from_parts(129_733_418, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 2_623 - .saturating_add(Weight::from_parts(84_237, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(10)) - .saturating_add(T::DbWeight::get().writes(8)) + // Standard Error: 2_199 + .saturating_add(Weight::from_parts(74_402, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(9)) } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) @@ -289,16 +305,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:0) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:2 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:2 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:0) /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(814), added: 3289, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1) /// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1) @@ -320,17 +338,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `NominationPools::ClaimPermissions` (r:0 w:1) /// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(s: u32, ) -> Weight { + fn withdraw_unbonded_kill(_s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2394` - // Estimated: `6196` - // Minimum execution time: 203_580_000 picoseconds. - Weight::from_parts(213_501_960, 0) - .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 4_250 - .saturating_add(Weight::from_parts(9_598, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(21)) - .saturating_add(T::DbWeight::get().writes(18)) + // Measured: `2696` + // Estimated: `8538` + // Minimum execution time: 228_965_000 picoseconds. + Weight::from_parts(236_416_829, 0) + .saturating_add(Weight::from_parts(0, 8538)) + .saturating_add(T::DbWeight::get().reads(24)) + .saturating_add(T::DbWeight::get().writes(20)) } /// Storage: `NominationPools::LastPoolId` (r:1 w:1) /// Proof: `NominationPools::LastPoolId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -356,14 +372,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) + /// Storage: `Balances::Locks` (r:2 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:2 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `NominationPools::RewardPools` (r:1 w:1) /// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) /// Storage: `NominationPools::CounterForRewardPools` (r:1 w:1) @@ -374,17 +390,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `NominationPools::BondedPools` (r:1 w:1) /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:0 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `1222` - // Estimated: `6196` - // Minimum execution time: 173_112_000 picoseconds. - Weight::from_parts(178_422_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(22)) - .saturating_add(T::DbWeight::get().writes(15)) + // Measured: `1101` + // Estimated: `8538` + // Minimum execution time: 166_696_000 picoseconds. + Weight::from_parts(171_713_000, 0) + .saturating_add(Weight::from_parts(0, 8538)) + .saturating_add(T::DbWeight::get().reads(24)) + .saturating_add(T::DbWeight::get().writes(17)) } /// Storage: `NominationPools::BondedPools` (r:1 w:0) /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) @@ -413,13 +431,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `n` is `[1, 24]`. fn nominate(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1774` + // Measured: `1888 + n * (1 ±0)` // Estimated: `4556 + n * (2520 ±0)` - // Minimum execution time: 63_024_000 picoseconds. - Weight::from_parts(64_297_638, 0) + // Minimum execution time: 61_313_000 picoseconds. + Weight::from_parts(61_361_818, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 5_820 - .saturating_add(Weight::from_parts(1_252_903, 0).saturating_mul(n.into())) + // Standard Error: 5_226 + .saturating_add(Weight::from_parts(1_520_174, 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)) @@ -433,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: `1363` + // Measured: `1431` // Estimated: `4556` - // Minimum execution time: 32_204_000 picoseconds. - Weight::from_parts(33_890_000, 0) + // Minimum execution time: 31_279_000 picoseconds. + Weight::from_parts(32_144_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -452,11 +470,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `531` // Estimated: `3735` - // Minimum execution time: 12_630_000 picoseconds. - Weight::from_parts(13_502_504, 0) + // Minimum execution time: 12_362_000 picoseconds. + Weight::from_parts(13_000_274, 0) .saturating_add(Weight::from_parts(0, 3735)) - // Standard Error: 138 - .saturating_add(Weight::from_parts(235, 0).saturating_mul(n.into())) + // Standard Error: 101 + .saturating_add(Weight::from_parts(1_021, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -476,8 +494,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_366_000 picoseconds. - Weight::from_parts(5_706_000, 0) + // Minimum execution time: 3_653_000 picoseconds. + Weight::from_parts(3_859_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -487,8 +505,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `531` // Estimated: `3685` - // Minimum execution time: 17_087_000 picoseconds. - Weight::from_parts(17_501_000, 0) + // Minimum execution time: 15_748_000 picoseconds. + Weight::from_parts(16_384_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -513,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: `1937` + // Measured: `2064` // Estimated: `4556` - // Minimum execution time: 60_693_000 picoseconds. - Weight::from_parts(62_420_000, 0) + // Minimum execution time: 58_297_000 picoseconds. + Weight::from_parts(61_061_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) @@ -533,8 +551,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `770` // Estimated: `3685` - // Minimum execution time: 30_954_000 picoseconds. - Weight::from_parts(32_155_000, 0) + // Minimum execution time: 31_866_000 picoseconds. + Weight::from_parts(32_800_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -547,8 +565,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `571` // Estimated: `3685` - // Minimum execution time: 17_341_000 picoseconds. - Weight::from_parts(18_053_000, 0) + // Minimum execution time: 15_867_000 picoseconds. + Weight::from_parts(16_168_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -559,8 +577,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `531` // Estimated: `3685` - // Minimum execution time: 17_223_000 picoseconds. - Weight::from_parts(17_862_000, 0) + // Minimum execution time: 15_480_000 picoseconds. + Weight::from_parts(15_915_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -573,8 +591,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `542` // Estimated: `4182` - // Minimum execution time: 13_327_000 picoseconds. - Weight::from_parts(13_658_000, 0) + // Minimum execution time: 13_549_000 picoseconds. + Weight::from_parts(14_200_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -591,17 +609,16 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `968` // Estimated: `3685` - // Minimum execution time: 57_137_000 picoseconds. - Weight::from_parts(58_242_000, 0) + // Minimum execution time: 58_703_000 picoseconds. + Weight::from_parts(60_162_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `NominationPools::BondedPools` (r:1 w:0) /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) @@ -610,8 +627,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `980` // Estimated: `4764` - // Minimum execution time: 54_057_000 picoseconds. - Weight::from_parts(54_855_000, 0) + // Minimum execution time: 65_352_000 picoseconds. + Weight::from_parts(66_442_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/kusama/src/weights/pallet_offences.rs b/relay/kusama/src/weights/pallet_offences.rs index cbffaeb124..798770f924 100644 --- a/relay/kusama/src/weights/pallet_offences.rs +++ b/relay/kusama/src/weights/pallet_offences.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_offences` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_offences -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -88,15 +94,15 @@ impl pallet_offences::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 24]`. fn report_offence_im_online(_r: u32, o: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + n * (2863 ±0) + o * (1226 ±0)` - // Estimated: `128540 + n * (156186 ±1_870) + o * (38402 ±459)` - // Minimum execution time: 613_723_000 picoseconds. - Weight::from_parts(623_808_000, 0) + // Measured: `0 + n * (2864 ±0) + o * (1226 ±0)` + // Estimated: `128540 + n * (156186 ±29) + o * (38402 ±0)` + // Minimum execution time: 640_389_000 picoseconds. + Weight::from_parts(648_040_000, 0) .saturating_add(Weight::from_parts(0, 128540)) - // Standard Error: 4_282_562 - .saturating_add(Weight::from_parts(420_546_464, 0).saturating_mul(o.into())) - // Standard Error: 17_446_831 - .saturating_add(Weight::from_parts(480_750_986, 0).saturating_mul(n.into())) + // Standard Error: 4_681_590 + .saturating_add(Weight::from_parts(445_433_927, 0).saturating_mul(o.into())) + // Standard Error: 19_072_443 + .saturating_add(Weight::from_parts(526_534_346, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(172)) .saturating_add(T::DbWeight::get().reads((51_u64).saturating_mul(o.into()))) .saturating_add(T::DbWeight::get().reads((185_u64).saturating_mul(n.into()))) @@ -147,13 +153,13 @@ impl pallet_offences::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 24]`. fn report_offence_grandpa(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1831 + n * (48 ±0)` + // Measured: `1979 + n * (46 ±0)` // Estimated: `5686 + n * (2551 ±0)` - // Minimum execution time: 85_661_000 picoseconds. - Weight::from_parts(101_183_633, 0) + // Minimum execution time: 80_019_000 picoseconds. + Weight::from_parts(94_616_186, 0) .saturating_add(Weight::from_parts(0, 5686)) - // Standard Error: 26_365 - .saturating_add(Weight::from_parts(9_828_019, 0).saturating_mul(n.into())) + // Standard Error: 25_402 + .saturating_add(Weight::from_parts(10_155_798, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(19)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(13)) @@ -201,13 +207,13 @@ impl pallet_offences::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 24]`. fn report_offence_babe(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1831 + n * (48 ±0)` + // Measured: `1979 + n * (46 ±0)` // Estimated: `5686 + n * (2551 ±0)` - // Minimum execution time: 85_422_000 picoseconds. - Weight::from_parts(101_060_303, 0) + // Minimum execution time: 80_375_000 picoseconds. + Weight::from_parts(94_342_032, 0) .saturating_add(Weight::from_parts(0, 5686)) - // Standard Error: 27_913 - .saturating_add(Weight::from_parts(9_804_093, 0).saturating_mul(n.into())) + // Standard Error: 25_227 + .saturating_add(Weight::from_parts(10_225_098, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(19)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(13)) diff --git a/relay/kusama/src/weights/pallet_preimage.rs b/relay/kusama/src/weights/pallet_preimage.rs index 1240693cd9..7751b0d13d 100644 --- a/relay/kusama/src/weights/pallet_preimage.rs +++ b/relay/kusama/src/weights/pallet_preimage.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_preimage -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,25 +51,31 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `143` + // Measured: `42` // Estimated: `3556` - // Minimum execution time: 25_399_000 picoseconds. - Weight::from_parts(25_815_000, 0) + // Minimum execution time: 40_189_000 picoseconds. + Weight::from_parts(137_427_232, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_271, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Standard Error: 12 + .saturating_add(Weight::from_parts(2_131, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. @@ -71,16 +83,18 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 14_002_000 picoseconds. - Weight::from_parts(14_554_000, 0) + // Minimum execution time: 14_441_000 picoseconds. + Weight::from_parts(14_602_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(2_335, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_417, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. @@ -88,147 +102,168 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 13_563_000 picoseconds. - Weight::from_parts(14_086_000, 0) + // Minimum execution time: 13_662_000 picoseconds. + Weight::from_parts(13_974_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_279, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_412, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `289` + // Measured: `244` // Estimated: `3556` - // Minimum execution time: 39_870_000 picoseconds. - Weight::from_parts(43_612_000, 0) + // Minimum execution time: 54_577_000 picoseconds. + Weight::from_parts(57_997_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 22_836_000 picoseconds. - Weight::from_parts(25_219_000, 0) + // Minimum execution time: 26_389_000 picoseconds. + Weight::from_parts(35_007_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `188` // Estimated: `3556` - // Minimum execution time: 18_714_000 picoseconds. - Weight::from_parts(20_881_000, 0) + // Minimum execution time: 33_497_000 picoseconds. + Weight::from_parts(36_194_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 12_321_000 picoseconds. - Weight::from_parts(13_686_000, 0) + // Minimum execution time: 18_921_000 picoseconds. + Weight::from_parts(22_782_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3556` - // Minimum execution time: 14_284_000 picoseconds. - Weight::from_parts(14_918_000, 0) + // Minimum execution time: 17_494_000 picoseconds. + Weight::from_parts(24_367_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 8_202_000 picoseconds. - Weight::from_parts(8_598_000, 0) + // Minimum execution time: 10_082_000 picoseconds. + Weight::from_parts(12_165_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 20_937_000 picoseconds. - Weight::from_parts(22_746_000, 0) + // Minimum execution time: 29_649_000 picoseconds. + Weight::from_parts(32_492_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 7_777_000 picoseconds. - Weight::from_parts(8_330_000, 0) + // Minimum execution time: 10_925_000 picoseconds. + Weight::from_parts(12_462_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 8_117_000 picoseconds. - Weight::from_parts(8_518_000, 0) + // Minimum execution time: 10_173_000 picoseconds. + Weight::from_parts(12_014_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1024 w:1024) + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:1023 w:1023) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Preimage::RequestStatusFor` (r:0 w:1024) - /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 1024]`. + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. fn ensure_updated(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `193 + n * (91 ±0)` - // Estimated: `3593 + n * (2566 ±0)` - // Minimum execution time: 2_452_000 picoseconds. - Weight::from_parts(2_641_000, 3593) - // Standard Error: 19_797 - .saturating_add(Weight::from_parts(15_620_946, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into())) + // Measured: `0 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 48_466_000 picoseconds. + Weight::from_parts(49_012_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 58_393 + .saturating_add(Weight::from_parts(48_359_239, 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/kusama/src/weights/pallet_proxy.rs b/relay/kusama/src/weights/pallet_proxy.rs index 8bd85bf9af..57b8bd86ab 100644 --- a/relay/kusama/src/weights/pallet_proxy.rs +++ b/relay/kusama/src/weights/pallet_proxy.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_proxy -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +58,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 13_430_000 picoseconds. - Weight::from_parts(14_041_514, 0) + // Minimum execution time: 11_881_000 picoseconds. + Weight::from_parts(12_440_040, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_009 - .saturating_add(Weight::from_parts(32_526, 0).saturating_mul(p.into())) + // Standard Error: 919 + .saturating_add(Weight::from_parts(37_335, 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: 35_965_000 picoseconds. - Weight::from_parts(36_784_452, 0) + // Minimum execution time: 32_400_000 picoseconds. + Weight::from_parts(32_212_307, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_376 - .saturating_add(Weight::from_parts(91_553, 0).saturating_mul(a.into())) - // Standard Error: 2_455 - .saturating_add(Weight::from_parts(31_408, 0).saturating_mul(p.into())) + // Standard Error: 2_567 + .saturating_add(Weight::from_parts(165_348, 0).saturating_mul(a.into())) + // Standard Error: 2_652 + .saturating_add(Weight::from_parts(46_207, 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: 23_564_000 picoseconds. - Weight::from_parts(24_783_433, 0) + // Minimum execution time: 22_574_000 picoseconds. + Weight::from_parts(23_195_258, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_558 - .saturating_add(Weight::from_parts(97_262, 0).saturating_mul(a.into())) - // Standard Error: 1_610 - .saturating_add(Weight::from_parts(6_639, 0).saturating_mul(p.into())) + // Standard Error: 1_517 + .saturating_add(Weight::from_parts(141_636, 0).saturating_mul(a.into())) + // Standard Error: 1_567 + .saturating_add(Weight::from_parts(7_761, 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_476_000 picoseconds. - Weight::from_parts(24_550_552, 0) + // Minimum execution time: 22_410_000 picoseconds. + Weight::from_parts(23_467_706, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_620 - .saturating_add(Weight::from_parts(103_114, 0).saturating_mul(a.into())) - // Standard Error: 1_674 - .saturating_add(Weight::from_parts(7_306, 0).saturating_mul(p.into())) + // Standard Error: 1_487 + .saturating_add(Weight::from_parts(128_752, 0).saturating_mul(a.into())) + // Standard Error: 1_537 + .saturating_add(Weight::from_parts(4_351, 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: 32_208_000 picoseconds. - Weight::from_parts(32_451_138, 0) + // Minimum execution time: 29_087_000 picoseconds. + Weight::from_parts(29_545_554, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_776 - .saturating_add(Weight::from_parts(110_414, 0).saturating_mul(a.into())) - // Standard Error: 1_835 - .saturating_add(Weight::from_parts(46_728, 0).saturating_mul(p.into())) + // Standard Error: 1_884 + .saturating_add(Weight::from_parts(147_103, 0).saturating_mul(a.into())) + // Standard Error: 1_946 + .saturating_add(Weight::from_parts(38_304, 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_009_000 picoseconds. - Weight::from_parts(22_656_648, 0) + // Minimum execution time: 19_046_000 picoseconds. + Weight::from_parts(19_857_112, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_217 - .saturating_add(Weight::from_parts(48_598, 0).saturating_mul(p.into())) + // Standard Error: 1_349 + .saturating_add(Weight::from_parts(42_183, 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: 21_799_000 picoseconds. - Weight::from_parts(22_627_765, 0) + // Minimum execution time: 19_212_000 picoseconds. + Weight::from_parts(20_013_108, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_051 - .saturating_add(Weight::from_parts(43_122, 0).saturating_mul(p.into())) + // Standard Error: 1_423 + .saturating_add(Weight::from_parts(48_634, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,11 +186,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 18_807_000 picoseconds. - Weight::from_parts(19_777_501, 0) + // Minimum execution time: 17_760_000 picoseconds. + Weight::from_parts(18_454_519, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_050 - .saturating_add(Weight::from_parts(28_455, 0).saturating_mul(p.into())) + // Standard Error: 820 + .saturating_add(Weight::from_parts(31_747, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -195,11 +201,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `4706` - // Minimum execution time: 23_387_000 picoseconds. - Weight::from_parts(24_219_358, 0) + // Minimum execution time: 20_268_000 picoseconds. + Weight::from_parts(20_985_508, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_045 - .saturating_add(Weight::from_parts(13_703, 0).saturating_mul(p.into())) + // Standard Error: 976 + .saturating_add(Weight::from_parts(5_067, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -210,11 +216,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `126 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_487_000 picoseconds. - Weight::from_parts(20_477_124, 0) + // Minimum execution time: 18_650_000 picoseconds. + Weight::from_parts(19_416_495, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_156 - .saturating_add(Weight::from_parts(35_046, 0).saturating_mul(p.into())) + // Standard Error: 1_013 + .saturating_add(Weight::from_parts(41_602, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/kusama/src/weights/pallet_ranked_collective.rs b/relay/kusama/src/weights/pallet_ranked_collective.rs index 8ba72f3613..7365a41dad 100644 --- a/relay/kusama/src/weights/pallet_ranked_collective.rs +++ b/relay/kusama/src/weights/pallet_ranked_collective.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_ranked_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_ranked_collective -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +63,8 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `76` // Estimated: `3507` - // Minimum execution time: 14_823_000 picoseconds. - Weight::from_parts(15_300_000, 0) + // Minimum execution time: 13_681_000 picoseconds. + Weight::from_parts(14_023_000, 0) .saturating_add(Weight::from_parts(0, 3507)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -76,11 +82,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `550 + r * (281 ±0)` // Estimated: `3519 + r * (2529 ±0)` - // Minimum execution time: 28_368_000 picoseconds. - Weight::from_parts(29_376_215, 0) + // Minimum execution time: 27_293_000 picoseconds. + Weight::from_parts(28_296_200, 0) .saturating_add(Weight::from_parts(0, 3519)) - // Standard Error: 27_368 - .saturating_add(Weight::from_parts(12_034_663, 0).saturating_mul(r.into())) + // Standard Error: 25_942 + .saturating_add(Weight::from_parts(12_425_835, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -100,11 +106,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `248 + r * (17 ±0)` // Estimated: `3507` - // Minimum execution time: 17_343_000 picoseconds. - Weight::from_parts(18_419_715, 0) + // Minimum execution time: 16_463_000 picoseconds. + Weight::from_parts(17_226_639, 0) .saturating_add(Weight::from_parts(0, 3507)) - // Standard Error: 4_675 - .saturating_add(Weight::from_parts(335_584, 0).saturating_mul(r.into())) + // Standard Error: 4_234 + .saturating_add(Weight::from_parts(340_935, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -121,11 +127,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `566 + r * (72 ±0)` // Estimated: `3519` - // Minimum execution time: 28_201_000 picoseconds. - Weight::from_parts(30_839_920, 0) + // Minimum execution time: 27_176_000 picoseconds. + Weight::from_parts(29_256_929, 0) .saturating_add(Weight::from_parts(0, 3519)) - // Standard Error: 15_828 - .saturating_add(Weight::from_parts(590_418, 0).saturating_mul(r.into())) + // Standard Error: 14_763 + .saturating_add(Weight::from_parts(618_813, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -141,8 +147,8 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `637` // Estimated: `83866` - // Minimum execution time: 45_596_000 picoseconds. - Weight::from_parts(46_873_000, 0) + // Minimum execution time: 42_011_000 picoseconds. + Weight::from_parts(42_662_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -158,11 +164,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `434 + n * (50 ±0)` // Estimated: `4365 + n * (2540 ±0)` - // Minimum execution time: 15_846_000 picoseconds. - Weight::from_parts(18_183_637, 0) + // Minimum execution time: 16_405_000 picoseconds. + Weight::from_parts(18_718_654, 0) .saturating_add(Weight::from_parts(0, 4365)) - // Standard Error: 1_780 - .saturating_add(Weight::from_parts(1_138_158, 0).saturating_mul(n.into())) + // Standard Error: 1_751 + .saturating_add(Weight::from_parts(1_130_671, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/relay/kusama/src/weights/pallet_recovery.rs b/relay/kusama/src/weights/pallet_recovery.rs index 02200bb0ed..4b7deaf46e 100644 --- a/relay/kusama/src/weights/pallet_recovery.rs +++ b/relay/kusama/src/weights/pallet_recovery.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_recovery` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_recovery -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3545` - // Minimum execution time: 8_014_000 picoseconds. - Weight::from_parts(8_613_000, 0) + // Minimum execution time: 8_506_000 picoseconds. + Weight::from_parts(8_808_000, 0) .saturating_add(Weight::from_parts(0, 3545)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -62,8 +68,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_723_000 picoseconds. - Weight::from_parts(8_112_000, 0) + // Minimum execution time: 6_262_000 picoseconds. + Weight::from_parts(6_641_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -74,11 +80,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3816` - // Minimum execution time: 22_346_000 picoseconds. - Weight::from_parts(23_296_973, 0) + // Minimum execution time: 19_338_000 picoseconds. + Weight::from_parts(20_082_355, 0) .saturating_add(Weight::from_parts(0, 3816)) - // Standard Error: 4_221 - .saturating_add(Weight::from_parts(120_994, 0).saturating_mul(n.into())) + // Standard Error: 3_690 + .saturating_add(Weight::from_parts(95_624, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +96,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `3854` - // Minimum execution time: 28_705_000 picoseconds. - Weight::from_parts(29_807_000, 0) + // Minimum execution time: 24_986_000 picoseconds. + Weight::from_parts(25_666_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -105,11 +111,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `294 + n * (64 ±0)` // Estimated: `3854` - // Minimum execution time: 19_388_000 picoseconds. - Weight::from_parts(20_216_738, 0) + // Minimum execution time: 17_635_000 picoseconds. + Weight::from_parts(18_406_867, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 4_884 - .saturating_add(Weight::from_parts(122_431, 0).saturating_mul(n.into())) + // Standard Error: 3_927 + .saturating_add(Weight::from_parts(130_834, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -124,11 +130,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `326 + n * (64 ±0)` // Estimated: `3854` - // Minimum execution time: 23_438_000 picoseconds. - Weight::from_parts(24_326_305, 0) + // Minimum execution time: 21_488_000 picoseconds. + Weight::from_parts(22_303_888, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 4_836 - .saturating_add(Weight::from_parts(114_962, 0).saturating_mul(n.into())) + // Standard Error: 5_135 + .saturating_add(Weight::from_parts(85_935, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -141,11 +147,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447 + n * (32 ±0)` // Estimated: `3854` - // Minimum execution time: 32_497_000 picoseconds. - Weight::from_parts(34_118_633, 0) + // Minimum execution time: 29_743_000 picoseconds. + Weight::from_parts(30_806_409, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 5_544 - .saturating_add(Weight::from_parts(163_938, 0).saturating_mul(n.into())) + // Standard Error: 5_502 + .saturating_add(Weight::from_parts(95_956, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -158,11 +164,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `204 + n * (32 ±0)` // Estimated: `3854` - // Minimum execution time: 29_820_000 picoseconds. - Weight::from_parts(31_104_084, 0) + // Minimum execution time: 26_521_000 picoseconds. + Weight::from_parts(27_559_273, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 6_895 - .saturating_add(Weight::from_parts(118_999, 0).saturating_mul(n.into())) + // Standard Error: 5_811 + .saturating_add(Weight::from_parts(103_607, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -172,8 +178,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3545` - // Minimum execution time: 9_732_000 picoseconds. - Weight::from_parts(10_081_000, 0) + // Minimum execution time: 9_804_000 picoseconds. + Weight::from_parts(10_206_000, 0) .saturating_add(Weight::from_parts(0, 3545)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/kusama/src/weights/pallet_referenda_fellowship_referenda.rs b/relay/kusama/src/weights/pallet_referenda_fellowship_referenda.rs index ee6043e065..6f14ed082d 100644 --- a/relay/kusama/src/weights/pallet_referenda_fellowship_referenda.rs +++ b/relay/kusama/src/weights/pallet_referenda_fellowship_referenda.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_referenda -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +63,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `326` // Estimated: `42428` - // Minimum execution time: 28_786_000 picoseconds. - Weight::from_parts(29_945_000, 0) + // Minimum execution time: 24_713_000 picoseconds. + Weight::from_parts(25_459_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -71,8 +77,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `403` // Estimated: `83866` - // Minimum execution time: 48_621_000 picoseconds. - Weight::from_parts(50_641_000, 0) + // Minimum execution time: 44_656_000 picoseconds. + Weight::from_parts(45_963_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 +95,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2041` // Estimated: `42428` - // Minimum execution time: 95_998_000 picoseconds. - Weight::from_parts(102_623_000, 0) + // Minimum execution time: 99_021_000 picoseconds. + Weight::from_parts(103_816_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 +113,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2082` // Estimated: `42428` - // Minimum execution time: 95_650_000 picoseconds. - Weight::from_parts(101_498_000, 0) + // Minimum execution time: 95_260_000 picoseconds. + Weight::from_parts(103_909_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -125,8 +131,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `773` // Estimated: `83866` - // Minimum execution time: 153_604_000 picoseconds. - Weight::from_parts(183_164_000, 0) + // Minimum execution time: 168_555_000 picoseconds. + Weight::from_parts(192_680_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -143,8 +149,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `638` // Estimated: `83866` - // Minimum execution time: 60_938_000 picoseconds. - Weight::from_parts(62_845_000, 0) + // Minimum execution time: 55_807_000 picoseconds. + Weight::from_parts(57_525_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -155,8 +161,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `317` // Estimated: `4365` - // Minimum execution time: 29_707_000 picoseconds. - Weight::from_parts(30_608_000, 0) + // Minimum execution time: 27_489_000 picoseconds. + Weight::from_parts(28_468_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -167,8 +173,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `167` // Estimated: `4365` - // Minimum execution time: 13_347_000 picoseconds. - Weight::from_parts(13_761_000, 0) + // Minimum execution time: 11_792_000 picoseconds. + Weight::from_parts(12_442_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -181,8 +187,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `83866` - // Minimum execution time: 35_936_000 picoseconds. - Weight::from_parts(37_204_000, 0) + // Minimum execution time: 32_380_000 picoseconds. + Weight::from_parts(34_225_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 +203,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449` // Estimated: `83866` - // Minimum execution time: 71_036_000 picoseconds. - Weight::from_parts(73_272_000, 0) + // Minimum execution time: 60_904_000 picoseconds. + Weight::from_parts(62_802_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 +217,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `4277` - // Minimum execution time: 11_175_000 picoseconds. - Weight::from_parts(11_795_000, 0) + // Minimum execution time: 11_430_000 picoseconds. + Weight::from_parts(11_975_000, 0) .saturating_add(Weight::from_parts(0, 4277)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -229,8 +235,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2375` // Estimated: `42428` - // Minimum execution time: 87_291_000 picoseconds. - Weight::from_parts(91_634_000, 0) + // Minimum execution time: 86_746_000 picoseconds. + Weight::from_parts(95_766_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -247,8 +253,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2361` // Estimated: `42428` - // Minimum execution time: 86_946_000 picoseconds. - Weight::from_parts(93_460_000, 0) + // Minimum execution time: 85_917_000 picoseconds. + Weight::from_parts(95_697_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -261,8 +267,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1807` // Estimated: `4365` - // Minimum execution time: 43_157_000 picoseconds. - Weight::from_parts(48_311_000, 0) + // Minimum execution time: 46_147_000 picoseconds. + Weight::from_parts(51_823_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -275,8 +281,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1774` // Estimated: `4365` - // Minimum execution time: 43_835_000 picoseconds. - Weight::from_parts(47_690_000, 0) + // Minimum execution time: 45_461_000 picoseconds. + Weight::from_parts(49_722_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -291,8 +297,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1790` // Estimated: `4365` - // Minimum execution time: 49_963_000 picoseconds. - Weight::from_parts(54_210_000, 0) + // Minimum execution time: 51_550_000 picoseconds. + Weight::from_parts(59_318_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -307,8 +313,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1831` // Estimated: `4365` - // Minimum execution time: 47_964_000 picoseconds. - Weight::from_parts(53_824_000, 0) + // Minimum execution time: 49_822_000 picoseconds. + Weight::from_parts(56_745_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -321,8 +327,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `42428` - // Minimum execution time: 25_046_000 picoseconds. - Weight::from_parts(25_643_000, 0) + // Minimum execution time: 22_737_000 picoseconds. + Weight::from_parts(23_512_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -335,8 +341,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `42428` - // Minimum execution time: 24_842_000 picoseconds. - Weight::from_parts(25_959_000, 0) + // Minimum execution time: 22_928_000 picoseconds. + Weight::from_parts(23_773_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -347,8 +353,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4365` - // Minimum execution time: 15_036_000 picoseconds. - Weight::from_parts(15_454_000, 0) + // Minimum execution time: 13_121_000 picoseconds. + Weight::from_parts(13_510_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -365,8 +371,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `583` // Estimated: `42428` - // Minimum execution time: 36_533_000 picoseconds. - Weight::from_parts(37_947_000, 0) + // Minimum execution time: 32_725_000 picoseconds. + Weight::from_parts(34_117_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -383,8 +389,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `718` // Estimated: `42428` - // Minimum execution time: 78_544_000 picoseconds. - Weight::from_parts(84_502_000, 0) + // Minimum execution time: 77_591_000 picoseconds. + Weight::from_parts(85_301_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -399,8 +405,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `769` // Estimated: `42428` - // Minimum execution time: 132_061_000 picoseconds. - Weight::from_parts(143_116_000, 0) + // Minimum execution time: 129_576_000 picoseconds. + Weight::from_parts(148_477_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -415,8 +421,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `754` // Estimated: `42428` - // Minimum execution time: 129_203_000 picoseconds. - Weight::from_parts(142_418_000, 0) + // Minimum execution time: 112_291_000 picoseconds. + Weight::from_parts(146_245_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -431,8 +437,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `769` // Estimated: `42428` - // Minimum execution time: 127_204_000 picoseconds. - Weight::from_parts(138_776_000, 0) + // Minimum execution time: 111_350_000 picoseconds. + Weight::from_parts(149_830_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -447,8 +453,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `775` // Estimated: `42428` - // Minimum execution time: 70_914_000 picoseconds. - Weight::from_parts(77_847_000, 0) + // Minimum execution time: 70_461_000 picoseconds. + Weight::from_parts(80_382_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -465,8 +471,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `775` // Estimated: `83866` - // Minimum execution time: 147_272_000 picoseconds. - Weight::from_parts(160_984_000, 0) + // Minimum execution time: 146_620_000 picoseconds. + Weight::from_parts(172_260_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -481,8 +487,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `771` // Estimated: `42428` - // Minimum execution time: 130_602_000 picoseconds. - Weight::from_parts(146_616_000, 0) + // Minimum execution time: 133_408_000 picoseconds. + Weight::from_parts(156_081_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -491,16 +497,18 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `FellowshipReferenda::MetadataOf` (r:0 w:1) /// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn set_some_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `352` // Estimated: `4365` - // Minimum execution time: 21_301_000 picoseconds. - Weight::from_parts(21_987_000, 0) + // Minimum execution time: 20_731_000 picoseconds. + Weight::from_parts(21_258_000, 0) .saturating_add(Weight::from_parts(0, 4365)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0) @@ -511,8 +519,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `285` // Estimated: `4365` - // Minimum execution time: 18_808_000 picoseconds. - Weight::from_parts(19_376_000, 0) + // Minimum execution time: 16_969_000 picoseconds. + Weight::from_parts(17_916_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/kusama/src/weights/pallet_referenda_referenda.rs b/relay/kusama/src/weights/pallet_referenda_referenda.rs index 4ad037227d..a17e7b8de3 100644 --- a/relay/kusama/src/weights/pallet_referenda_referenda.rs +++ b/relay/kusama/src/weights/pallet_referenda_referenda.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_referenda -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +61,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `185` // Estimated: `42428` - // Minimum execution time: 36_881_000 picoseconds. - Weight::from_parts(38_355_000, 0) + // Minimum execution time: 31_916_000 picoseconds. + Weight::from_parts(33_137_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -69,8 +75,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `438` // Estimated: `83866` - // Minimum execution time: 48_076_000 picoseconds. - Weight::from_parts(49_518_000, 0) + // Minimum execution time: 42_483_000 picoseconds. + Weight::from_parts(43_946_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -87,8 +93,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3195` // Estimated: `42428` - // Minimum execution time: 60_284_000 picoseconds. - Weight::from_parts(62_681_000, 0) + // Minimum execution time: 56_920_000 picoseconds. + Weight::from_parts(58_870_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -105,8 +111,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3215` // Estimated: `42428` - // Minimum execution time: 60_306_000 picoseconds. - Weight::from_parts(62_701_000, 0) + // Minimum execution time: 55_904_000 picoseconds. + Weight::from_parts(59_775_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -121,8 +127,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `438` // Estimated: `83866` - // Minimum execution time: 58_813_000 picoseconds. - Weight::from_parts(60_768_000, 0) + // Minimum execution time: 50_957_000 picoseconds. + Weight::from_parts(52_677_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -137,8 +143,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `438` // Estimated: `83866` - // Minimum execution time: 55_984_000 picoseconds. - Weight::from_parts(58_503_000, 0) + // Minimum execution time: 49_544_000 picoseconds. + Weight::from_parts(51_151_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -149,8 +155,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `4401` - // Minimum execution time: 26_018_000 picoseconds. - Weight::from_parts(27_097_000, 0) + // Minimum execution time: 24_248_000 picoseconds. + Weight::from_parts(24_991_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -161,8 +167,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `269` // Estimated: `4401` - // Minimum execution time: 29_163_000 picoseconds. - Weight::from_parts(30_186_000, 0) + // Minimum execution time: 26_478_000 picoseconds. + Weight::from_parts(27_464_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -175,8 +181,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `83866` - // Minimum execution time: 35_523_000 picoseconds. - Weight::from_parts(36_518_000, 0) + // Minimum execution time: 31_435_000 picoseconds. + Weight::from_parts(32_535_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -191,8 +197,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `587` // Estimated: `83866` - // Minimum execution time: 91_314_000 picoseconds. - Weight::from_parts(95_403_000, 0) + // Minimum execution time: 79_963_000 picoseconds. + Weight::from_parts(82_313_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -205,8 +211,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `102` // Estimated: `5477` - // Minimum execution time: 8_300_000 picoseconds. - Weight::from_parts(8_697_000, 0) + // Minimum execution time: 8_471_000 picoseconds. + Weight::from_parts(9_253_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -221,8 +227,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3115` // Estimated: `42428` - // Minimum execution time: 46_187_000 picoseconds. - Weight::from_parts(48_482_000, 0) + // Minimum execution time: 42_425_000 picoseconds. + Weight::from_parts(43_604_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -237,8 +243,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3115` // Estimated: `42428` - // Minimum execution time: 49_436_000 picoseconds. - Weight::from_parts(51_096_000, 0) + // Minimum execution time: 45_013_000 picoseconds. + Weight::from_parts(47_360_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -251,8 +257,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 22_900_000 picoseconds. - Weight::from_parts(24_018_000, 0) + // Minimum execution time: 23_138_000 picoseconds. + Weight::from_parts(25_625_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -265,8 +271,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 22_520_000 picoseconds. - Weight::from_parts(23_480_000, 0) + // Minimum execution time: 22_927_000 picoseconds. + Weight::from_parts(24_920_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,8 +287,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2943` // Estimated: `5477` - // Minimum execution time: 26_675_000 picoseconds. - Weight::from_parts(27_875_000, 0) + // Minimum execution time: 27_196_000 picoseconds. + Weight::from_parts(29_227_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -297,8 +303,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2963` // Estimated: `5477` - // Minimum execution time: 26_316_000 picoseconds. - Weight::from_parts(27_357_000, 0) + // Minimum execution time: 25_665_000 picoseconds. + Weight::from_parts(27_450_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -311,8 +317,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `42428` - // Minimum execution time: 23_378_000 picoseconds. - Weight::from_parts(24_648_000, 0) + // Minimum execution time: 21_788_000 picoseconds. + Weight::from_parts(22_750_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -325,8 +331,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `42428` - // Minimum execution time: 23_885_000 picoseconds. - Weight::from_parts(24_816_000, 0) + // Minimum execution time: 21_941_000 picoseconds. + Weight::from_parts(22_745_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -337,8 +343,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `4401` - // Minimum execution time: 14_139_000 picoseconds. - Weight::from_parts(14_710_000, 0) + // Minimum execution time: 12_494_000 picoseconds. + Weight::from_parts(12_987_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -353,8 +359,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `42428` - // Minimum execution time: 32_349_000 picoseconds. - Weight::from_parts(33_774_000, 0) + // Minimum execution time: 28_006_000 picoseconds. + Weight::from_parts(29_017_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -369,8 +375,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `42428` - // Minimum execution time: 34_660_000 picoseconds. - Weight::from_parts(36_187_000, 0) + // Minimum execution time: 29_999_000 picoseconds. + Weight::from_parts(31_195_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -383,8 +389,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `399` // Estimated: `42428` - // Minimum execution time: 28_849_000 picoseconds. - Weight::from_parts(30_348_000, 0) + // Minimum execution time: 24_717_000 picoseconds. + Weight::from_parts(25_728_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -397,8 +403,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `382` // Estimated: `42428` - // Minimum execution time: 30_001_000 picoseconds. - Weight::from_parts(31_283_000, 0) + // Minimum execution time: 25_296_000 picoseconds. + Weight::from_parts(26_831_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -411,8 +417,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `399` // Estimated: `42428` - // Minimum execution time: 27_798_000 picoseconds. - Weight::from_parts(29_060_000, 0) + // Minimum execution time: 24_641_000 picoseconds. + Weight::from_parts(25_589_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -425,8 +431,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `403` // Estimated: `42428` - // Minimum execution time: 26_311_000 picoseconds. - Weight::from_parts(27_410_000, 0) + // Minimum execution time: 23_408_000 picoseconds. + Weight::from_parts(24_349_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -441,8 +447,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `403` // Estimated: `83866` - // Minimum execution time: 40_450_000 picoseconds. - Weight::from_parts(42_013_000, 0) + // Minimum execution time: 34_508_000 picoseconds. + Weight::from_parts(36_273_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -455,8 +461,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `399` // Estimated: `42428` - // Minimum execution time: 29_753_000 picoseconds. - Weight::from_parts(30_492_000, 0) + // Minimum execution time: 25_556_000 picoseconds. + Weight::from_parts(26_165_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -465,16 +471,18 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Referenda::MetadataOf` (r:0 w:1) /// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn set_some_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4401` - // Minimum execution time: 20_215_000 picoseconds. - Weight::from_parts(21_195_000, 0) + // Minimum execution time: 19_762_000 picoseconds. + Weight::from_parts(20_562_000, 0) .saturating_add(Weight::from_parts(0, 4401)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) @@ -485,8 +493,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `283` // Estimated: `4401` - // Minimum execution time: 15_667_000 picoseconds. - Weight::from_parts(16_220_000, 0) + // Minimum execution time: 13_671_000 picoseconds. + Weight::from_parts(14_440_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/kusama/src/weights/pallet_scheduler.rs b/relay/kusama/src/weights/pallet_scheduler.rs index 4dc638a61d..57fd001bc6 100644 --- a/relay/kusama/src/weights/pallet_scheduler.rs +++ b/relay/kusama/src/weights/pallet_scheduler.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_scheduler -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `68` // Estimated: `1489` - // Minimum execution time: 3_692_000 picoseconds. - Weight::from_parts(3_976_000, 0) + // Minimum execution time: 3_112_000 picoseconds. + Weight::from_parts(3_293_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,11 +70,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 3_358_000 picoseconds. - Weight::from_parts(5_834_982, 0) + // Minimum execution time: 3_436_000 picoseconds. + Weight::from_parts(5_755_823, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_432 - .saturating_add(Weight::from_parts(735_418, 0).saturating_mul(s.into())) + // Standard Error: 1_501 + .saturating_add(Weight::from_parts(805_908, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -76,25 +82,27 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_049_000 picoseconds. - Weight::from_parts(5_225_000, 0) + // Minimum execution time: 3_643_000 picoseconds. + Weight::from_parts(3_788_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 17_937_000 picoseconds. - Weight::from_parts(18_212_000, 0) + // Minimum execution time: 16_772_000 picoseconds. + Weight::from_parts(17_064_000, 0) .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_281, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_288, 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())) } @@ -104,8 +112,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_195_000 picoseconds. - Weight::from_parts(6_488_000, 0) + // Minimum execution time: 4_814_000 picoseconds. + Weight::from_parts(5_101_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,24 +121,24 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_054_000 picoseconds. - Weight::from_parts(5_241_000, 0) + // Minimum execution time: 3_466_000 picoseconds. + Weight::from_parts(3_735_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_173_000 picoseconds. - Weight::from_parts(2_216_000, 0) + // Minimum execution time: 2_275_000 picoseconds. + Weight::from_parts(2_392_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_049_000 picoseconds. - Weight::from_parts(2_223_000, 0) + // Minimum execution time: 2_270_000 picoseconds. + Weight::from_parts(2_415_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -140,11 +148,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 11_555_000 picoseconds. - Weight::from_parts(13_989_026, 0) + // Minimum execution time: 9_952_000 picoseconds. + Weight::from_parts(12_277_015, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 2_608 - .saturating_add(Weight::from_parts(752_366, 0).saturating_mul(s.into())) + // Standard Error: 2_043 + .saturating_add(Weight::from_parts(835_294, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -157,11 +165,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 15_788_000 picoseconds. - Weight::from_parts(14_402_909, 0) + // Minimum execution time: 14_647_000 picoseconds. + Weight::from_parts(12_819_347, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_857 - .saturating_add(Weight::from_parts(1_404_108, 0).saturating_mul(s.into())) + // Standard Error: 3_214 + .saturating_add(Weight::from_parts(1_527_902, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -174,11 +182,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `292 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 14_275_000 picoseconds. - Weight::from_parts(18_596_080, 0) + // Minimum execution time: 13_114_000 picoseconds. + Weight::from_parts(16_569_254, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_331 - .saturating_add(Weight::from_parts(832_081, 0).saturating_mul(s.into())) + // Standard Error: 9_367 + .saturating_add(Weight::from_parts(921_471, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -191,11 +199,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `318 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 17_468_000 picoseconds. - Weight::from_parts(19_159_948, 0) + // Minimum execution time: 16_417_000 picoseconds. + Weight::from_parts(17_508_485, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_350 - .saturating_add(Weight::from_parts(1_424_608, 0).saturating_mul(s.into())) + // Standard Error: 2_111 + .saturating_add(Weight::from_parts(1_555_376, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/kusama/src/weights/pallet_session.rs b/relay/kusama/src/weights/pallet_session.rs index 82dfcd9175..a098f70e88 100644 --- a/relay/kusama/src/weights/pallet_session.rs +++ b/relay/kusama/src/weights/pallet_session.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,11 +59,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `2133` - // Estimated: `20448` - // Minimum execution time: 57_607_000 picoseconds. - Weight::from_parts(58_447_000, 0) - .saturating_add(Weight::from_parts(0, 20448)) + // Measured: `2282` + // Estimated: `20597` + // Minimum execution time: 58_992_000 picoseconds. + Weight::from_parts(59_966_000, 0) + .saturating_add(Weight::from_parts(0, 20597)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -69,11 +75,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `1947` - // Estimated: `5412` - // Minimum execution time: 39_924_000 picoseconds. - Weight::from_parts(40_957_000, 0) - .saturating_add(Weight::from_parts(0, 5412)) + // Measured: `1981` + // Estimated: `5446` + // Minimum execution time: 40_601_000 picoseconds. + Weight::from_parts(41_735_000, 0) + .saturating_add(Weight::from_parts(0, 5446)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(8)) } diff --git a/relay/kusama/src/weights/pallet_society.rs b/relay/kusama/src/weights/pallet_society.rs index 88c4648df1..654d013d62 100644 --- a/relay/kusama/src/weights/pallet_society.rs +++ b/relay/kusama/src/weights/pallet_society.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_society` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_society -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +65,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `416` // Estimated: `3881` - // Minimum execution time: 34_174_000 picoseconds. - Weight::from_parts(34_886_000, 0) + // Minimum execution time: 29_960_000 picoseconds. + Weight::from_parts(31_062_000, 0) .saturating_add(Weight::from_parts(0, 3881)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,8 +77,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `433` // Estimated: `1918` - // Minimum execution time: 27_645_000 picoseconds. - Weight::from_parts(29_116_000, 0) + // Minimum execution time: 23_851_000 picoseconds. + Weight::from_parts(24_601_000, 0) .saturating_add(Weight::from_parts(0, 1918)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +95,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `453` // Estimated: `6393` - // Minimum execution time: 24_738_000 picoseconds. - Weight::from_parts(25_463_000, 0) + // Minimum execution time: 22_519_000 picoseconds. + Weight::from_parts(23_247_000, 0) .saturating_add(Weight::from_parts(0, 6393)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -103,8 +109,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `507` // Estimated: `3972` - // Minimum execution time: 19_262_000 picoseconds. - Weight::from_parts(19_850_000, 0) + // Minimum execution time: 16_269_000 picoseconds. + Weight::from_parts(16_706_000, 0) .saturating_add(Weight::from_parts(0, 3972)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -119,8 +125,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `541` // Estimated: `4006` - // Minimum execution time: 23_895_000 picoseconds. - Weight::from_parts(24_823_000, 0) + // Minimum execution time: 21_995_000 picoseconds. + Weight::from_parts(22_918_000, 0) .saturating_add(Weight::from_parts(0, 4006)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -137,8 +143,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `533` // Estimated: `3998` - // Minimum execution time: 22_835_000 picoseconds. - Weight::from_parts(23_891_000, 0) + // Minimum execution time: 19_332_000 picoseconds. + Weight::from_parts(20_425_000, 0) .saturating_add(Weight::from_parts(0, 3998)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -153,8 +159,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `622` // Estimated: `4087` - // Minimum execution time: 48_427_000 picoseconds. - Weight::from_parts(50_771_000, 0) + // Minimum execution time: 46_246_000 picoseconds. + Weight::from_parts(47_269_000, 0) .saturating_add(Weight::from_parts(0, 4087)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -167,8 +173,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `519` // Estimated: `3984` - // Minimum execution time: 21_876_000 picoseconds. - Weight::from_parts(22_565_000, 0) + // Minimum execution time: 19_989_000 picoseconds. + Weight::from_parts(20_778_000, 0) .saturating_add(Weight::from_parts(0, 3984)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -191,8 +197,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `114` // Estimated: `1599` - // Minimum execution time: 18_364_000 picoseconds. - Weight::from_parts(18_760_000, 0) + // Minimum execution time: 13_504_000 picoseconds. + Weight::from_parts(13_960_000, 0) .saturating_add(Weight::from_parts(0, 1599)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(7)) @@ -233,8 +239,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1626` // Estimated: `14991` - // Minimum execution time: 61_128_000 picoseconds. - Weight::from_parts(63_743_000, 0) + // Minimum execution time: 55_840_000 picoseconds. + Weight::from_parts(57_385_000, 0) .saturating_add(Weight::from_parts(0, 14991)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(30)) @@ -251,8 +257,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `456` // Estimated: `3921` - // Minimum execution time: 22_445_000 picoseconds. - Weight::from_parts(23_432_000, 0) + // Minimum execution time: 19_456_000 picoseconds. + Weight::from_parts(20_224_000, 0) .saturating_add(Weight::from_parts(0, 3921)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -267,8 +273,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `359` // Estimated: `1844` - // Minimum execution time: 13_473_000 picoseconds. - Weight::from_parts(13_898_000, 0) + // Minimum execution time: 10_213_000 picoseconds. + Weight::from_parts(10_530_000, 0) .saturating_add(Weight::from_parts(0, 1844)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -289,8 +295,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `608` // Estimated: `4073` - // Minimum execution time: 25_485_000 picoseconds. - Weight::from_parts(26_279_000, 0) + // Minimum execution time: 23_281_000 picoseconds. + Weight::from_parts(24_046_000, 0) .saturating_add(Weight::from_parts(0, 4073)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) @@ -315,8 +321,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `604` // Estimated: `4069` - // Minimum execution time: 40_010_000 picoseconds. - Weight::from_parts(41_904_000, 0) + // Minimum execution time: 34_517_000 picoseconds. + Weight::from_parts(36_168_000, 0) .saturating_add(Weight::from_parts(0, 4069)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -343,8 +349,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `622` // Estimated: `4087` - // Minimum execution time: 42_167_000 picoseconds. - Weight::from_parts(43_387_000, 0) + // Minimum execution time: 36_486_000 picoseconds. + Weight::from_parts(37_749_000, 0) .saturating_add(Weight::from_parts(0, 4087)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -361,8 +367,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `748` // Estimated: `6196` - // Minimum execution time: 39_265_000 picoseconds. - Weight::from_parts(40_839_000, 0) + // Minimum execution time: 37_614_000 picoseconds. + Weight::from_parts(39_261_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -377,8 +383,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `718` // Estimated: `6196` - // Minimum execution time: 36_476_000 picoseconds. - Weight::from_parts(37_762_000, 0) + // Minimum execution time: 34_223_000 picoseconds. + Weight::from_parts(35_280_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -393,8 +399,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `730` // Estimated: `6196` - // Minimum execution time: 36_674_000 picoseconds. - Weight::from_parts(37_917_000, 0) + // Minimum execution time: 34_403_000 picoseconds. + Weight::from_parts(35_723_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -409,8 +415,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `524` // Estimated: `6464` - // Minimum execution time: 16_583_000 picoseconds. - Weight::from_parts(17_185_000, 0) + // Minimum execution time: 16_484_000 picoseconds. + Weight::from_parts(16_926_000, 0) .saturating_add(Weight::from_parts(0, 6464)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -423,8 +429,8 @@ impl pallet_society::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `482` // Estimated: `3947` - // Minimum execution time: 11_942_000 picoseconds. - Weight::from_parts(12_421_000, 0) + // Minimum execution time: 12_092_000 picoseconds. + Weight::from_parts(14_005_000, 0) .saturating_add(Weight::from_parts(0, 3947)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index 789dbf2055..a2c992d8cc 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_staking -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,24 +53,24 @@ pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:0 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn bond() -> Weight { // Proof Size summary in bytes: - // Measured: `980` + // Measured: `813` // Estimated: `4764` - // Minimum execution time: 48_108_000 picoseconds. - Weight::from_parts(49_184_000, 0) + // Minimum execution time: 42_933_000 picoseconds. + Weight::from_parts(44_268_000, 0) .saturating_add(Weight::from_parts(0, 4764)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Staking::Bonded` (r:1 w:0) @@ -74,17 +80,17 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) fn bond_extra() -> Weight { // Proof Size summary in bytes: - // Measured: `1955` + // Measured: `2054` // Estimated: `8877` - // Minimum execution time: 87_116_000 picoseconds. - Weight::from_parts(89_888_000, 0) + // Minimum execution time: 82_012_000 picoseconds. + Weight::from_parts(84_532_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -97,22 +103,22 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListNodes` (r:3 w:3) /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListBags` (r:2 w:2) /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn unbond() -> Weight { // Proof Size summary in bytes: - // Measured: `2166` + // Measured: `2265` // Estimated: `8877` - // Minimum execution time: 95_279_000 picoseconds. - Weight::from_parts(100_266_000, 0) + // Minimum execution time: 90_559_000 picoseconds. + Weight::from_parts(93_307_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(7)) @@ -121,31 +127,37 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `944` + // Measured: `1145` // Estimated: `4764` - // Minimum execution time: 40_091_000 picoseconds. - Weight::from_parts(42_080_888, 0) + // Minimum execution time: 40_203_000 picoseconds. + Weight::from_parts(41_836_420, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 790 - .saturating_add(Weight::from_parts(38_783, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(4)) + // Standard Error: 1_040 + .saturating_add(Weight::from_parts(48_154, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Staking::Ledger` (r:1 w:1) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:1) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:1) @@ -158,10 +170,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// Storage: `Staking::SpanSlash` (r:0 w:100) @@ -169,13 +177,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2217 + s * (4 ±0)` + // Measured: `2327 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 86_677_000 picoseconds. - Weight::from_parts(92_788_035, 0) + // Minimum execution time: 85_614_000 picoseconds. + Weight::from_parts(92_113_432, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 3_839 - .saturating_add(Weight::from_parts(1_130_953, 0).saturating_mul(s.into())) + // Standard Error: 3_154 + .saturating_add(Weight::from_parts(1_311_541, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -205,10 +213,10 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn validate() -> Weight { // Proof Size summary in bytes: - // Measured: `1341` + // Measured: `1462` // Estimated: `4556` - // Minimum execution time: 53_418_000 picoseconds. - Weight::from_parts(54_696_000, 0) + // Minimum execution time: 47_035_000 picoseconds. + Weight::from_parts(48_751_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(5)) @@ -222,11 +230,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1326 + k * (823 ±0)` // Estimated: `4556 + k * (3289 ±0)` - // Minimum execution time: 31_905_000 picoseconds. - Weight::from_parts(29_095_120, 0) + // Minimum execution time: 29_594_000 picoseconds. + Weight::from_parts(28_890_162, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 10_801 - .saturating_add(Weight::from_parts(8_057_715, 0).saturating_mul(k.into())) + // Standard Error: 12_939 + .saturating_add(Weight::from_parts(6_813_697, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -257,13 +265,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 24]`. fn nominate(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1921 + n * (88 ±0)` + // Measured: `1987 + n * (86 ±0)` // Estimated: `6248 + n * (2520 ±0)` - // Minimum execution time: 62_521_000 picoseconds. - Weight::from_parts(65_529_718, 0) + // Minimum execution time: 61_650_000 picoseconds. + Weight::from_parts(64_421_037, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 18_295 - .saturating_add(Weight::from_parts(3_408_679, 0).saturating_mul(n.into())) + // Standard Error: 19_530 + .saturating_add(Weight::from_parts(3_459_773, 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(6)) @@ -285,40 +293,42 @@ impl pallet_staking::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: `1671` + // Measured: `1715` // Estimated: `6248` - // Minimum execution time: 55_291_000 picoseconds. - Weight::from_parts(57_088_000, 0) + // Minimum execution time: 52_480_000 picoseconds. + Weight::from_parts(54_390_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } /// Storage: `Staking::Ledger` (r:1 w:0) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn set_payee() -> Weight { // Proof Size summary in bytes: - // Measured: `735` + // Measured: `902` // Estimated: `4556` - // Minimum execution time: 15_323_000 picoseconds. - Weight::from_parts(15_763_000, 0) + // Minimum execution time: 18_660_000 picoseconds. + Weight::from_parts(19_199_000, 0) .saturating_add(Weight::from_parts(0, 4556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:2 w:2) + /// Storage: `Staking::Ledger` (r:1 w:2) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) fn set_controller() -> Weight { // Proof Size summary in bytes: - // Measured: `834` - // Estimated: `8122` - // Minimum execution time: 21_868_000 picoseconds. - Weight::from_parts(22_419_000, 0) - .saturating_add(Weight::from_parts(0, 8122)) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `902` + // Estimated: `4556` + // Minimum execution time: 20_994_000 picoseconds. + Weight::from_parts(21_772_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Staking::ValidatorCount` (r:0 w:1) @@ -327,8 +337,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_536_000 picoseconds. - Weight::from_parts(2_731_000, 0) + // Minimum execution time: 2_310_000 picoseconds. + Weight::from_parts(2_508_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -338,8 +348,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_976_000 picoseconds. - Weight::from_parts(7_282_000, 0) + // Minimum execution time: 7_789_000 picoseconds. + Weight::from_parts(8_117_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -349,8 +359,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_784_000 picoseconds. - Weight::from_parts(7_083_000, 0) + // Minimum execution time: 7_806_000 picoseconds. + Weight::from_parts(8_192_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -360,8 +370,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_837_000 picoseconds. - Weight::from_parts(6_988_000, 0) + // Minimum execution time: 7_801_000 picoseconds. + Weight::from_parts(8_205_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -372,17 +382,25 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_681_000 picoseconds. - Weight::from_parts(3_043_131, 0) + // Minimum execution time: 2_536_000 picoseconds. + Weight::from_parts(2_748_921, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 36 - .saturating_add(Weight::from_parts(10_413, 0).saturating_mul(v.into())) + // Standard Error: 37 + .saturating_add(Weight::from_parts(10_319, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Staking::Bonded` (r:1 w:1) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:1) @@ -395,14 +413,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:0 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// Storage: `Staking::SpanSlash` (r:0 w:100) @@ -410,14 +420,14 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1947 + s * (4 ±0)` + // Measured: `2327 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 79_777_000 picoseconds. - Weight::from_parts(85_907_243, 0) + // Minimum execution time: 85_079_000 picoseconds. + Weight::from_parts(91_979_740, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 2_976 - .saturating_add(Weight::from_parts(1_119_314, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(12)) + // Standard Error: 3_548 + .saturating_add(Weight::from_parts(1_214_678, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(12)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) @@ -429,11 +439,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `66572` // Estimated: `70037` - // Minimum execution time: 135_108_000 picoseconds. - Weight::from_parts(1_194_031_087, 0) + // Minimum execution time: 138_045_000 picoseconds. + Weight::from_parts(1_203_116_980, 0) .saturating_add(Weight::from_parts(0, 70037)) - // Standard Error: 76_534 - .saturating_add(Weight::from_parts(6_455_474, 0).saturating_mul(s.into())) + // Standard Error: 76_853 + .saturating_add(Weight::from_parts(6_462_455, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -447,27 +457,31 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `System::Account` (r:514 w:514) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:513 w:0) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:513 w:513) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 512]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `34175 + n * (149 ±0)` - // Estimated: `32387 + n * (2603 ±0)` - // Minimum execution time: 96_845_000 picoseconds. - Weight::from_parts(111_834_043, 0) - .saturating_add(Weight::from_parts(0, 32387)) - // Standard Error: 12_240 - .saturating_add(Weight::from_parts(30_238_867, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(9)) + // Measured: `36208 + n * (159 ±0)` + // Estimated: `34669 + n * (2603 ±0)` + // Minimum execution time: 131_091_000 picoseconds. + Weight::from_parts(169_654_528, 0) + .saturating_add(Weight::from_parts(0, 34669)) + // Standard Error: 38_361 + .saturating_add(Weight::from_parts(27_033_943, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) } @@ -481,28 +495,28 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:513 w:513) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:513 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:513 w:513) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:513 w:0) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:513 w:513) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:513 w:513) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:513 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 512]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `58149 + n * (385 ±0)` - // Estimated: `53036 + n * (3774 ±0)` - // Minimum execution time: 123_194_000 picoseconds. - Weight::from_parts(107_739_822, 0) - .saturating_add(Weight::from_parts(0, 53036)) - // Standard Error: 23_530 - .saturating_add(Weight::from_parts(49_653_532, 0).saturating_mul(n.into())) + // Measured: `58209 + n * (385 ±0)` + // Estimated: `53076 + n * (3774 ±2)` + // Minimum execution time: 131_655_000 picoseconds. + Weight::from_parts(87_594_420, 0) + .saturating_add(Weight::from_parts(0, 53076)) + // Standard Error: 95_524 + .saturating_add(Weight::from_parts(50_696_508, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -511,26 +525,26 @@ impl pallet_staking::WeightInfo for WeightInfo { } /// Storage: `Staking::Ledger` (r:1 w:1) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListNodes` (r:3 w:3) /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListBags` (r:2 w:2) /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1956 + l * (5 ±0)` + // Measured: `2055 + l * (5 ±0)` // Estimated: `8877` - // Minimum execution time: 81_010_000 picoseconds. - Weight::from_parts(84_211_408, 0) + // Minimum execution time: 78_083_000 picoseconds. + Weight::from_parts(80_900_499, 0) .saturating_add(Weight::from_parts(0, 8877)) - // Standard Error: 3_888 - .saturating_add(Weight::from_parts(40_526, 0).saturating_mul(l.into())) + // Standard Error: 3_707 + .saturating_add(Weight::from_parts(27_921, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -540,6 +554,10 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:1) @@ -552,10 +570,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// Storage: `Staking::SpanSlash` (r:0 w:100) @@ -563,13 +577,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2217 + s * (4 ±0)` + // Measured: `2327 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 93_218_000 picoseconds. - Weight::from_parts(95_602_519, 0) + // Minimum execution time: 93_617_000 picoseconds. + Weight::from_parts(95_926_973, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 3_357 - .saturating_add(Weight::from_parts(1_118_654, 0).saturating_mul(s.into())) + // Standard Error: 3_400 + .saturating_add(Weight::from_parts(1_237_636, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -614,14 +628,14 @@ impl pallet_staking::WeightInfo for WeightInfo { fn new_era(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + n * (714 ±0) + v * (3592 ±0)` - // Estimated: `425452 + n * (3566 ±3) + v * (3566 ±0)` - // Minimum execution time: 481_469_000 picoseconds. - Weight::from_parts(488_848_000, 0) + // Estimated: `425452 + n * (3566 ±0) + v * (3566 ±0)` + // Minimum execution time: 526_428_000 picoseconds. + Weight::from_parts(537_724_000, 0) .saturating_add(Weight::from_parts(0, 425452)) - // Standard Error: 1_892_438 - .saturating_add(Weight::from_parts(60_412_811, 0).saturating_mul(v.into())) - // Standard Error: 188_571 - .saturating_add(Weight::from_parts(17_560_088, 0).saturating_mul(n.into())) + // Standard Error: 1_972_416 + .saturating_add(Weight::from_parts(61_601_859, 0).saturating_mul(v.into())) + // Standard Error: 196_540 + .saturating_add(Weight::from_parts(18_666_621, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(172)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -650,15 +664,15 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[500, 1000]`. fn get_npos_voters(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3150 + n * (1161 ±0) + v * (389 ±0)` + // Measured: `3224 + n * (1161 ±0) + v * (389 ±0)` // Estimated: `425452 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 34_732_545_000 picoseconds. - Weight::from_parts(34_937_137_000, 0) + // Minimum execution time: 34_858_476_000 picoseconds. + Weight::from_parts(36_118_321_000, 0) .saturating_add(Weight::from_parts(0, 425452)) - // Standard Error: 388_812 - .saturating_add(Weight::from_parts(4_970_332, 0).saturating_mul(v.into())) - // Standard Error: 388_812 - .saturating_add(Weight::from_parts(4_226_407, 0).saturating_mul(n.into())) + // Standard Error: 425_157 + .saturating_add(Weight::from_parts(6_202_408, 0).saturating_mul(v.into())) + // Standard Error: 425_157 + .saturating_add(Weight::from_parts(4_353_088, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(167)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -675,11 +689,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `916 + v * (50 ±0)` // Estimated: `3510 + v * (2520 ±0)` - // Minimum execution time: 2_433_016_000 picoseconds. - Weight::from_parts(58_371_776, 0) + // Minimum execution time: 2_560_731_000 picoseconds. + Weight::from_parts(102_132_125, 0) .saturating_add(Weight::from_parts(0, 3510)) - // Standard Error: 8_220 - .saturating_add(Weight::from_parts(4_834_628, 0).saturating_mul(v.into())) + // Standard Error: 15_672 + .saturating_add(Weight::from_parts(5_089_788, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into())) @@ -700,8 +714,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_923_000 picoseconds. - Weight::from_parts(6_213_000, 0) + // Minimum execution time: 3_702_000 picoseconds. + Weight::from_parts(4_034_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -721,8 +735,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_554_000 picoseconds. - Weight::from_parts(5_756_000, 0) + // Minimum execution time: 3_500_000 picoseconds. + Weight::from_parts(3_668_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -748,10 +762,10 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn chill_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1794` + // Measured: `1838` // Estimated: `6248` - // Minimum execution time: 67_340_000 picoseconds. - Weight::from_parts(69_093_000, 0) + // Minimum execution time: 62_660_000 picoseconds. + Weight::from_parts(64_416_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) @@ -764,8 +778,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `627` // Estimated: `3510` - // Minimum execution time: 14_393_000 picoseconds. - Weight::from_parts(15_224_000, 0) + // Minimum execution time: 14_397_000 picoseconds. + Weight::from_parts(15_049_000, 0) .saturating_add(Weight::from_parts(0, 3510)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -776,8 +790,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_647_000 picoseconds. - Weight::from_parts(2_810_000, 0) + // Minimum execution time: 2_400_000 picoseconds. + Weight::from_parts(2_539_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/kusama/src/weights/pallet_timestamp.rs b/relay/kusama/src/weights/pallet_timestamp.rs index d60e2c0c5a..320db27a89 100644 --- a/relay/kusama/src/weights/pallet_timestamp.rs +++ b/relay/kusama/src/weights/pallet_timestamp.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `1493` - // Minimum execution time: 8_277_000 picoseconds. - Weight::from_parts(8_608_000, 0) + // Minimum execution time: 6_547_000 picoseconds. + Weight::from_parts(6_848_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +69,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `94` // Estimated: `0` - // Minimum execution time: 3_710_000 picoseconds. - Weight::from_parts(3_870_000, 0) + // Minimum execution time: 3_345_000 picoseconds. + Weight::from_parts(3_725_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/relay/kusama/src/weights/pallet_tips.rs b/relay/kusama/src/weights/pallet_tips.rs deleted file mode 100644 index 64729ed630..0000000000 --- a/relay/kusama/src/weights/pallet_tips.rs +++ /dev/null @@ -1,159 +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_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_tips -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_tips`. -pub struct WeightInfo(PhantomData); -impl pallet_tips::WeightInfo for WeightInfo { - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4` - // Estimated: `6938` - // Minimum execution time: 23_689_000 picoseconds. - Weight::from_parts(24_837_709, 0) - .saturating_add(Weight::from_parts(0, 6938)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_449, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `221` - // Estimated: `3907` - // Minimum execution time: 23_163_000 picoseconds. - Weight::from_parts(23_386_000, 0) - .saturating_add(Weight::from_parts(0, 3907)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:0 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - /// The range of component `t` is `[1, 19]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `108 + t * (64 ±0)` - // Estimated: `5274 + t * (192 ±0)` - // Minimum execution time: 18_945_000 picoseconds. - Weight::from_parts(17_578_665, 0) - .saturating_add(Weight::from_parts(0, 5274)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_320, 0).saturating_mul(r.into())) - // Standard Error: 5_480 - .saturating_add(Weight::from_parts(154_765, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 192).saturating_mul(t.into())) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 19]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `329 + t * (112 ±0)` - // Estimated: `5608 + t * (224 ±0)` - // Minimum execution time: 14_212_000 picoseconds. - Weight::from_parts(14_717_871, 0) - .saturating_add(Weight::from_parts(0, 5608)) - // Standard Error: 1_305 - .saturating_add(Weight::from_parts(135_786, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 19]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `368 + t * (112 ±0)` - // Estimated: `9620 + t * (336 ±0)` - // Minimum execution time: 41_550_000 picoseconds. - Weight::from_parts(43_011_989, 0) - .saturating_add(Weight::from_parts(0, 9620)) - // Standard Error: 5_482 - .saturating_add(Weight::from_parts(120_085, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 336).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 19]`. - fn slash_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `269` - // Estimated: `4003` - // Minimum execution time: 13_897_000 picoseconds. - Weight::from_parts(14_435_129, 0) - .saturating_add(Weight::from_parts(0, 4003)) - // Standard Error: 1_409 - .saturating_add(Weight::from_parts(9_959, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/relay/kusama/src/weights/pallet_treasury.rs b/relay/kusama/src/weights/pallet_treasury.rs index 52b59a25cd..c19a6bc2b6 100644 --- a/relay/kusama/src/weights/pallet_treasury.rs +++ b/relay/kusama/src/weights/pallet_treasury.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_treasury -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,10 +59,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn spend_local() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `42` // Estimated: `1887` - // Minimum execution time: 7_563_000 picoseconds. - Weight::from_parts(7_868_000, 0) + // Minimum execution time: 10_093_000 picoseconds. + Weight::from_parts(10_655_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -67,10 +73,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `107` + // Measured: `143` // Estimated: `1489` - // Minimum execution time: 16_827_000 picoseconds. - Weight::from_parts(17_262_000, 0) + // Minimum execution time: 20_873_000 picoseconds. + Weight::from_parts(21_662_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -81,10 +87,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `265` + // Measured: `301` // Estimated: `3593` - // Minimum execution time: 25_789_000 picoseconds. - Weight::from_parts(26_398_000, 0) + // Minimum execution time: 34_277_000 picoseconds. + Weight::from_parts(35_048_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -96,13 +102,13 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `433 + p * (8 ±0)` + // Measured: `470 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 5_353_000 picoseconds. - Weight::from_parts(8_423_989, 0) + // Minimum execution time: 7_220_000 picoseconds. + Weight::from_parts(11_765_443, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_120 - .saturating_add(Weight::from_parts(45_883, 0).saturating_mul(p.into())) + // Standard Error: 1_732 + .saturating_add(Weight::from_parts(89_274, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -110,10 +116,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `90` + // Measured: `127` // Estimated: `1887` - // Minimum execution time: 4_075_000 picoseconds. - Weight::from_parts(4_286_000, 0) + // Minimum execution time: 5_588_000 picoseconds. + Weight::from_parts(6_030_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -131,31 +137,33 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `294 + p * (251 ±0)` + // Measured: `331 + p * (251 ±0)` // Estimated: `3593 + p * (5206 ±0)` - // Minimum execution time: 34_895_000 picoseconds. - Weight::from_parts(40_046_318, 0) + // Minimum execution time: 43_318_000 picoseconds. + Weight::from_parts(34_774_675, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 6_188 - .saturating_add(Weight::from_parts(25_772_314, 0).saturating_mul(p.into())) + // Standard Error: 19_729 + .saturating_add(Weight::from_parts(32_072_479, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) /// Storage: `Treasury::SpendCount` (r:1 w:1) /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `Treasury::Spends` (r:0 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) fn spend() -> Weight { // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `1489` - // Minimum execution time: 8_598_000 picoseconds. - Weight::from_parts(8_937_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `115` + // Estimated: `4703` + // Minimum execution time: 17_134_000 picoseconds. + Weight::from_parts(17_652_000, 0) + .saturating_add(Weight::from_parts(0, 4703)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Treasury::Spends` (r:1 w:1) @@ -174,10 +182,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn payout() -> Weight { // Proof Size summary in bytes: - // Measured: `251` + // Measured: `287` // Estimated: `5318` - // Minimum execution time: 29_981_000 picoseconds. - Weight::from_parts(30_787_000, 0) + // Minimum execution time: 43_303_000 picoseconds. + Weight::from_parts(44_488_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -188,10 +196,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn check_status() -> Weight { // Proof Size summary in bytes: - // Measured: `170` + // Measured: `206` // Estimated: `5318` - // Minimum execution time: 15_985_000 picoseconds. - Weight::from_parts(16_431_000, 0) + // Minimum execution time: 22_854_000 picoseconds. + Weight::from_parts(23_185_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -200,10 +208,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) fn void_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `178` // Estimated: `5318` - // Minimum execution time: 8_515_000 picoseconds. - Weight::from_parts(8_795_000, 0) + // Minimum execution time: 12_421_000 picoseconds. + Weight::from_parts(12_885_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/kusama/src/weights/pallet_utility.rs b/relay/kusama/src/weights/pallet_utility.rs index 5e04412d04..06733bbcdb 100644 --- a/relay/kusama/src/weights/pallet_utility.rs +++ b/relay/kusama/src/weights/pallet_utility.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +56,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_976_000 picoseconds. - Weight::from_parts(14_634_005, 0) + // Minimum execution time: 4_475_000 picoseconds. + Weight::from_parts(4_650_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_136 - .saturating_add(Weight::from_parts(4_701_772, 0).saturating_mul(c.into())) + // Standard Error: 1_239 + .saturating_add(Weight::from_parts(3_568_113, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_312_000 picoseconds. - Weight::from_parts(4_531_000, 0) + // Minimum execution time: 4_529_000 picoseconds. + Weight::from_parts(4_695_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -69,18 +75,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_029_000 picoseconds. - Weight::from_parts(22_427_117, 0) + // Minimum execution time: 4_602_000 picoseconds. + Weight::from_parts(7_935_127, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_385 - .saturating_add(Weight::from_parts(4_895_119, 0).saturating_mul(c.into())) + // Standard Error: 1_832 + .saturating_add(Weight::from_parts(3_882_243, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_018_000 picoseconds. - Weight::from_parts(8_424_000, 0) + // Minimum execution time: 6_753_000 picoseconds. + Weight::from_parts(7_101_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -88,10 +94,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_188_000 picoseconds. - Weight::from_parts(15_405_733, 0) + // Minimum execution time: 4_459_000 picoseconds. + Weight::from_parts(7_929_022, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_345 - .saturating_add(Weight::from_parts(4_668_387, 0).saturating_mul(c.into())) + // Standard Error: 1_635 + .saturating_add(Weight::from_parts(3_569_723, 0).saturating_mul(c.into())) } } diff --git a/relay/kusama/src/weights/pallet_vesting.rs b/relay/kusama/src/weights/pallet_vesting.rs index 67bdd9aaa8..98b46c786e 100644 --- a/relay/kusama/src/weights/pallet_vesting.rs +++ b/relay/kusama/src/weights/pallet_vesting.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_vesting -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,20 +56,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `314 + l * (25 ±0) + s * (36 ±0)` + // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 32_471_000 picoseconds. - Weight::from_parts(32_371_045, 0) + // Minimum execution time: 31_317_000 picoseconds. + Weight::from_parts(30_727_094, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_265 - .saturating_add(Weight::from_parts(32_585, 0).saturating_mul(l.into())) - // Standard Error: 2_252 - .saturating_add(Weight::from_parts(70_933, 0).saturating_mul(s.into())) + // Standard Error: 1_378 + .saturating_add(Weight::from_parts(46_435, 0).saturating_mul(l.into())) + // Standard Error: 2_452 + .saturating_add(Weight::from_parts(63_853, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -72,20 +78,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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 { // Proof Size summary in bytes: - // Measured: `314 + l * (25 ±0) + s * (36 ±0)` + // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 36_054_000 picoseconds. - Weight::from_parts(36_506_107, 0) + // Minimum execution time: 33_504_000 picoseconds. + Weight::from_parts(33_163_933, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_252 - .saturating_add(Weight::from_parts(21_930, 0).saturating_mul(l.into())) - // Standard Error: 2_229 - .saturating_add(Weight::from_parts(53_372, 0).saturating_mul(s.into())) + // Standard Error: 1_362 + .saturating_add(Weight::from_parts(38_461, 0).saturating_mul(l.into())) + // Standard Error: 2_424 + .saturating_add(Weight::from_parts(58_848, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,22 +100,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `417 + l * (25 ±0) + s * (36 ±0)` + // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 34_057_000 picoseconds. - Weight::from_parts(33_569_479, 0) + // Minimum execution time: 33_210_000 picoseconds. + Weight::from_parts(33_350_780, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_132 - .saturating_add(Weight::from_parts(36_019, 0).saturating_mul(l.into())) - // Standard Error: 2_014 - .saturating_add(Weight::from_parts(81_510, 0).saturating_mul(s.into())) + // Standard Error: 1_437 + .saturating_add(Weight::from_parts(26_010, 0).saturating_mul(l.into())) + // Standard Error: 2_557 + .saturating_add(Weight::from_parts(66_760, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -118,22 +124,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `417 + l * (25 ±0) + s * (36 ±0)` + // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 37_613_000 picoseconds. - Weight::from_parts(37_776_229, 0) + // Minimum execution time: 35_523_000 picoseconds. + Weight::from_parts(35_118_028, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_464 - .saturating_add(Weight::from_parts(33_123, 0).saturating_mul(l.into())) - // Standard Error: 2_606 - .saturating_add(Weight::from_parts(57_870, 0).saturating_mul(s.into())) + // Standard Error: 1_933 + .saturating_add(Weight::from_parts(35_293, 0).saturating_mul(l.into())) + // Standard Error: 3_439 + .saturating_add(Weight::from_parts(79_220, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -144,20 +150,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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 { // Proof Size summary in bytes: - // Measured: `488 + l * (25 ±0) + s * (36 ±0)` + // Measured: `522 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 67_100_000 picoseconds. - Weight::from_parts(69_745_938, 0) + // Minimum execution time: 65_417_000 picoseconds. + Weight::from_parts(66_264_704, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 2_802 - .saturating_add(Weight::from_parts(30_682, 0).saturating_mul(l.into())) - // Standard Error: 4_985 - .saturating_add(Weight::from_parts(51_543, 0).saturating_mul(s.into())) + // Standard Error: 1_815 + .saturating_add(Weight::from_parts(36_742, 0).saturating_mul(l.into())) + // Standard Error: 3_230 + .saturating_add(Weight::from_parts(79_666, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -168,20 +174,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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 force_vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `591 + l * (25 ±0) + s * (36 ±0)` + // Measured: `625 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 68_222_000 picoseconds. - Weight::from_parts(69_455_088, 0) + // Minimum execution time: 67_324_000 picoseconds. + Weight::from_parts(67_954_092, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 3_058 - .saturating_add(Weight::from_parts(41_213, 0).saturating_mul(l.into())) - // Standard Error: 5_441 - .saturating_add(Weight::from_parts(106_240, 0).saturating_mul(s.into())) + // Standard Error: 1_789 + .saturating_add(Weight::from_parts(46_038, 0).saturating_mul(l.into())) + // Standard Error: 3_183 + .saturating_add(Weight::from_parts(93_115, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -190,22 +196,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `415 + l * (25 ±0) + s * (36 ±0)` + // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 34_862_000 picoseconds. - Weight::from_parts(34_533_028, 0) + // Minimum execution time: 34_014_000 picoseconds. + Weight::from_parts(33_660_685, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_543 - .saturating_add(Weight::from_parts(36_217, 0).saturating_mul(l.into())) - // Standard Error: 2_849 - .saturating_add(Weight::from_parts(79_321, 0).saturating_mul(s.into())) + // Standard Error: 1_540 + .saturating_add(Weight::from_parts(35_044, 0).saturating_mul(l.into())) + // Standard Error: 2_844 + .saturating_add(Weight::from_parts(75_404, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -214,22 +220,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `415 + l * (25 ±0) + s * (36 ±0)` + // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 38_624_000 picoseconds. - Weight::from_parts(38_772_588, 0) + // Minimum execution time: 36_393_000 picoseconds. + Weight::from_parts(35_509_432, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_473 - .saturating_add(Weight::from_parts(33_390, 0).saturating_mul(l.into())) - // Standard Error: 2_721 - .saturating_add(Weight::from_parts(71_058, 0).saturating_mul(s.into())) + // Standard Error: 1_505 + .saturating_add(Weight::from_parts(47_178, 0).saturating_mul(l.into())) + // Standard Error: 2_780 + .saturating_add(Weight::from_parts(84_841, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/relay/kusama/src/weights/pallet_whitelist.rs b/relay/kusama/src/weights/pallet_whitelist.rs index d1994789c3..1549806fae 100644 --- a/relay/kusama/src/weights/pallet_whitelist.rs +++ b/relay/kusama/src/weights/pallet_whitelist.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_whitelist` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_whitelist -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,67 +53,75 @@ pub struct WeightInfo(PhantomData); impl pallet_whitelist::WeightInfo for WeightInfo { /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn whitelist_call() -> Weight { // Proof Size summary in bytes: // Measured: `151` // Estimated: `3556` - // Minimum execution time: 17_893_000 picoseconds. - Weight::from_parts(18_363_000, 0) + // Minimum execution time: 16_402_000 picoseconds. + Weight::from_parts(16_877_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn remove_whitelisted_call() -> Weight { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3556` - // Minimum execution time: 18_592_000 picoseconds. - Weight::from_parts(19_288_000, 0) + // Minimum execution time: 18_085_000 picoseconds. + Weight::from_parts(18_670_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:1 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 4194294]`. fn dispatch_whitelisted_call(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `356 + n * (1 ±0)` // Estimated: `3820 + n * (1 ±0)` - // Minimum execution time: 29_775_000 picoseconds. - Weight::from_parts(30_634_000, 0) + // Minimum execution time: 28_434_000 picoseconds. + Weight::from_parts(29_021_000, 0) .saturating_add(Weight::from_parts(0, 3820)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_294, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) + // Standard Error: 12 + .saturating_add(Weight::from_parts(1_437, 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())) } /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10000]`. fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3556` - // Minimum execution time: 21_598_000 picoseconds. - Weight::from_parts(22_365_194, 0) + // Minimum execution time: 21_309_000 picoseconds. + Weight::from_parts(22_401_540, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_448, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_455, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/relay/kusama/src/weights/pallet_xcm.rs b/relay/kusama/src/weights/pallet_xcm.rs index e76e614804..fa98b4a911 100644 --- a/relay/kusama/src/weights/pallet_xcm.rs +++ b/relay/kusama/src/weights/pallet_xcm.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +63,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 28_981_000 picoseconds. - Weight::from_parts(29_643_000, 0) + // Minimum execution time: 27_476_000 picoseconds. + Weight::from_parts(28_112_000, 0) .saturating_add(Weight::from_parts(0, 3574)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,24 +73,24 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_637_000 picoseconds. - Weight::from_parts(19_271_000, 0) + // Minimum execution time: 17_408_000 picoseconds. + Weight::from_parts(17_675_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: 18_570_000 picoseconds. - Weight::from_parts(19_277_000, 0) + // Minimum execution time: 16_911_000 picoseconds. + Weight::from_parts(17_284_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_336_000 picoseconds. - Weight::from_parts(8_657_000, 0) + // Minimum execution time: 7_732_000 picoseconds. + Weight::from_parts(8_024_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `XcmPallet::SupportedVersion` (r:0 w:1) @@ -93,8 +99,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_255_000 picoseconds. - Weight::from_parts(8_722_000, 0) + // Minimum execution time: 7_391_000 picoseconds. + Weight::from_parts(7_479_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +108,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_325_000 picoseconds. - Weight::from_parts(2_442_000, 0) + // Minimum execution time: 2_241_000 picoseconds. + Weight::from_parts(2_608_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1) @@ -124,8 +130,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 32_880_000 picoseconds. - Weight::from_parts(33_943_000, 0) + // Minimum execution time: 30_963_000 picoseconds. + Weight::from_parts(31_838_000, 0) .saturating_add(Weight::from_parts(0, 3574)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -146,8 +152,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `289` // Estimated: `3754` - // Minimum execution time: 37_887_000 picoseconds. - Weight::from_parts(39_766_000, 0) + // Minimum execution time: 36_755_000 picoseconds. + Weight::from_parts(37_897_000, 0) .saturating_add(Weight::from_parts(0, 3754)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -158,8 +164,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_314_000 picoseconds. - Weight::from_parts(2_458_000, 0) + // Minimum execution time: 2_153_000 picoseconds. + Weight::from_parts(2_416_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -169,8 +175,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `26` // Estimated: `10916` - // Minimum execution time: 13_466_000 picoseconds. - Weight::from_parts(14_045_000, 0) + // Minimum execution time: 14_387_000 picoseconds. + Weight::from_parts(14_688_000, 0) .saturating_add(Weight::from_parts(0, 10916)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -181,8 +187,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `30` // Estimated: `10920` - // Minimum execution time: 13_449_000 picoseconds. - Weight::from_parts(13_995_000, 0) + // Minimum execution time: 14_540_000 picoseconds. + Weight::from_parts(15_001_000, 0) .saturating_add(Weight::from_parts(0, 10920)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -193,8 +199,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `13405` - // Minimum execution time: 15_329_000 picoseconds. - Weight::from_parts(15_913_000, 0) + // Minimum execution time: 16_327_000 picoseconds. + Weight::from_parts(16_808_000, 0) .saturating_add(Weight::from_parts(0, 13405)) .saturating_add(T::DbWeight::get().reads(5)) } @@ -212,8 +218,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `145` // Estimated: `6085` - // Minimum execution time: 31_046_000 picoseconds. - Weight::from_parts(32_118_000, 0) + // Minimum execution time: 30_043_000 picoseconds. + Weight::from_parts(30_964_000, 0) .saturating_add(Weight::from_parts(0, 6085)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) @@ -224,8 +230,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `8484` - // Minimum execution time: 8_918_000 picoseconds. - Weight::from_parts(9_159_000, 0) + // Minimum execution time: 9_483_000 picoseconds. + Weight::from_parts(9_865_000, 0) .saturating_add(Weight::from_parts(0, 8484)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -235,8 +241,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `37` // Estimated: `10927` - // Minimum execution time: 13_961_000 picoseconds. - Weight::from_parts(14_469_000, 0) + // Minimum execution time: 15_100_000 picoseconds. + Weight::from_parts(15_468_000, 0) .saturating_add(Weight::from_parts(0, 10927)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -255,8 +261,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149` // Estimated: `11039` - // Minimum execution time: 37_567_000 picoseconds. - Weight::from_parts(39_079_000, 0) + // Minimum execution time: 37_024_000 picoseconds. + Weight::from_parts(38_121_000, 0) .saturating_add(Weight::from_parts(0, 11039)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/relay/kusama/src/weights/pallet_xcm_benchmarks_fungible.rs b/relay/kusama/src/weights/pallet_xcm_benchmarks_fungible.rs deleted file mode 100644 index f1a6d3b068..0000000000 --- a/relay/kusama/src/weights/pallet_xcm_benchmarks_fungible.rs +++ /dev/null @@ -1,184 +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_xcm_benchmarks::fungible` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 - -// Executed Command: -// /builds/polkadot-sdk/target/production/polkadot -// benchmark -// pallet -// --chain=spec-kusama.json -// --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares - -#![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_xcm_benchmarks::fungible`. -pub struct WeightInfo(PhantomData); -impl pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn withdraw_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `3593` - // Minimum execution time: 22_244_000 picoseconds. - Weight::from_parts(22_867_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `6196` - // Minimum execution time: 46_292_000 picoseconds. - Weight::from_parts(48_776_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:2 w:2) - /// 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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn transfer_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `210` - // Estimated: `6196` - // Minimum execution time: 67_983_000 picoseconds. - Weight::from_parts(69_926_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`) - fn reserve_asset_deposited() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000_000_000 picoseconds. - Weight::from_parts(2_000_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn initiate_reserve_withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 25_770_000 picoseconds. - Weight::from_parts(26_448_000, 0) - .saturating_add(Weight::from_parts(0, 3574)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn receive_teleported_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `3593` - // Minimum execution time: 20_397_000 picoseconds. - Weight::from_parts(21_277_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn deposit_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 22_391_000 picoseconds. - Weight::from_parts(23_166_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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn deposit_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3593` - // Minimum execution time: 45_906_000 picoseconds. - Weight::from_parts(47_158_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) - /// 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`) - fn initiate_teleport() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3593` - // Minimum execution time: 47_858_000 picoseconds. - Weight::from_parts(49_100_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/kusama/src/weights/pallet_xcm_benchmarks_generic.rs b/relay/kusama/src/weights/pallet_xcm_benchmarks_generic.rs deleted file mode 100644 index 7b5d81343d..0000000000 --- a/relay/kusama/src/weights/pallet_xcm_benchmarks_generic.rs +++ /dev/null @@ -1,393 +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_xcm_benchmarks::generic` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_xcm_benchmarks::generic -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/pallet_xcm_benchmarks_generic.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_xcm_benchmarks::generic`. -pub struct WeightInfo(PhantomData); -impl pallet_xcm_benchmarks::generic::WeightInfo for WeightInfo { - /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) - fn report_holding() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `3676` - // Minimum execution time: 34_471_000 picoseconds. - Weight::from_parts(35_000_000, 0) - .saturating_add(Weight::from_parts(0, 3676)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) - } - fn buy_execution() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_115_000 picoseconds. - Weight::from_parts(3_227_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) - fn query_response() -> Weight { - // Proof Size summary in bytes: - // Measured: `169` - // Estimated: `3634` - // Minimum execution time: 11_905_000 picoseconds. - Weight::from_parts(12_199_000, 0) - .saturating_add(Weight::from_parts(0, 3634)) - .saturating_add(T::DbWeight::get().reads(1)) - } - fn transact() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 12_426_000 picoseconds. - Weight::from_parts(12_740_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn refund_surplus() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_099_000 picoseconds. - Weight::from_parts(3_200_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn set_error_handler() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_960_000 picoseconds. - Weight::from_parts(3_060_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn set_appendix() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_947_000 picoseconds. - Weight::from_parts(3_048_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn clear_error() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_861_000 picoseconds. - Weight::from_parts(2_990_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn descend_origin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_843_000 picoseconds. - Weight::from_parts(4_005_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn clear_origin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_915_000 picoseconds. - Weight::from_parts(3_037_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) - fn report_error() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `3676` - // Minimum execution time: 29_177_000 picoseconds. - Weight::from_parts(29_561_000, 0) - .saturating_add(Weight::from_parts(0, 3676)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: XcmPallet AssetTraps (r:1 w:1) - /// Proof Skipped: XcmPallet AssetTraps (max_values: None, max_size: None, mode: Measured) - fn claim_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `226` - // Estimated: `3691` - // Minimum execution time: 16_170_000 picoseconds. - Weight::from_parts(16_629_000, 0) - .saturating_add(Weight::from_parts(0, 3691)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn trap() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_881_000 picoseconds. - Weight::from_parts(3_014_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: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) - fn subscribe_version() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `3676` - // Minimum execution time: 35_499_000 picoseconds. - Weight::from_parts(36_678_000, 0) - .saturating_add(Weight::from_parts(0, 3676)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: XcmPallet VersionNotifyTargets (r:0 w:1) - /// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - fn unsubscribe_version() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_005_000 picoseconds. - Weight::from_parts(5_176_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) - fn initiate_reserve_withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `3676` - // Minimum execution time: 33_017_000 picoseconds. - Weight::from_parts(33_514_000, 0) - .saturating_add(Weight::from_parts(0, 3676)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) - } - fn burn_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_645_000 picoseconds. - Weight::from_parts(4_827_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn expect_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_116_000 picoseconds. - Weight::from_parts(3_239_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn expect_origin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_930_000 picoseconds. - Weight::from_parts(3_118_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn expect_error() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_871_000 picoseconds. - Weight::from_parts(2_990_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn expect_transact_status() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_136_000 picoseconds. - Weight::from_parts(3_240_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) - fn query_pallet() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `3676` - // Minimum execution time: 36_940_000 picoseconds. - Weight::from_parts(37_766_000, 0) - .saturating_add(Weight::from_parts(0, 3676)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) - } - fn expect_pallet() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 8_735_000 picoseconds. - Weight::from_parts(8_957_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) - fn report_transact_status() -> Weight { - // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `3676` - // Minimum execution time: 28_967_000 picoseconds. - Weight::from_parts(29_937_000, 0) - .saturating_add(Weight::from_parts(0, 3676)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) - } - fn clear_transact_status() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_907_000 picoseconds. - Weight::from_parts(3_023_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn set_topic() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_866_000 picoseconds. - Weight::from_parts(2_960_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn clear_topic() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_872_000 picoseconds. - Weight::from_parts(3_022_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn set_fees_mode() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_936_000 picoseconds. - Weight::from_parts(3_021_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn unpaid_execution() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_063_000 picoseconds. - Weight::from_parts(3_153_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } -} diff --git a/relay/kusama/src/weights/runtime_common_auctions.rs b/relay/kusama/src/weights/runtime_common_auctions.rs index 1acfa71a61..e7f937ee3a 100644 --- a/relay/kusama/src/weights/runtime_common_auctions.rs +++ b/relay/kusama/src/weights/runtime_common_auctions.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::auctions -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `4` // Estimated: `1493` - // Minimum execution time: 11_699_000 picoseconds. - Weight::from_parts(12_157_000, 0) + // Minimum execution time: 7_605_000 picoseconds. + Weight::from_parts(7_904_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -77,8 +83,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `728` // Estimated: `6060` - // Minimum execution time: 72_707_000 picoseconds. - Weight::from_parts(77_117_000, 0) + // Minimum execution time: 68_384_000 picoseconds. + Weight::from_parts(81_138_000, 0) .saturating_add(Weight::from_parts(0, 6060)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -107,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: `6946984` + // Measured: `6946988` // Estimated: `15822990` - // Minimum execution time: 7_367_124_000 picoseconds. - Weight::from_parts(7_519_980_000, 0) + // Minimum execution time: 7_131_859_000 picoseconds. + Weight::from_parts(7_269_659_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3687)) .saturating_add(T::DbWeight::get().writes(3682)) @@ -127,8 +133,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `177732` // Estimated: `15822990` - // Minimum execution time: 5_737_420_000 picoseconds. - Weight::from_parts(5_837_394_000, 0) + // Minimum execution time: 5_511_186_000 picoseconds. + Weight::from_parts(6_011_733_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/kusama/src/weights/runtime_common_claims.rs b/relay/kusama/src/weights/runtime_common_claims.rs index b4a12893f8..2c20887c2b 100644 --- a/relay/kusama/src/weights/runtime_common_claims.rs +++ b/relay/kusama/src/weights/runtime_common_claims.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::claims -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,13 +66,13 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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: `612` // Estimated: `4764` - // Minimum execution time: 194_073_000 picoseconds. - Weight::from_parts(202_816_000, 0) + // Minimum execution time: 194_391_000 picoseconds. + Weight::from_parts(214_298_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -83,8 +89,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `216` // Estimated: `1701` - // Minimum execution time: 12_884_000 picoseconds. - Weight::from_parts(14_383_000, 0) + // Minimum execution time: 11_150_000 picoseconds. + Weight::from_parts(13_752_000, 0) .saturating_add(Weight::from_parts(0, 1701)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) @@ -104,13 +110,13 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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: `612` // Estimated: `4764` - // Minimum execution time: 198_452_000 picoseconds. - Weight::from_parts(204_207_000, 0) + // Minimum execution time: 197_964_000 picoseconds. + Weight::from_parts(217_954_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -132,13 +138,13 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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: `686` // Estimated: `4764` - // Minimum execution time: 87_999_000 picoseconds. - Weight::from_parts(100_784_000, 0) + // Minimum execution time: 96_934_000 picoseconds. + Weight::from_parts(127_542_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -155,8 +161,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `440` // Estimated: `3905` - // Minimum execution time: 30_788_000 picoseconds. - Weight::from_parts(36_303_000, 0) + // Minimum execution time: 30_733_000 picoseconds. + Weight::from_parts(35_801_000, 0) .saturating_add(Weight::from_parts(0, 3905)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/relay/kusama/src/weights/runtime_common_crowdloan.rs b/relay/kusama/src/weights/runtime_common_crowdloan.rs index 1193d2144f..9b7475e90b 100644 --- a/relay/kusama/src/weights/runtime_common_crowdloan.rs +++ b/relay/kusama/src/weights/runtime_common_crowdloan.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::crowdloan -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +65,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `415` // Estimated: `3880` - // Minimum execution time: 49_303_000 picoseconds. - Weight::from_parts(52_521_000, 0) + // Minimum execution time: 56_969_000 picoseconds. + Weight::from_parts(64_965_000, 0) .saturating_add(Weight::from_parts(0, 3880)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -83,8 +89,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `529` // Estimated: `3994` - // Minimum execution time: 137_686_000 picoseconds. - Weight::from_parts(146_766_000, 0) + // Minimum execution time: 129_936_000 picoseconds. + Weight::from_parts(139_635_000, 0) .saturating_add(Weight::from_parts(0, 3994)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -99,8 +105,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `686` // Estimated: `6196` - // Minimum execution time: 75_162_000 picoseconds. - Weight::from_parts(77_776_000, 0) + // Minimum execution time: 79_290_000 picoseconds. + Weight::from_parts(91_409_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -112,11 +118,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `124 + k * (189 ±0)` // Estimated: `137 + k * (189 ±0)` - // Minimum execution time: 32_127_000 picoseconds. - Weight::from_parts(33_238_000, 0) + // Minimum execution time: 74_780_000 picoseconds. + Weight::from_parts(84_658_000, 0) .saturating_add(Weight::from_parts(0, 137)) - // Standard Error: 23_271 - .saturating_add(Weight::from_parts(37_980_776, 0).saturating_mul(k.into())) + // Standard Error: 25_249 + .saturating_add(Weight::from_parts(39_464_813, 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)) @@ -131,8 +137,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `514` // Estimated: `6196` - // Minimum execution time: 51_817_000 picoseconds. - Weight::from_parts(55_331_000, 0) + // Minimum execution time: 41_614_000 picoseconds. + Weight::from_parts(43_513_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -143,8 +149,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `234` // Estimated: `3699` - // Minimum execution time: 25_173_000 picoseconds. - Weight::from_parts(27_277_000, 0) + // Minimum execution time: 21_080_000 picoseconds. + Weight::from_parts(25_802_000, 0) .saturating_add(Weight::from_parts(0, 3699)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -157,8 +163,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `411` // Estimated: `3876` - // Minimum execution time: 33_380_000 picoseconds. - Weight::from_parts(35_712_000, 0) + // Minimum execution time: 31_369_000 picoseconds. + Weight::from_parts(35_823_000, 0) .saturating_add(Weight::from_parts(0, 3876)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -171,8 +177,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `238` // Estimated: `3703` - // Minimum execution time: 26_048_000 picoseconds. - Weight::from_parts(28_063_000, 0) + // Minimum execution time: 21_053_000 picoseconds. + Weight::from_parts(22_171_000, 0) .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -202,11 +208,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `196 + n * (356 ±0)` // Estimated: `5385 + n * (2832 ±0)` - // Minimum execution time: 134_360_000 picoseconds. - Weight::from_parts(10_045_905, 0) + // Minimum execution time: 123_688_000 picoseconds. + Weight::from_parts(8_501_333, 0) .saturating_add(Weight::from_parts(0, 5385)) - // Standard Error: 42_054 - .saturating_add(Weight::from_parts(60_879_551, 0).saturating_mul(n.into())) + // Standard Error: 45_641 + .saturating_add(Weight::from_parts(54_574_136, 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/kusama/src/weights/runtime_common_paras_registrar.rs b/relay/kusama/src/weights/runtime_common_paras_registrar.rs index d77efe1049..c4a76aef2d 100644 --- a/relay/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/relay/kusama/src/weights/runtime_common_paras_registrar.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::paras_registrar -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +61,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `69` // Estimated: `3534` - // Minimum execution time: 26_519_000 picoseconds. - Weight::from_parts(27_520_000, 0) + // Minimum execution time: 23_073_000 picoseconds. + Weight::from_parts(23_651_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -81,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: `352` - // Estimated: `3817` - // Minimum execution time: 7_195_918_000 picoseconds. - Weight::from_parts(7_627_060_000, 0) - .saturating_add(Weight::from_parts(0, 3817)) + // Measured: `389` + // Estimated: `3854` + // Minimum execution time: 7_928_785_000 picoseconds. + Weight::from_parts(8_239_049_000, 0) + .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -109,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: `242` - // Estimated: `3707` - // Minimum execution time: 7_021_565_000 picoseconds. - Weight::from_parts(8_027_718_000, 0) - .saturating_add(Weight::from_parts(0, 3707)) + // Measured: `279` + // Estimated: `3744` + // Minimum execution time: 7_503_344_000 picoseconds. + Weight::from_parts(8_128_494_000, 0) + .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -133,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: `499` - // Estimated: `3964` - // Minimum execution time: 70_157_000 picoseconds. - Weight::from_parts(77_254_000, 0) - .saturating_add(Weight::from_parts(0, 3964)) + // Measured: `503` + // Estimated: `3968` + // Minimum execution time: 59_845_000 picoseconds. + Weight::from_parts(73_906_000, 0) + .saturating_add(Weight::from_parts(0, 3968)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -157,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: `804` - // Estimated: `6744` - // Minimum execution time: 70_393_000 picoseconds. - Weight::from_parts(75_728_000, 0) - .saturating_add(Weight::from_parts(0, 6744)) + // Measured: `808` + // Estimated: `6748` + // Minimum execution time: 67_503_000 picoseconds. + Weight::from_parts(77_132_000, 0) + .saturating_add(Weight::from_parts(0, 6748)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -186,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: 37_691_000 picoseconds. - Weight::from_parts(38_242_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(2_661, 0).saturating_mul(b.into())) + // Measured: `238` + // Estimated: `3703` + // Minimum execution time: 32_985_000 picoseconds. + Weight::from_parts(124_548_289, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 15 + .saturating_add(Weight::from_parts(2_066, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -203,11 +209,11 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_816_000 picoseconds. - Weight::from_parts(6_915_330, 0) + // Minimum execution time: 6_864_000 picoseconds. + Weight::from_parts(9_328_911, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(958, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(964, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/relay/kusama/src/weights/runtime_common_slots.rs b/relay/kusama/src/weights/runtime_common_slots.rs index 87e3b4aef3..7780d83b77 100644 --- a/relay/kusama/src/weights/runtime_common_slots.rs +++ b/relay/kusama/src/weights/runtime_common_slots.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::slots -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo runtime_common::slots::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `620 + c * (20 ±0) + t * (234 ±0)` - // Estimated: `4091 + c * (2496 ±0) + t * (2709 ±0)` - // Minimum execution time: 696_720_000 picoseconds. - Weight::from_parts(700_380_000, 0) - .saturating_add(Weight::from_parts(0, 4091)) - // Standard Error: 94_190 - .saturating_add(Weight::from_parts(2_965_835, 0).saturating_mul(c.into())) - // Standard Error: 94_190 - .saturating_add(Weight::from_parts(8_719_796, 0).saturating_mul(t.into())) + // Measured: `624 + c * (20 ±0) + t * (234 ±0)` + // Estimated: `4095 + c * (2496 ±0) + t * (2709 ±0)` + // Minimum execution time: 722_074_000 picoseconds. + Weight::from_parts(735_336_000, 0) + .saturating_add(Weight::from_parts(0, 4095)) + // Standard Error: 86_849 + .saturating_add(Weight::from_parts(2_837_109, 0).saturating_mul(c.into())) + // Standard Error: 86_849 + .saturating_add(Weight::from_parts(9_135_210, 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()))) @@ -99,8 +105,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo runtime_common::slots::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `579` - // Estimated: `4044` - // Minimum execution time: 39_194_000 picoseconds. - Weight::from_parts(42_904_000, 0) - .saturating_add(Weight::from_parts(0, 4044)) + // Measured: `583` + // Estimated: `4048` + // Minimum execution time: 28_992_000 picoseconds. + Weight::from_parts(30_721_000, 0) + .saturating_add(Weight::from_parts(0, 4048)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/kusama/src/weights/runtime_parachains_configuration.rs b/relay/kusama/src/weights/runtime_parachains_configuration.rs index 01904b11b8..fd409cd3c4 100644 --- a/relay/kusama/src/weights/runtime_parachains_configuration.rs +++ b/relay/kusama/src/weights/runtime_parachains_configuration.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::configuration -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,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: 9_328_000 picoseconds. - Weight::from_parts(9_626_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_605_000 picoseconds. + Weight::from_parts(7_984_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -69,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: 9_221_000 picoseconds. - Weight::from_parts(9_883_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_609_000 picoseconds. + Weight::from_parts(7_915_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,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: 9_270_000 picoseconds. - Weight::from_parts(9_736_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_549_000 picoseconds. + Weight::from_parts(8_038_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -111,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: 9_330_000 picoseconds. - Weight::from_parts(9_692_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_591_000 picoseconds. + Weight::from_parts(7_916_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -127,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_047_000 picoseconds. - Weight::from_parts(10_538_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 9_925_000 picoseconds. + Weight::from_parts(10_260_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,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: 9_229_000 picoseconds. - Weight::from_parts(9_815_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_654_000 picoseconds. + Weight::from_parts(7_971_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/kusama/src/weights/runtime_parachains_disputes.rs b/relay/kusama/src/weights/runtime_parachains_disputes.rs index c9b3481328..c1b8420456 100644 --- a/relay/kusama/src/weights/runtime_parachains_disputes.rs +++ b/relay/kusama/src/weights/runtime_parachains_disputes.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::disputes -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl runtime_parachains::disputes::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_427_000 picoseconds. - Weight::from_parts(2_585_000, 0) + // Minimum execution time: 2_023_000 picoseconds. + Weight::from_parts(2_247_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/kusama/src/weights/runtime_parachains_disputes_slashing.rs b/relay/kusama/src/weights/runtime_parachains_disputes_slashing.rs index e8c58e95c5..730a9d03f2 100644 --- a/relay/kusama/src/weights/runtime_parachains_disputes_slashing.rs +++ b/relay/kusama/src/weights/runtime_parachains_disputes_slashing.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::disputes::slashing` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::disputes::slashing -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -82,15 +88,15 @@ impl runtime_parachains::disputes::slashing::WeightInfo /// The range of component `n` is `[4, 1000]`. fn report_dispute_lost(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5598 + n * (250 ±0)` - // Estimated: `8817 + n * (255 ±1)` - // Minimum execution time: 128_635_000 picoseconds. - Weight::from_parts(174_445_704, 0) - .saturating_add(Weight::from_parts(0, 8817)) - // Standard Error: 3_874 - .saturating_add(Weight::from_parts(407_218, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(17)) + // Measured: `6086 + n * (250 ±0)` + // Estimated: `9266 + n * (254 ±0)` + // Minimum execution time: 100_325_000 picoseconds. + Weight::from_parts(149_227_851, 0) + .saturating_add(Weight::from_parts(0, 9266)) + // Standard Error: 3_096 + .saturating_add(Weight::from_parts(380_082, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(10)) - .saturating_add(Weight::from_parts(0, 255).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 254).saturating_mul(n.into())) } } diff --git a/relay/kusama/src/weights/runtime_parachains_hrmp.rs b/relay/kusama/src/weights/runtime_parachains_hrmp.rs index 84e9b99080..7a9f21df85 100644 --- a/relay/kusama/src/weights/runtime_parachains_hrmp.rs +++ b/relay/kusama/src/weights/runtime_parachains_hrmp.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::hrmp -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,8 +71,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `417` // Estimated: `3882` - // Minimum execution time: 36_394_000 picoseconds. - Weight::from_parts(37_935_000, 0) + // Minimum execution time: 34_064_000 picoseconds. + Weight::from_parts(34_759_000, 0) .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -85,8 +91,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `407` // Estimated: `3872` - // Minimum execution time: 32_220_000 picoseconds. - Weight::from_parts(33_205_000, 0) + // Minimum execution time: 29_866_000 picoseconds. + Weight::from_parts(30_465_000, 0) .saturating_add(Weight::from_parts(0, 3872)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -105,8 +111,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `520` // Estimated: `3985` - // Minimum execution time: 33_344_000 picoseconds. - Weight::from_parts(34_695_000, 0) + // Minimum execution time: 30_526_000 picoseconds. + Weight::from_parts(31_530_000, 0) .saturating_add(Weight::from_parts(0, 3985)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -129,13 +135,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `264 + e * (100 ±0) + i * (100 ±0)` // Estimated: `3726 + e * (2575 ±0) + i * (2575 ±0)` - // Minimum execution time: 1_189_688_000 picoseconds. - Weight::from_parts(1_200_536_000, 0) + // Minimum execution time: 1_223_852_000 picoseconds. + Weight::from_parts(1_233_517_000, 0) .saturating_add(Weight::from_parts(0, 3726)) - // Standard Error: 114_016 - .saturating_add(Weight::from_parts(3_767_693, 0).saturating_mul(i.into())) - // Standard Error: 114_016 - .saturating_add(Weight::from_parts(3_629_627, 0).saturating_mul(e.into())) + // Standard Error: 112_239 + .saturating_add(Weight::from_parts(3_798_963, 0).saturating_mul(i.into())) + // Standard Error: 112_239 + .saturating_add(Weight::from_parts(3_701_562, 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()))) @@ -166,11 +172,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `492 + c * (136 ±0)` // Estimated: `1947 + c * (5086 ±0)` - // Minimum execution time: 6_513_000 picoseconds. - Weight::from_parts(6_722_000, 0) + // Minimum execution time: 5_949_000 picoseconds. + Weight::from_parts(6_098_000, 0) .saturating_add(Weight::from_parts(0, 1947)) - // Standard Error: 20_890 - .saturating_add(Weight::from_parts(20_983_900, 0).saturating_mul(c.into())) + // Standard Error: 16_037 + .saturating_add(Weight::from_parts(21_346_970, 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)) @@ -194,11 +200,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `335 + c * (124 ±0)` // Estimated: `1795 + c * (2600 ±0)` - // Minimum execution time: 5_354_000 picoseconds. - Weight::from_parts(5_471_000, 0) + // Minimum execution time: 5_179_000 picoseconds. + Weight::from_parts(5_307_000, 0) .saturating_add(Weight::from_parts(0, 1795)) - // Standard Error: 13_793 - .saturating_add(Weight::from_parts(13_044_103, 0).saturating_mul(c.into())) + // Standard Error: 11_254 + .saturating_add(Weight::from_parts(13_102_932, 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)) @@ -216,11 +222,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1026 + c * (13 ±0)` // Estimated: `4295 + c * (15 ±0)` - // Minimum execution time: 22_502_000 picoseconds. - Weight::from_parts(29_670_475, 0) + // Minimum execution time: 19_186_000 picoseconds. + Weight::from_parts(27_498_678, 0) .saturating_add(Weight::from_parts(0, 4295)) - // Standard Error: 2_335 - .saturating_add(Weight::from_parts(221_707, 0).saturating_mul(c.into())) + // Standard Error: 3_207 + .saturating_add(Weight::from_parts(134_682, 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())) @@ -234,11 +240,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `243 + c * (63 ±0)` // Estimated: `1722 + c * (2538 ±0)` - // Minimum execution time: 4_278_000 picoseconds. - Weight::from_parts(429_668, 0) + // Minimum execution time: 3_480_000 picoseconds. + Weight::from_parts(6_314_795, 0) .saturating_add(Weight::from_parts(0, 1722)) - // Standard Error: 5_652 - .saturating_add(Weight::from_parts(3_529_802, 0).saturating_mul(c.into())) + // Standard Error: 5_748 + .saturating_add(Weight::from_parts(3_325_243, 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)) @@ -265,15 +271,19 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:1 w:1) /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_open_hrmp_channel(_c: u32) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn force_open_hrmp_channel(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `652` - // Estimated: `6592` - // Minimum execution time: 60_528_000 picoseconds. - Weight::from_parts(64_049_000, 0) - .saturating_add(Weight::from_parts(0, 6592)) + // Measured: `417 + c * (235 ±0)` + // Estimated: `6357 + c * (235 ±0)` + // Minimum execution time: 47_681_000 picoseconds. + Weight::from_parts(49_747_916, 0) + .saturating_add(Weight::from_parts(0, 6357)) + // Standard Error: 147_581 + .saturating_add(Weight::from_parts(10_425_483, 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())) } /// Storage: `Paras::ParaLifecycles` (r:1 w:0) /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -299,8 +309,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `417` // Estimated: `6357` - // Minimum execution time: 629_674_000 picoseconds. - Weight::from_parts(640_174_000, 0) + // Minimum execution time: 47_549_000 picoseconds. + Weight::from_parts(48_848_000, 0) .saturating_add(Weight::from_parts(0, 6357)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -311,8 +321,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `263` // Estimated: `3728` - // Minimum execution time: 173_371_000 picoseconds. - Weight::from_parts(175_860_000, 0) + // Minimum execution time: 11_980_000 picoseconds. + Weight::from_parts(12_668_000, 0) .saturating_add(Weight::from_parts(0, 3728)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/kusama/src/weights/runtime_parachains_inclusion.rs b/relay/kusama/src/weights/runtime_parachains_inclusion.rs index dcde5b45fd..f5efbb05f5 100644 --- a/relay/kusama/src/weights/runtime_parachains_inclusion.rs +++ b/relay/kusama/src/weights/runtime_parachains_inclusion.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::inclusion` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::inclusion -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,11 +64,11 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Proof Size summary in bytes: // Measured: `65761` // Estimated: `69051` - // Minimum execution time: 117_760_000 picoseconds. - Weight::from_parts(121_081_000, 0) + // Minimum execution time: 120_123_000 picoseconds. + Weight::from_parts(120_613_000, 0) .saturating_add(Weight::from_parts(0, 69051)) - // Standard Error: 122_443 - .saturating_add(Weight::from_parts(107_036_774, 0).saturating_mul(i.into())) + // Standard Error: 120_621 + .saturating_add(Weight::from_parts(107_015_340, 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/kusama/src/weights/runtime_parachains_initializer.rs b/relay/kusama/src/weights/runtime_parachains_initializer.rs index 907238ba94..050ea3d488 100644 --- a/relay/kusama/src/weights/runtime_parachains_initializer.rs +++ b/relay/kusama/src/weights/runtime_parachains_initializer.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::initializer -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,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_084_000 picoseconds. - Weight::from_parts(3_208_000, 0) + // Minimum execution time: 2_845_000 picoseconds. + Weight::from_parts(3_036_000, 0) .saturating_add(Weight::from_parts(0, 1480)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(3_200, 0).saturating_mul(d.into())) + // Standard Error: 20 + .saturating_add(Weight::from_parts(2_623, 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/kusama/src/weights/runtime_parachains_paras.rs b/relay/kusama/src/weights/runtime_parachains_paras.rs index e8b853d42e..1e428e4ba9 100644 --- a/relay/kusama/src/weights/runtime_parachains_paras.rs +++ b/relay/kusama/src/weights/runtime_parachains_paras.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::paras -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -62,11 +68,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `8309` // Estimated: `11774` - // Minimum execution time: 30_681_000 picoseconds. - Weight::from_parts(31_044_000, 0) + // Minimum execution time: 27_921_000 picoseconds. + Weight::from_parts(173_042_743, 0) .saturating_add(Weight::from_parts(0, 11774)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_544, 0).saturating_mul(c.into())) + // Standard Error: 14 + .saturating_add(Weight::from_parts(2_077, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -77,11 +83,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_480_000 picoseconds. - Weight::from_parts(4_877_431, 0) + // Minimum execution time: 6_064_000 picoseconds. + Weight::from_parts(8_118_844, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_parts(951, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(967, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Paras::MostRecentContext` (r:0 w:1) @@ -90,8 +96,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_854_000 picoseconds. - Weight::from_parts(3_153_000, 0) + // Minimum execution time: 3_206_000 picoseconds. + Weight::from_parts(3_522_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -116,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: 48_930_000 picoseconds. - Weight::from_parts(49_503_000, 0) - .saturating_add(Weight::from_parts(0, 11917)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(2_498, 0).saturating_mul(c.into())) + // Measured: `8489` + // Estimated: `11954` + // Minimum execution time: 42_049_000 picoseconds. + Weight::from_parts(43_053_000, 0) + .saturating_add(Weight::from_parts(0, 11954)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_427, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -141,11 +147,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `136` // Estimated: `3601` - // Minimum execution time: 15_774_000 picoseconds. - Weight::from_parts(19_111_160, 0) + // Minimum execution time: 14_662_000 picoseconds. + Weight::from_parts(16_006_796, 0) .saturating_add(Weight::from_parts(0, 3601)) // Standard Error: 1 - .saturating_add(Weight::from_parts(956, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(991, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -155,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_057_000 picoseconds. - Weight::from_parts(19_646_000, 0) - .saturating_add(Weight::from_parts(0, 7777)) + // Measured: `4316` + // Estimated: `7781` + // Minimum execution time: 16_331_000 picoseconds. + Weight::from_parts(16_938_000, 0) + .saturating_add(Weight::from_parts(0, 7781)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,11 +182,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `683` // Estimated: `4148` - // Minimum execution time: 94_444_000 picoseconds. - Weight::from_parts(129_119_345, 0) + // Minimum execution time: 76_698_000 picoseconds. + Weight::from_parts(57_858_959, 0) .saturating_add(Weight::from_parts(0, 4148)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_791, 0).saturating_mul(c.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_870, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -192,8 +198,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `28` // Estimated: `3493` - // Minimum execution time: 5_286_000 picoseconds. - Weight::from_parts(5_500_000, 0) + // Minimum execution time: 5_524_000 picoseconds. + Weight::from_parts(5_797_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -208,8 +214,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 119_937_000 picoseconds. - Weight::from_parts(125_273_000, 0) + // Minimum execution time: 116_168_000 picoseconds. + Weight::from_parts(122_483_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -230,11 +236,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// Proof: `Paras::FutureCodeUpgrades` (`max_values`: None, `max_size`: None, mode: `Measured`) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { // Proof Size summary in bytes: - // Measured: `27260` - // Estimated: `30725` - // Minimum execution time: 868_837_000 picoseconds. - Weight::from_parts(887_348_000, 0) - .saturating_add(Weight::from_parts(0, 30725)) + // Measured: `27360` + // Estimated: `30825` + // Minimum execution time: 679_105_000 picoseconds. + Weight::from_parts(697_787_000, 0) + .saturating_add(Weight::from_parts(0, 30825)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(104)) } @@ -246,11 +252,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { // Proof Size summary in bytes: - // Measured: `27238` - // Estimated: `30703` - // Minimum execution time: 114_641_000 picoseconds. - Weight::from_parts(122_640_000, 0) - .saturating_add(Weight::from_parts(0, 30703)) + // Measured: `27338` + // Estimated: `30803` + // Minimum execution time: 115_116_000 picoseconds. + Weight::from_parts(129_695_000, 0) + .saturating_add(Weight::from_parts(0, 30803)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -268,8 +274,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26728` // Estimated: `30193` - // Minimum execution time: 686_012_000 picoseconds. - Weight::from_parts(702_195_000, 0) + // Minimum execution time: 539_033_000 picoseconds. + Weight::from_parts(549_883_000, 0) .saturating_add(Weight::from_parts(0, 30193)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -284,8 +290,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 110_422_000 picoseconds. - Weight::from_parts(119_194_000, 0) + // Minimum execution time: 110_459_000 picoseconds. + Weight::from_parts(119_007_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/kusama/src/weights/runtime_parachains_paras_inherent.rs b/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs index 1ee503680b..4c7266c5de 100644 --- a/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs +++ b/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-kusama.json +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::paras_inherent -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -112,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: `50629` - // Estimated: `56569 + v * (23 ±0)` - // Minimum execution time: 1_014_173_000 picoseconds. - Weight::from_parts(491_405_118, 0) - .saturating_add(Weight::from_parts(0, 56569)) - // Standard Error: 26_857 - .saturating_add(Weight::from_parts(56_651_960, 0).saturating_mul(v.into())) + // Measured: `50793` + // Estimated: `56733 + v * (23 ±0)` + // Minimum execution time: 981_177_000 picoseconds. + Weight::from_parts(469_757_203, 0) + .saturating_add(Weight::from_parts(0, 56733)) + // Standard Error: 19_007 + .saturating_add(Weight::from_parts(56_289_547, 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())) @@ -187,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: `42463` - // Estimated: `48403` - // Minimum execution time: 449_232_000 picoseconds. - Weight::from_parts(474_162_000, 0) - .saturating_add(Weight::from_parts(0, 48403)) + // Measured: `42595` + // Estimated: `48535` + // Minimum execution time: 458_568_000 picoseconds. + Weight::from_parts(494_095_000, 0) + .saturating_add(Weight::from_parts(0, 48535)) .saturating_add(T::DbWeight::get().reads(26)) .saturating_add(T::DbWeight::get().writes(17)) } @@ -264,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: `42535` - // Estimated: `48475` - // Minimum execution time: 6_816_317_000 picoseconds. - Weight::from_parts(1_164_454_376, 0) - .saturating_add(Weight::from_parts(0, 48475)) - // Standard Error: 30_146 - .saturating_add(Weight::from_parts(56_516_355, 0).saturating_mul(v.into())) + // Measured: `42667` + // Estimated: `48607` + // Minimum execution time: 6_789_419_000 picoseconds. + Weight::from_parts(1_225_877_637, 0) + .saturating_add(Weight::from_parts(0, 48607)) + // Standard Error: 27_380 + .saturating_add(Weight::from_parts(55_648_978, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(29)) .saturating_add(T::DbWeight::get().writes(16)) } @@ -346,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: `42562` - // Estimated: `48502` - // Minimum execution time: 37_829_001_000 picoseconds. - Weight::from_parts(39_401_576_000, 0) - .saturating_add(Weight::from_parts(0, 48502)) + // Measured: `42694` + // Estimated: `48634` + // Minimum execution time: 39_143_232_000 picoseconds. + Weight::from_parts(40_632_295_000, 0) + .saturating_add(Weight::from_parts(0, 48634)) .saturating_add(T::DbWeight::get().reads(31)) .saturating_add(T::DbWeight::get().writes(16)) } diff --git a/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 07f3ccb48d..81fd72c1b3 100644 --- a/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -17,26 +17,28 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-gghbxkbs-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --steps=50 -// --repeat=20 +// --chain=../kusama-chain-spec.json +// --steps +// 50 +// --repeat +// 20 +// --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json -// --pallet=pallet_xcm_benchmarks::fungible -// --chain=kusama-dev -// --header=./file_header.txt -// --template=./xcm/pallet-xcm-benchmarks/template.hbs -// --output=./runtime/kusama/src/weights/xcm/ +// --output +// ./kusama-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +57,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 23_950_000 picoseconds. - Weight::from_parts(24_720_000, 3593) + // Minimum execution time: 18_794_000 picoseconds. + Weight::from_parts(19_096_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +69,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `6196` - // Minimum execution time: 51_687_000 picoseconds. - Weight::from_parts(52_490_000, 6196) + // Minimum execution time: 41_227_000 picoseconds. + Weight::from_parts(41_877_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -83,10 +87,11 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `177` + // Measured: `210` // Estimated: `6196` - // Minimum execution time: 75_438_000 picoseconds. - Weight::from_parts(77_495_000, 6196) + // Minimum execution time: 73_997_000 picoseconds. + Weight::from_parts(75_462_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -96,8 +101,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000_000_000 picoseconds. - Weight::from_parts(2_000_000_000_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -105,16 +111,19 @@ impl WeightInfo { /// 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 initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `3541` - // Minimum execution time: 28_370_000 picoseconds. - Weight::from_parts(29_100_000, 3541) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `210` + // Estimated: `3675` + // Minimum execution time: 46_638_000 picoseconds. + Weight::from_parts(47_764_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .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`) @@ -122,8 +131,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 23_041_000 picoseconds. - Weight::from_parts(23_433_000, 3593) + // Minimum execution time: 17_851_000 picoseconds. + Weight::from_parts(18_286_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -133,8 +143,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 25_386_000 picoseconds. - Weight::from_parts(25_904_000, 3593) + // Minimum execution time: 17_301_000 picoseconds. + Weight::from_parts(17_677_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,10 +161,11 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `76` + // Measured: `109` // Estimated: `3593` - // Minimum execution time: 50_645_000 picoseconds. - Weight::from_parts(51_719_000, 3593) + // Minimum execution time: 49_814_000 picoseconds. + Weight::from_parts(50_505_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -169,10 +181,11 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: - // Measured: `76` + // Measured: `109` // Estimated: `3593` - // Minimum execution time: 53_055_000 picoseconds. - Weight::from_parts(54_214_000, 3593) + // Minimum execution time: 50_133_000 picoseconds. + Weight::from_parts(51_665_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/kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index fb0ca3c19f..c0e5e46608 100644 --- a/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/relay/kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,27 +17,27 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet +// --chain=kusama-dev // --steps=50 // --repeat=20 +// --no-storage-info +// --no-median-slopes +// --no-min-squares +// --pallet=pallet_xcm_benchmarks::generic // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json -// --pallet=pallet_xcm_benchmarks::generic -// --chain=kusama-dev // --header=./file_header.txt -// --template=./xcm/pallet-xcm-benchmarks/template.hbs -// --output=./runtime/kusama/src/weights/xcm/ +// --output=./runtime/kusama/src/weights/pallet_xcm_benchmarks_generic.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -68,8 +68,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3676` - // Minimum execution time: 32_102_000 picoseconds. - Weight::from_parts(33_749_000, 3676) + // Minimum execution time: 34_471_000 picoseconds. + Weight::from_parts(35_000_000, 0) + .saturating_add(Weight::from_parts(0, 3676)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -77,8 +78,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_624_000 picoseconds. - Weight::from_parts(2_714_000, 0) + // Minimum execution time: 3_115_000 picoseconds. + Weight::from_parts(3_227_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) @@ -86,58 +88,66 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `169` // Estimated: `3634` - // Minimum execution time: 10_599_000 picoseconds. - Weight::from_parts(10_882_000, 3634) + // Minimum execution time: 11_905_000 picoseconds. + Weight::from_parts(12_199_000, 0) + .saturating_add(Weight::from_parts(0, 3634)) .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_985_000 picoseconds. - Weight::from_parts(12_274_000, 0) + // Minimum execution time: 12_426_000 picoseconds. + Weight::from_parts(12_740_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_739_000 picoseconds. - Weight::from_parts(2_862_000, 0) + // Minimum execution time: 3_099_000 picoseconds. + Weight::from_parts(3_200_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_533_000 picoseconds. - Weight::from_parts(2_646_000, 0) + // Minimum execution time: 2_960_000 picoseconds. + Weight::from_parts(3_060_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_563_000 picoseconds. - Weight::from_parts(2_647_000, 0) + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_048_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_512_000 picoseconds. - Weight::from_parts(2_574_000, 0) + // Minimum execution time: 2_861_000 picoseconds. + Weight::from_parts(2_990_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_307_000 picoseconds. - Weight::from_parts(3_448_000, 0) + // Minimum execution time: 3_843_000 picoseconds. + Weight::from_parts(4_005_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_524_000 picoseconds. - Weight::from_parts(2_614_000, 0) + // Minimum execution time: 2_915_000 picoseconds. + Weight::from_parts(3_037_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) @@ -157,8 +167,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3676` - // Minimum execution time: 27_275_000 picoseconds. - Weight::from_parts(27_861_000, 3676) + // Minimum execution time: 29_177_000 picoseconds. + Weight::from_parts(29_561_000, 0) + .saturating_add(Weight::from_parts(0, 3676)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -168,8 +179,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `226` // Estimated: `3691` - // Minimum execution time: 14_731_000 picoseconds. - Weight::from_parts(15_006_000, 3691) + // Minimum execution time: 16_170_000 picoseconds. + Weight::from_parts(16_629_000, 0) + .saturating_add(Weight::from_parts(0, 3691)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -177,8 +189,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_446_000 picoseconds. - Weight::from_parts(2_581_000, 0) + // Minimum execution time: 2_881_000 picoseconds. + Weight::from_parts(3_014_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) @@ -200,8 +213,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3676` - // Minimum execution time: 34_319_000 picoseconds. - Weight::from_parts(34_708_000, 3676) + // Minimum execution time: 35_499_000 picoseconds. + Weight::from_parts(36_678_000, 0) + .saturating_add(Weight::from_parts(0, 3676)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -211,44 +225,50 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_974_000 picoseconds. - Weight::from_parts(5_155_000, 0) + // Minimum execution time: 5_005_000 picoseconds. + Weight::from_parts(5_176_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } pub(crate) fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_059_000 picoseconds. - Weight::from_parts(4_125_000, 0) + // Minimum execution time: 4_645_000 picoseconds. + Weight::from_parts(4_827_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_657_000 picoseconds. - Weight::from_parts(2_741_000, 0) + // Minimum execution time: 3_116_000 picoseconds. + Weight::from_parts(3_239_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_585_000 picoseconds. - Weight::from_parts(2_653_000, 0) + // Minimum execution time: 2_930_000 picoseconds. + Weight::from_parts(3_118_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_552_000 picoseconds. - Weight::from_parts(2_632_000, 0) + // Minimum execution time: 2_871_000 picoseconds. + Weight::from_parts(2_990_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_682_000 picoseconds. - Weight::from_parts(2_763_000, 0) + // Minimum execution time: 3_136_000 picoseconds. + Weight::from_parts(3_240_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) @@ -268,8 +288,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3676` - // Minimum execution time: 34_316_000 picoseconds. - Weight::from_parts(34_682_000, 3676) + // Minimum execution time: 36_940_000 picoseconds. + Weight::from_parts(37_766_000, 0) + .saturating_add(Weight::from_parts(0, 3676)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -277,8 +298,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_938_000 picoseconds. - Weight::from_parts(8_071_000, 0) + // Minimum execution time: 8_735_000 picoseconds. + Weight::from_parts(8_957_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) /// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1) @@ -298,8 +320,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3676` - // Minimum execution time: 28_002_000 picoseconds. - Weight::from_parts(28_184_000, 3676) + // Minimum execution time: 28_967_000 picoseconds. + Weight::from_parts(29_937_000, 0) + .saturating_add(Weight::from_parts(0, 3676)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -307,35 +330,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_520_000 picoseconds. - Weight::from_parts(2_617_000, 0) + // Minimum execution time: 2_907_000 picoseconds. + Weight::from_parts(3_023_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_506_000 picoseconds. - Weight::from_parts(2_560_000, 0) + // Minimum execution time: 2_866_000 picoseconds. + Weight::from_parts(2_960_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_503_000 picoseconds. - Weight::from_parts(2_605_000, 0) + // Minimum execution time: 2_872_000 picoseconds. + Weight::from_parts(3_022_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_511_000 picoseconds. - Weight::from_parts(2_597_000, 0) + // Minimum execution time: 2_936_000 picoseconds. + Weight::from_parts(3_021_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_617_000 picoseconds. - Weight::from_parts(2_715_000, 0) + // Minimum execution time: 3_063_000 picoseconds. + Weight::from_parts(3_153_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/relay/polkadot/src/weights/frame_benchmarking_baseline.rs b/relay/polkadot/src/weights/frame_benchmarking_baseline.rs index 0a04325c19..0c59ab778b 100644 --- a/relay/polkadot/src/weights/frame_benchmarking_baseline.rs +++ b/relay/polkadot/src/weights/frame_benchmarking_baseline.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_benchmarking::baseline -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,8 +56,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 144_000 picoseconds. - Weight::from_parts(184_245, 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]`. @@ -59,8 +65,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 142_000 picoseconds. - Weight::from_parts(182_572, 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]`. @@ -68,8 +74,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 141_000 picoseconds. - Weight::from_parts(177_129, 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]`. @@ -77,16 +83,16 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 137_000 picoseconds. - Weight::from_parts(180_881, 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: 21_709_387_000 picoseconds. - Weight::from_parts(21_734_802_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]`. @@ -94,10 +100,10 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 179_000 picoseconds. - Weight::from_parts(3_074_050, 0) + // Minimum execution time: 209_000 picoseconds. + Weight::from_parts(2_608_443, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 6_954 - .saturating_add(Weight::from_parts(55_378_274, 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/polkadot/src/weights/frame_election_provider_support.rs b/relay/polkadot/src/weights/frame_election_provider_support.rs index 22fb94e4c7..938a4e9492 100644 --- a/relay/polkadot/src/weights/frame_election_provider_support.rs +++ b/relay/polkadot/src/weights/frame_election_provider_support.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_election_provider_support -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,13 +58,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_341_134_000 picoseconds. - Weight::from_parts(6_379_678_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: 127_897 - .saturating_add(Weight::from_parts(5_841_137, 0).saturating_mul(v.into())) - // Standard Error: 13_075_816 - .saturating_add(Weight::from_parts(1_487_937_341, 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]`. @@ -67,12 +73,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_371_683_000 picoseconds. - Weight::from_parts(4_400_445_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: 118_431 - .saturating_add(Weight::from_parts(4_633_669, 0).saturating_mul(v.into())) - // Standard Error: 12_108_044 - .saturating_add(Weight::from_parts(1_339_671_383, 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/polkadot/src/weights/frame_system.rs b/relay/polkadot/src/weights/frame_system.rs index 0d610aa711..d63eb078b1 100644 --- a/relay/polkadot/src/weights/frame_system.rs +++ b/relay/polkadot/src/weights/frame_system.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +56,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_625_000 picoseconds. - Weight::from_parts(1_922_914, 0) + // Minimum execution time: 1_734_000 picoseconds. + Weight::from_parts(316_599, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) + .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: 6_756_000 picoseconds. - Weight::from_parts(144_747_508, 0) + // Minimum execution time: 5_133_000 picoseconds. + Weight::from_parts(40_368_105, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_488, 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`) @@ -75,8 +81,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_342_000 picoseconds. - Weight::from_parts(3_664_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)) @@ -89,8 +95,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 90_876_978_000 picoseconds. - Weight::from_parts(92_587_440_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)) @@ -102,11 +108,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_792_000 picoseconds. - Weight::from_parts(1_894_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: 1_606 - .saturating_add(Weight::from_parts(684_875, 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) @@ -116,11 +122,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_794_000 picoseconds. - Weight::from_parts(1_863_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: 860 - .saturating_add(Weight::from_parts(524_784, 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) @@ -128,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: `86 + p * (69 ±0)` - // Estimated: `80 + p * (70 ±0)` - // Minimum execution time: 3_578_000 picoseconds. - Weight::from_parts(3_694_000, 0) - .saturating_add(Weight::from_parts(0, 80)) - // Standard Error: 1_356 - .saturating_add(Weight::from_parts(1_164_425, 0).saturating_mul(p.into())) + // Measured: `83 + p * (69 ±0)` + // Estimated: `79 + p * (70 ±0)` + // Minimum execution time: 3_732_000 picoseconds. + Weight::from_parts(3_887_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())) .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/polkadot/src/weights/mod.rs b/relay/polkadot/src/weights/mod.rs index 7eca87034b..2e5c22c55c 100644 --- a/relay/polkadot/src/weights/mod.rs +++ b/relay/polkadot/src/weights/mod.rs @@ -22,17 +22,12 @@ pub mod pallet_bags_list; pub mod pallet_balances; pub mod pallet_bounties; pub mod pallet_child_bounties; -pub mod pallet_collective_council; -pub mod pallet_collective_technical_committee; pub mod pallet_conviction_voting; -pub mod pallet_democracy; pub mod pallet_election_provider_multi_phase; -pub mod pallet_elections_phragmen; pub mod pallet_fast_unstake; pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; -pub mod pallet_membership; pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nomination_pools; @@ -43,7 +38,6 @@ pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_staking; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/relay/polkadot/src/weights/pallet_asset_rate.rs b/relay/polkadot/src/weights/pallet_asset_rate.rs index e6fbff6374..e5925b44c0 100644 --- a/relay/polkadot/src/weights/pallet_asset_rate.rs +++ b/relay/polkadot/src/weights/pallet_asset_rate.rs @@ -17,24 +17,28 @@ //! Autogenerated weights for `pallet_asset_rate` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-03, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `cob`, CPU: `` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), 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/debug/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=2 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_asset_rate // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./runtime/kusama/src/weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,39 +51,39 @@ use core::marker::PhantomData; /// Weight functions for `pallet_asset_rate`. pub struct WeightInfo(PhantomData); impl pallet_asset_rate::WeightInfo for WeightInfo { - /// Storage: AssetRate ConversionRateToNative (r:1 w:1) - /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: // Measured: `42` - // Estimated: `4702` - // Minimum execution time: 53_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) - .saturating_add(Weight::from_parts(0, 4702)) + // Estimated: `4703` + // 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)) } - /// Storage: AssetRate ConversionRateToNative (r:1 w:1) - /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) fn update() -> Weight { // Proof Size summary in bytes: - // Measured: `110` - // Estimated: `4702` - // Minimum execution time: 60_000_000 picoseconds. - Weight::from_parts(60_000_000, 0) - .saturating_add(Weight::from_parts(0, 4702)) + // Measured: `111` + // Estimated: `4703` + // 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)) } - /// Storage: AssetRate ConversionRateToNative (r:1 w:1) - /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) fn remove() -> Weight { // Proof Size summary in bytes: - // Measured: `110` - // Estimated: `4702` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(74_000_000, 0) - .saturating_add(Weight::from_parts(0, 4702)) + // Measured: `111` + // Estimated: `4703` + // 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/polkadot/src/weights/pallet_bags_list.rs b/relay/polkadot/src/weights/pallet_bags_list.rs index e7338a3339..191b113cd0 100644 --- a/relay/polkadot/src/weights/pallet_bags_list.rs +++ b/relay/polkadot/src/weights/pallet_bags_list.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_bags_list -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,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: `1622` + // Measured: `1690` // Estimated: `11506` - // Minimum execution time: 54_576_000 picoseconds. - Weight::from_parts(56_332_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)) @@ -73,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: `1516` + // Measured: `1587` // Estimated: `8877` - // Minimum execution time: 52_962_000 picoseconds. - Weight::from_parts(55_159_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)) @@ -93,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: `1827` + // Measured: `1895` // Estimated: `11506` - // Minimum execution time: 59_654_000 picoseconds. - Weight::from_parts(62_365_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/polkadot/src/weights/pallet_balances.rs b/relay/polkadot/src/weights/pallet_balances.rs index 310beddb26..f29983fe02 100644 --- a/relay/polkadot/src/weights/pallet_balances.rs +++ b/relay/polkadot/src/weights/pallet_balances.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 48_512_000 picoseconds. - Weight::from_parts(50_179_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)) @@ -63,8 +69,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_473_000 picoseconds. - Weight::from_parts(38_583_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)) @@ -75,8 +81,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_934_000 picoseconds. - Weight::from_parts(14_557_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)) @@ -87,8 +93,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 20_682_000 picoseconds. - Weight::from_parts(21_454_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)) @@ -99,8 +105,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 50_269_000 picoseconds. - Weight::from_parts(52_669_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)) @@ -111,8 +117,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 45_013_000 picoseconds. - Weight::from_parts(48_155_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)) @@ -123,8 +129,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 16_212_000 picoseconds. - Weight::from_parts(16_713_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)) @@ -136,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: 15_527_000 picoseconds. - Weight::from_parts(15_887_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: 16_048 - .saturating_add(Weight::from_parts(14_095_956, 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/polkadot/src/weights/pallet_bounties.rs b/relay/polkadot/src/weights/pallet_bounties.rs index f424ed36d2..e80fcc99bc 100644 --- a/relay/polkadot/src/weights/pallet_bounties.rs +++ b/relay/polkadot/src/weights/pallet_bounties.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_bounties -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -56,13 +62,13 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// The range of component `d` is `[0, 16384]`. fn propose_bounty(d: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `143` + // Measured: `177` // Estimated: `3593` - // Minimum execution time: 25_453_000 picoseconds. - Weight::from_parts(27_275_253, 0) + // Minimum execution time: 22_171_000 picoseconds. + Weight::from_parts(23_262_533, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(677, 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)) } @@ -72,10 +78,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn approve_bounty() -> Weight { // Proof Size summary in bytes: - // Measured: `235` + // Measured: `269` // Estimated: `3642` - // Minimum execution time: 9_508_000 picoseconds. - Weight::from_parts(9_908_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)) @@ -84,10 +90,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) fn propose_curator() -> Weight { // Proof Size summary in bytes: - // Measured: `255` + // Measured: `289` // Estimated: `3642` - // Minimum execution time: 8_424_000 picoseconds. - Weight::from_parts(8_681_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)) @@ -98,10 +104,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn unassign_curator() -> Weight { // Proof Size summary in bytes: - // Measured: `431` + // Measured: `465` // Estimated: `3642` - // Minimum execution time: 37_420_000 picoseconds. - Weight::from_parts(39_066_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)) @@ -112,10 +118,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn accept_curator() -> Weight { // Proof Size summary in bytes: - // Measured: `427` + // Measured: `461` // Estimated: `3642` - // Minimum execution time: 24_433_000 picoseconds. - Weight::from_parts(25_456_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)) @@ -126,10 +132,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) fn award_bounty() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `368` // Estimated: `3642` - // Minimum execution time: 16_700_000 picoseconds. - Weight::from_parts(17_241_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)) @@ -144,10 +150,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) fn claim_bounty() -> Weight { // Proof Size summary in bytes: - // Measured: `698` + // Measured: `732` // Estimated: `8799` - // Minimum execution time: 109_074_000 picoseconds. - Weight::from_parts(113_353_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)) @@ -162,10 +168,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) fn close_bounty_proposed() -> Weight { // Proof Size summary in bytes: - // Measured: `378` + // Measured: `412` // Estimated: `3642` - // Minimum execution time: 41_148_000 picoseconds. - Weight::from_parts(42_374_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)) @@ -180,10 +186,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`) fn close_bounty_active() -> Weight { // Proof Size summary in bytes: - // Measured: `614` + // Measured: `648` // Estimated: `6196` - // Minimum execution time: 73_588_000 picoseconds. - Weight::from_parts(75_817_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)) @@ -192,10 +198,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) fn extend_bounty_expiry() -> Weight { // Proof Size summary in bytes: - // Measured: `291` + // Measured: `325` // Estimated: `3642` - // Minimum execution time: 13_817_000 picoseconds. - Weight::from_parts(14_415_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)) @@ -211,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: 4_195_000 picoseconds. - Weight::from_parts(4_286_000, 0) + // Minimum execution time: 2_778_000 picoseconds. + Weight::from_parts(2_822_000, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 12_106 - .saturating_add(Weight::from_parts(38_409_980, 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/polkadot/src/weights/pallet_child_bounties.rs b/relay/polkadot/src/weights/pallet_child_bounties.rs index 8990dcfe07..4cbddcd483 100644 --- a/relay/polkadot/src/weights/pallet_child_bounties.rs +++ b/relay/polkadot/src/weights/pallet_child_bounties.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_child_bounties -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,13 +66,13 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `474` + // Measured: `508` // Estimated: `6196` - // Minimum execution time: 62_937_000 picoseconds. - Weight::from_parts(65_409_591, 0) + // Minimum execution time: 57_823_000 picoseconds. + Weight::from_parts(59_248_311, 0) .saturating_add(Weight::from_parts(0, 6196)) // Standard Error: 7 - .saturating_add(Weight::from_parts(707, 0).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(731, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -78,10 +84,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `528` + // Measured: `562` // Estimated: `3642` - // Minimum execution time: 17_502_000 picoseconds. - Weight::from_parts(18_281_000, 0) + // Minimum execution time: 17_757_000 picoseconds. + Weight::from_parts(18_718_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -94,10 +100,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `674` + // Measured: `708` // Estimated: `3642` - // Minimum execution time: 31_003_000 picoseconds. - Weight::from_parts(31_766_000, 0) + // Minimum execution time: 29_783_000 picoseconds. + Weight::from_parts(30_464_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -110,10 +116,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `674` + // Measured: `708` // Estimated: `3642` - // Minimum execution time: 43_682_000 picoseconds. - Weight::from_parts(45_424_000, 0) + // Minimum execution time: 39_605_000 picoseconds. + Weight::from_parts(40_687_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -124,10 +130,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `571` + // Measured: `605` // Estimated: `3642` - // Minimum execution time: 21_305_000 picoseconds. - Weight::from_parts(22_034_000, 0) + // Minimum execution time: 19_064_000 picoseconds. + Weight::from_parts(19_738_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,8 +150,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `774` + // Measured: `808` // Estimated: `6196` - // Minimum execution time: 67_848_000 picoseconds. - Weight::from_parts(69_143_000, 0) + // Minimum execution time: 64_449_000 picoseconds. + Weight::from_parts(66_210_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -186,10 +192,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `961` + // Measured: `995` // Estimated: `8799` - // Minimum execution time: 82_185_000 picoseconds. - Weight::from_parts(84_570_000, 0) + // Minimum execution time: 79_206_000 picoseconds. + Weight::from_parts(80_574_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/relay/polkadot/src/weights/pallet_collective_council.rs b/relay/polkadot/src/weights/pallet_collective_council.rs deleted file mode 100644 index 0d75865bf2..0000000000 --- a/relay/polkadot/src/weights/pallet_collective_council.rs +++ /dev/null @@ -1,327 +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_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=polkadot-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_collective -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/polkadot/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_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: Council Members (r:1 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:100 w:100) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15762 + m * (1967 ±16) + p * (4332 ±16)` - // Minimum execution time: 17_563_000 picoseconds. - Weight::from_parts(17_790_000, 0) - .saturating_add(Weight::from_parts(0, 15762)) - // Standard Error: 43_106 - .saturating_add(Weight::from_parts(4_715_053, 0).saturating_mul(m.into())) - // Standard Error: 43_106 - .saturating_add(Weight::from_parts(8_200_250, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `1589 + m * (32 ±0)` - // Minimum execution time: 16_175_000 picoseconds. - Weight::from_parts(15_361_457, 0) - .saturating_add(Weight::from_parts(0, 1589)) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_795, 0).saturating_mul(b.into())) - // Standard Error: 184 - .saturating_add(Weight::from_parts(14_177, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:0) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `3569 + m * (32 ±0)` - // Minimum execution time: 18_948_000 picoseconds. - Weight::from_parts(18_240_525, 0) - .saturating_add(Weight::from_parts(0, 3569)) - // Standard Error: 21 - .saturating_add(Weight::from_parts(1_603, 0).saturating_mul(b.into())) - // Standard Error: 224 - .saturating_add(Weight::from_parts(22_805, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalCount (r:1 w:1) - /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `393 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 25_762_000 picoseconds. - Weight::from_parts(24_727_354, 0) - .saturating_add(Weight::from_parts(0, 3785)) - // Standard Error: 87 - .saturating_add(Weight::from_parts(3_653, 0).saturating_mul(b.into())) - // Standard Error: 908 - .saturating_add(Weight::from_parts(28_147, 0).saturating_mul(m.into())) - // Standard Error: 897 - .saturating_add(Weight::from_parts(198_752, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `842 + m * (64 ±0)` - // Estimated: `4306 + m * (64 ±0)` - // Minimum execution time: 26_644_000 picoseconds. - Weight::from_parts(27_694_655, 0) - .saturating_add(Weight::from_parts(0, 4306)) - // Standard Error: 624 - .saturating_add(Weight::from_parts(54_184, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `431 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 27_742_000 picoseconds. - Weight::from_parts(27_892_765, 0) - .saturating_add(Weight::from_parts(0, 3876)) - // Standard Error: 666 - .saturating_add(Weight::from_parts(35_102, 0).saturating_mul(m.into())) - // Standard Error: 649 - .saturating_add(Weight::from_parts(190_180, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 39_283_000 picoseconds. - Weight::from_parts(40_633_810, 0) - .saturating_add(Weight::from_parts(0, 4050)) - // Standard Error: 144 - .saturating_add(Weight::from_parts(3_292, 0).saturating_mul(b.into())) - // Standard Error: 1_524 - .saturating_add(Weight::from_parts(9_562, 0).saturating_mul(m.into())) - // Standard Error: 1_485 - .saturating_add(Weight::from_parts(237_159, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `451 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 30_417_000 picoseconds. - Weight::from_parts(30_840_007, 0) - .saturating_add(Weight::from_parts(0, 3896)) - // Standard Error: 662 - .saturating_add(Weight::from_parts(37_877, 0).saturating_mul(m.into())) - // Standard Error: 645 - .saturating_add(Weight::from_parts(189_312, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 41_630_000 picoseconds. - Weight::from_parts(42_847_316, 0) - .saturating_add(Weight::from_parts(0, 4070)) - // Standard Error: 134 - .saturating_add(Weight::from_parts(3_962, 0).saturating_mul(b.into())) - // Standard Error: 1_423 - .saturating_add(Weight::from_parts(22_489, 0).saturating_mul(m.into())) - // Standard Error: 1_387 - .saturating_add(Weight::from_parts(244_543, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `260 + p * (32 ±0)` - // Estimated: `1745 + p * (32 ±0)` - // Minimum execution time: 15_754_000 picoseconds. - Weight::from_parts(17_477_133, 0) - .saturating_add(Weight::from_parts(0, 1745)) - // Standard Error: 608 - .saturating_add(Weight::from_parts(178_320, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/relay/polkadot/src/weights/pallet_collective_technical_committee.rs b/relay/polkadot/src/weights/pallet_collective_technical_committee.rs deleted file mode 100644 index 07fb1209b0..0000000000 --- a/relay/polkadot/src/weights/pallet_collective_technical_committee.rs +++ /dev/null @@ -1,327 +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_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=polkadot-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_collective -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/polkadot/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_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: TechnicalCommittee Members (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:100 w:100) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15800 + m * (1967 ±16) + p * (4332 ±16)` - // Minimum execution time: 18_203_000 picoseconds. - Weight::from_parts(18_473_000, 0) - .saturating_add(Weight::from_parts(0, 15800)) - // Standard Error: 43_603 - .saturating_add(Weight::from_parts(4_734_955, 0).saturating_mul(m.into())) - // Standard Error: 43_603 - .saturating_add(Weight::from_parts(8_291_611, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141 + m * (32 ±0)` - // Estimated: `1627 + m * (32 ±0)` - // Minimum execution time: 17_071_000 picoseconds. - Weight::from_parts(16_315_595, 0) - .saturating_add(Weight::from_parts(0, 1627)) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_706, 0).saturating_mul(b.into())) - // Standard Error: 146 - .saturating_add(Weight::from_parts(13_626, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:0) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141 + m * (32 ±0)` - // Estimated: `3607 + m * (32 ±0)` - // Minimum execution time: 19_983_000 picoseconds. - Weight::from_parts(18_925_239, 0) - .saturating_add(Weight::from_parts(0, 3607)) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_664, 0).saturating_mul(b.into())) - // Standard Error: 176 - .saturating_add(Weight::from_parts(23_169, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalCount (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `431 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3823 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 26_490_000 picoseconds. - Weight::from_parts(25_739_853, 0) - .saturating_add(Weight::from_parts(0, 3823)) - // Standard Error: 77 - .saturating_add(Weight::from_parts(3_479, 0).saturating_mul(b.into())) - // Standard Error: 807 - .saturating_add(Weight::from_parts(28_438, 0).saturating_mul(m.into())) - // Standard Error: 796 - .saturating_add(Weight::from_parts(199_864, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `880 + m * (64 ±0)` - // Estimated: `4344 + m * (64 ±0)` - // Minimum execution time: 27_693_000 picoseconds. - Weight::from_parts(28_461_881, 0) - .saturating_add(Weight::from_parts(0, 4344)) - // Standard Error: 592 - .saturating_add(Weight::from_parts(55_442, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `469 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3914 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 28_958_000 picoseconds. - Weight::from_parts(28_772_598, 0) - .saturating_add(Weight::from_parts(0, 3914)) - // Standard Error: 673 - .saturating_add(Weight::from_parts(36_736, 0).saturating_mul(m.into())) - // Standard Error: 657 - .saturating_add(Weight::from_parts(191_282, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `771 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4088 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 40_599_000 picoseconds. - Weight::from_parts(40_617_733, 0) - .saturating_add(Weight::from_parts(0, 4088)) - // Standard Error: 122 - .saturating_add(Weight::from_parts(3_479, 0).saturating_mul(b.into())) - // Standard Error: 1_296 - .saturating_add(Weight::from_parts(34_407, 0).saturating_mul(m.into())) - // Standard Error: 1_263 - .saturating_add(Weight::from_parts(236_766, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `489 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3934 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 32_265_000 picoseconds. - Weight::from_parts(31_660_039, 0) - .saturating_add(Weight::from_parts(0, 3934)) - // Standard Error: 689 - .saturating_add(Weight::from_parts(39_118, 0).saturating_mul(m.into())) - // Standard Error: 672 - .saturating_add(Weight::from_parts(192_797, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `791 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4108 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 42_456_000 picoseconds. - Weight::from_parts(43_760_828, 0) - .saturating_add(Weight::from_parts(0, 4108)) - // Standard Error: 132 - .saturating_add(Weight::from_parts(3_531, 0).saturating_mul(b.into())) - // Standard Error: 1_397 - .saturating_add(Weight::from_parts(28_101, 0).saturating_mul(m.into())) - // Standard Error: 1_362 - .saturating_add(Weight::from_parts(248_244, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `298 + p * (32 ±0)` - // Estimated: `1783 + p * (32 ±0)` - // Minimum execution time: 16_506_000 picoseconds. - Weight::from_parts(18_127_000, 0) - .saturating_add(Weight::from_parts(0, 1783)) - // Standard Error: 616 - .saturating_add(Weight::from_parts(175_889, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/relay/polkadot/src/weights/pallet_conviction_voting.rs b/relay/polkadot/src/weights/pallet_conviction_voting.rs index c9761d9939..166475648f 100644 --- a/relay/polkadot/src/weights/pallet_conviction_voting.rs +++ b/relay/polkadot/src/weights/pallet_conviction_voting.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_conviction_voting -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,15 +60,15 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:1 w:1) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: - // Measured: `13445` + // Measured: `13480` // Estimated: `42428` - // Minimum execution time: 128_222_000 picoseconds. - Weight::from_parts(133_397_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)) @@ -76,15 +82,15 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:2 w:2) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: - // Measured: `14166` + // Measured: `14201` // Estimated: `83866` - // Minimum execution time: 193_274_000 picoseconds. - Weight::from_parts(206_120_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)) @@ -97,10 +103,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `13918` + // Measured: `13919` // Estimated: `83866` - // Minimum execution time: 169_729_000 picoseconds. - Weight::from_parts(181_847_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)) @@ -111,10 +117,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) fn remove_other_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `13004` + // Measured: `13005` // Estimated: `30706` - // Minimum execution time: 74_834_000 picoseconds. - Weight::from_parts(83_047_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)) @@ -130,17 +136,17 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 512]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `29640 + r * (365 ±0)` + // Measured: `29675 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 65_741_000 picoseconds. - Weight::from_parts(1_683_585_056, 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: 146_560 - .saturating_add(Weight::from_parts(40_661_211, 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)) @@ -156,13 +162,13 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// The range of component `r` is `[0, 512]`. fn undelegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `29555 + r * (365 ±0)` + // Measured: `29556 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 38_557_000 picoseconds. - Weight::from_parts(1_664_510_198, 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: 147_721 - .saturating_add(Weight::from_parts(40_405_805, 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)) @@ -176,13 +182,13 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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: 94_790_000 picoseconds. - Weight::from_parts(100_982_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/polkadot/src/weights/pallet_democracy.rs b/relay/polkadot/src/weights/pallet_democracy.rs deleted file mode 100644 index 069b10a2bc..0000000000 --- a/relay/polkadot/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,528 +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_democracy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=polkadot-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_democracy -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/polkadot/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_democracy`. -pub struct WeightInfo(PhantomData); -impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: Democracy PublicPropCount (r:1 w:1) - /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:0 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - fn propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `4768` - // Estimated: `18187` - // Minimum execution time: 47_165_000 picoseconds. - Weight::from_parts(48_488_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - fn second() -> Weight { - // Proof Size summary in bytes: - // Measured: `3523` - // Estimated: `6695` - // Minimum execution time: 41_328_000 picoseconds. - Weight::from_parts(42_526_000, 0) - .saturating_add(Weight::from_parts(0, 6695)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - fn vote_new() -> Weight { - // Proof Size summary in bytes: - // Measured: `3437` - // Estimated: `7260` - // Minimum execution time: 57_941_000 picoseconds. - Weight::from_parts(59_547_000, 0) - .saturating_add(Weight::from_parts(0, 7260)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - fn vote_existing() -> Weight { - // Proof Size summary in bytes: - // Measured: `3459` - // Estimated: `7260` - // Minimum execution time: 63_933_000 picoseconds. - Weight::from_parts(65_560_000, 0) - .saturating_add(Weight::from_parts(0, 7260)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Cancellations (r:1 w:1) - /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn emergency_cancel() -> Weight { - // Proof Size summary in bytes: - // Measured: `333` - // Estimated: `3666` - // Minimum execution time: 26_501_000 picoseconds. - Weight::from_parts(26_882_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:3 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:0 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - fn blacklist() -> Weight { - // Proof Size summary in bytes: - // Measured: `5877` - // Estimated: `18187` - // Minimum execution time: 111_868_000 picoseconds. - Weight::from_parts(116_733_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - fn external_propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `3383` - // Estimated: `6703` - // Minimum execution time: 13_786_000 picoseconds. - Weight::from_parts(14_280_000, 0) - .saturating_add(Weight::from_parts(0, 6703)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - fn external_propose_majority() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_320_000 picoseconds. - Weight::from_parts(3_467_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - fn external_propose_default() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_540_000 picoseconds. - Weight::from_parts(3_681_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:1) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:2) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - fn fast_track() -> Weight { - // Proof Size summary in bytes: - // Measured: `253` - // Estimated: `3518` - // Minimum execution time: 28_074_000 picoseconds. - Weight::from_parts(28_980_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn veto_external() -> Weight { - // Proof Size summary in bytes: - // Measured: `3486` - // Estimated: `6703` - // Minimum execution time: 32_243_000 picoseconds. - Weight::from_parts(32_604_000, 0) - .saturating_add(Weight::from_parts(0, 6703)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn cancel_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `5788` - // Estimated: `18187` - // Minimum execution time: 93_410_000 picoseconds. - Weight::from_parts(95_323_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - fn cancel_referendum() -> Weight { - // Proof Size summary in bytes: - // Measured: `238` - // Estimated: `3518` - // Minimum execution time: 20_185_000 picoseconds. - Weight::from_parts(20_661_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + r * (86 ±0)` - // Estimated: `1489 + r * (2676 ±0)` - // Minimum execution time: 7_484_000 picoseconds. - Weight::from_parts(8_532_503, 0) - .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 6_320 - .saturating_add(Weight::from_parts(3_176_208, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy LastTabledWasExternal (r:1 w:0) - /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + r * (86 ±0)` - // Estimated: `18187 + r * (2676 ±0)` - // Minimum execution time: 10_406_000 picoseconds. - Weight::from_parts(11_689_093, 0) - .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 7_450 - .saturating_add(Weight::from_parts(3_172_162, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy VotingOf (r:3 w:3) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn delegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `797 + r * (108 ±0)` - // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 42_210_000 picoseconds. - Weight::from_parts(47_151_756, 0) - .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 9_095 - .saturating_add(Weight::from_parts(4_553_285, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy VotingOf (r:2 w:2) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn undelegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `460 + r * (108 ±0)` - // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 21_815_000 picoseconds. - Weight::from_parts(21_914_769, 0) - .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 7_866 - .saturating_add(Weight::from_parts(4_497_036, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: Democracy PublicProps (r:0 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - fn clear_public_proposals() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_315_000 picoseconds. - Weight::from_parts(3_525_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn unlock_remove(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `530` - // Estimated: `7260` - // Minimum execution time: 25_326_000 picoseconds. - Weight::from_parts(40_406_995, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 3_775 - .saturating_add(Weight::from_parts(111_536, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `r` is `[0, 99]`. - fn unlock_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `531 + r * (22 ±0)` - // Estimated: `7260` - // Minimum execution time: 35_263_000 picoseconds. - Weight::from_parts(39_034_189, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 2_263 - .saturating_add(Weight::from_parts(143_605, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// The range of component `r` is `[1, 100]`. - fn remove_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `695 + r * (26 ±0)` - // Estimated: `7260` - // Minimum execution time: 15_880_000 picoseconds. - Weight::from_parts(19_395_916, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_616 - .saturating_add(Weight::from_parts(144_889, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// The range of component `r` is `[1, 100]`. - fn remove_other_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `695 + r * (26 ±0)` - // Estimated: `7260` - // Minimum execution time: 16_157_000 picoseconds. - Weight::from_parts(19_671_561, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_803 - .saturating_add(Weight::from_parts(143_214, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn set_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `323` - // Estimated: `3556` - // Minimum execution time: 18_768_000 picoseconds. - Weight::from_parts(19_420_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn clear_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `253` - // Estimated: `3518` - // Minimum execution time: 17_184_000 picoseconds. - Weight::from_parts(17_768_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn set_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `4855` - // Estimated: `18187` - // Minimum execution time: 40_295_000 picoseconds. - Weight::from_parts(41_356_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn clear_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `4789` - // Estimated: `18187` - // Minimum execution time: 37_215_000 picoseconds. - Weight::from_parts(38_297_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn set_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `144` - // Estimated: `3556` - // Minimum execution time: 14_960_000 picoseconds. - Weight::from_parts(15_339_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - fn clear_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `269` - // Estimated: `3666` - // Minimum execution time: 19_182_000 picoseconds. - Weight::from_parts(19_788_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/relay/polkadot/src/weights/pallet_election_provider_multi_phase.rs b/relay/polkadot/src/weights/pallet_election_provider_multi_phase.rs index c9621c041f..1d4de5ca16 100644 --- a/relay/polkadot/src/weights/pallet_election_provider_multi_phase.rs +++ b/relay/polkadot/src/weights/pallet_election_provider_multi_phase.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_election_provider_multi_phase -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,35 +71,35 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `784` // Estimated: `3481` - // Minimum execution time: 19_117_000 picoseconds. - Weight::from_parts(19_797_000, 0) + // Minimum execution time: 16_549_000 picoseconds. + Weight::from_parts(17_200_000, 0) .saturating_add(Weight::from_parts(0, 3481)) .saturating_add(T::DbWeight::get().reads(8)) } - /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) - /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_open_signed() -> Weight { // Proof Size summary in bytes: // Measured: `43` // Estimated: `1528` - // Minimum execution time: 7_453_000 picoseconds. - Weight::from_parts(7_796_000, 0) + // Minimum execution time: 7_594_000 picoseconds. + Weight::from_parts(8_221_000, 0) .saturating_add(Weight::from_parts(0, 1528)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) - /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_open_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `43` // Estimated: `1528` - // Minimum execution time: 8_189_000 picoseconds. - Weight::from_parts(8_468_000, 0) + // Minimum execution time: 8_584_000 picoseconds. + Weight::from_parts(8_850_000, 0) .saturating_add(Weight::from_parts(0, 1528)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +112,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 27_592_000 picoseconds. - Weight::from_parts(28_181_000, 0) + // Minimum execution time: 22_566_000 picoseconds. + Weight::from_parts(23_092_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -118,8 +124,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 18_697_000 picoseconds. - Weight::from_parts(19_223_000, 0) + // Minimum execution time: 15_519_000 picoseconds. + Weight::from_parts(15_707_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -132,15 +138,17 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. - fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { + fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 437_879_000 picoseconds. - Weight::from_parts(471_515_000, 0) + // Minimum execution time: 493_575_000 picoseconds. + Weight::from_parts(11_314_417, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_983 - .saturating_add(Weight::from_parts(495_215, 0).saturating_mul(v.into())) + // Standard Error: 5_873 + .saturating_add(Weight::from_parts(490_148, 0).saturating_mul(v.into())) + // Standard Error: 11_741 + .saturating_add(Weight::from_parts(68_456, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) @@ -167,11 +175,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `266 + a * (768 ±0) + d * (48 ±0)` // Estimated: `3818 + a * (768 ±0) + d * (49 ±0)` - // Minimum execution time: 423_047_000 picoseconds. - Weight::from_parts(458_300_000, 0) + // Minimum execution time: 391_175_000 picoseconds. + Weight::from_parts(420_532_000, 0) .saturating_add(Weight::from_parts(0, 3818)) - // Standard Error: 6_360 - .saturating_add(Weight::from_parts(369_752, 0).saturating_mul(a.into())) + // Standard Error: 6_587 + .saturating_add(Weight::from_parts(337_502, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into())) @@ -181,20 +189,20 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0) /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) - /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1) /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1) /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit() -> Weight { // Proof Size summary in bytes: // Measured: `1133` // Estimated: `2618` - // Minimum execution time: 45_937_000 picoseconds. - Weight::from_parts(47_427_000, 0) + // Minimum execution time: 43_731_000 picoseconds. + Weight::from_parts(45_638_000, 0) .saturating_add(Weight::from_parts(0, 2618)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -221,13 +229,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `148 + t * (32 ±0) + v * (553 ±0)` // Estimated: `1633 + t * (32 ±0) + v * (553 ±0)` - // Minimum execution time: 6_302_279_000 picoseconds. - Weight::from_parts(6_416_740_000, 0) + // Minimum execution time: 5_919_627_000 picoseconds. + Weight::from_parts(6_080_024_000, 0) .saturating_add(Weight::from_parts(0, 1633)) - // Standard Error: 19_877 - .saturating_add(Weight::from_parts(411_851, 0).saturating_mul(v.into())) - // Standard Error: 58_904 - .saturating_add(Weight::from_parts(4_359_798, 0).saturating_mul(a.into())) + // Standard Error: 20_169 + .saturating_add(Weight::from_parts(307_946, 0).saturating_mul(v.into())) + // Standard Error: 59_769 + .saturating_add(Weight::from_parts(4_574_567, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) @@ -249,13 +257,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `123 + t * (32 ±0) + v * (553 ±0)` // Estimated: `1608 + t * (32 ±0) + v * (553 ±0)` - // Minimum execution time: 5_258_564_000 picoseconds. - Weight::from_parts(5_419_878_000, 0) + // Minimum execution time: 4_807_127_000 picoseconds. + Weight::from_parts(5_070_342_000, 0) .saturating_add(Weight::from_parts(0, 1608)) - // Standard Error: 17_148 - .saturating_add(Weight::from_parts(362_723, 0).saturating_mul(v.into())) - // Standard Error: 50_818 - .saturating_add(Weight::from_parts(3_319_889, 0).saturating_mul(a.into())) + // Standard Error: 22_115 + .saturating_add(Weight::from_parts(392_514, 0).saturating_mul(v.into())) + // Standard Error: 65_536 + .saturating_add(Weight::from_parts(3_256_507, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into())) diff --git a/relay/polkadot/src/weights/pallet_elections_phragmen.rs b/relay/polkadot/src/weights/pallet_elections_phragmen.rs deleted file mode 100644 index e93de0c14c..0000000000 --- a/relay/polkadot/src/weights/pallet_elections_phragmen.rs +++ /dev/null @@ -1,318 +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_elections_phragmen` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=polkadot-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_elections_phragmen -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/polkadot/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_elections_phragmen`. -pub struct WeightInfo(PhantomData); -impl pallet_elections_phragmen::WeightInfo for WeightInfo { - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - /// The range of component `v` is `[1, 16]`. - fn vote_equal(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `369 + v * (80 ±0)` - // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 32_711_000 picoseconds. - Weight::from_parts(33_843_954, 0) - .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 3_332 - .saturating_add(Weight::from_parts(148_060, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - /// The range of component `v` is `[2, 16]`. - fn vote_more(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `337 + v * (80 ±0)` - // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 46_078_000 picoseconds. - Weight::from_parts(46_574_818, 0) - .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 3_834 - .saturating_add(Weight::from_parts(182_895, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - /// The range of component `v` is `[2, 16]`. - fn vote_less(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `369 + v * (80 ±0)` - // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 45_677_000 picoseconds. - Weight::from_parts(46_613_391, 0) - .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 4_271 - .saturating_add(Weight::from_parts(180_095, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Voting (r:1 w:1) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// 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(49), added: 2524, mode: MaxEncodedLen) - fn remove_voter() -> Weight { - // Proof Size summary in bytes: - // Measured: `891` - // Estimated: `4764` - // Minimum execution time: 47_963_000 picoseconds. - Weight::from_parts(48_833_000, 0) - .saturating_add(Weight::from_parts(0, 4764)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Candidates (r:1 w:1) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `c` is `[1, 1000]`. - fn submit_candidacy(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `2358 + c * (48 ±0)` - // Estimated: `3841 + c * (48 ±0)` - // Minimum execution time: 39_368_000 picoseconds. - Weight::from_parts(28_568_416, 0) - .saturating_add(Weight::from_parts(0, 3841)) - // Standard Error: 1_416 - .saturating_add(Weight::from_parts(131_107, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:1) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `c` is `[1, 1000]`. - fn renounce_candidacy_candidate(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `250 + c * (48 ±0)` - // Estimated: `1722 + c * (48 ±0)` - // Minimum execution time: 34_977_000 picoseconds. - Weight::from_parts(24_677_388, 0) - .saturating_add(Weight::from_parts(0, 1722)) - // Standard Error: 1_498 - .saturating_add(Weight::from_parts(100_855, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) - } - /// Storage: PhragmenElection Members (r:1 w:1) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn renounce_candidacy_members() -> Weight { - // Proof Size summary in bytes: - // Measured: `2599` - // Estimated: `4084` - // Minimum execution time: 52_891_000 picoseconds. - Weight::from_parts(53_852_000, 0) - .saturating_add(Weight::from_parts(0, 4084)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - fn renounce_candidacy_runners_up() -> Weight { - // Proof Size summary in bytes: - // Measured: `1711` - // Estimated: `3196` - // Minimum execution time: 36_514_000 picoseconds. - Weight::from_parts(37_441_000, 0) - .saturating_add(Weight::from_parts(0, 3196)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) - fn remove_member_without_replacement() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000_000_000 picoseconds. - Weight::from_parts(2_000_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: PhragmenElection Members (r:1 w:1) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn remove_member_with_replacement() -> Weight { - // Proof Size summary in bytes: - // Measured: `2599` - // Estimated: `4084` - // Minimum execution time: 73_160_000 picoseconds. - Weight::from_parts(74_548_000, 0) - .saturating_add(Weight::from_parts(0, 4084)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: PhragmenElection Voting (r:10001 w:10000) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:0) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Candidates (r:1 w:0) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Locks (r:10000 w:10000) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:10000 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:10000 w:10000) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[0, 5000]`. - fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `36028 + v * (808 ±0)` - // Estimated: `39768 + v * (3774 ±0)` - // Minimum execution time: 434_369_619_000 picoseconds. - Weight::from_parts(436_606_328_000, 0) - .saturating_add(Weight::from_parts(0, 39768)) - // Standard Error: 365_744 - .saturating_add(Weight::from_parts(53_633_149, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) - .saturating_add(Weight::from_parts(0, 3774).saturating_mul(v.into())) - } - /// Storage: PhragmenElection Candidates (r:1 w:1) - /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:1) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection RunnersUp (r:1 w:1) - /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PhragmenElection Voting (r:10001 w:0) - /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:967 w:967) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: PhragmenElection ElectionRounds (r:1 w:1) - /// Proof Skipped: PhragmenElection ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `c` is `[1, 1000]`. - /// The range of component `v` is `[1, 10000]`. - /// The range of component `e` is `[10000, 160000]`. - fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + e * (28 ±0) + v * (607 ±0)` - // Estimated: `2771984 + c * (2560 ±0) + e * (16 ±0) + v * (2744 ±4)` - // Minimum execution time: 39_817_678_000 picoseconds. - Weight::from_parts(40_023_537_000, 0) - .saturating_add(Weight::from_parts(0, 2771984)) - // Standard Error: 411_583 - .saturating_add(Weight::from_parts(34_005_169, 0).saturating_mul(v.into())) - // Standard Error: 26_412 - .saturating_add(Weight::from_parts(1_743_887, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(269)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes(6)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 2560).saturating_mul(c.into())) - .saturating_add(Weight::from_parts(0, 16).saturating_mul(e.into())) - .saturating_add(Weight::from_parts(0, 2744).saturating_mul(v.into())) - } -} diff --git a/relay/polkadot/src/weights/pallet_fast_unstake.rs b/relay/polkadot/src/weights/pallet_fast_unstake.rs index 8a0bb850ab..99a6014500 100644 --- a/relay/polkadot/src/weights/pallet_fast_unstake.rs +++ b/relay/polkadot/src/weights/pallet_fast_unstake.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_fast_unstake -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,32 +67,32 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::Bonded` (r:16 w:16) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:16 w:16) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:16 w:16) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:16 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:16 w:16) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Validators` (r:16 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:16 w:0) /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:16 w:16) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:16 w:16) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:16 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:0 w:16) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:16) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 16]`. fn on_idle_unstake(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `952 + b * (359 ±0)` - // Estimated: `2437 + b * (3774 ±0)` - // Minimum execution time: 77_144_000 picoseconds. - Weight::from_parts(34_716_697, 0) - .saturating_add(Weight::from_parts(0, 2437)) - // Standard Error: 39_041 - .saturating_add(Weight::from_parts(48_339_863, 0).saturating_mul(b.into())) + // Measured: `1215 + b * (463 ±0)` + // Estimated: `2700 + b * (3774 ±0)` + // Minimum execution time: 82_467_000 picoseconds. + Weight::from_parts(31_017_928, 0) + .saturating_add(Weight::from_parts(0, 2700)) + // Standard Error: 52_657 + .saturating_add(Weight::from_parts(55_469_038, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(b.into()))) .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into())) @@ -109,15 +115,15 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// The range of component `b` is `[1, 16]`. fn on_idle_check(v: u32, b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1306 + b * (48 ±0) + v * (19511 ±0)` - // Estimated: `4621 + b * (52 ±0) + v * (21987 ±0)` - // Minimum execution time: 607_607_000 picoseconds. - Weight::from_parts(613_410_000, 0) - .saturating_add(Weight::from_parts(0, 4621)) - // Standard Error: 5_494_473 - .saturating_add(Weight::from_parts(184_402_413, 0).saturating_mul(v.into())) - // Standard Error: 88_169_789 - .saturating_add(Weight::from_parts(2_747_475_516, 0).saturating_mul(b.into())) + // Measured: `1305 + b * (48 ±0) + v * (19512 ±0)` + // Estimated: `4622 + b * (52 ±0) + v * (21987 ±0)` + // Minimum execution time: 629_770_000 picoseconds. + Weight::from_parts(634_063_000, 0) + .saturating_add(Weight::from_parts(0, 4622)) + // Standard Error: 5_754_178 + .saturating_add(Weight::from_parts(192_402_127, 0).saturating_mul(v.into())) + // Standard Error: 92_337_284 + .saturating_add(Weight::from_parts(2_884_678_113, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -151,15 +157,15 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `FastUnstake::CounterForQueue` (r:1 w:1) /// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn register_fast_unstake() -> Weight { // Proof Size summary in bytes: - // Measured: `1885` + // Measured: `2077` // Estimated: `6248` - // Minimum execution time: 120_901_000 picoseconds. - Weight::from_parts(126_770_000, 0) + // Minimum execution time: 112_231_000 picoseconds. + Weight::from_parts(116_342_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(10)) @@ -176,10 +182,10 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo /// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn deregister() -> Weight { // Proof Size summary in bytes: - // Measured: `1084` + // Measured: `1118` // Estimated: `4556` - // Minimum execution time: 40_381_000 picoseconds. - Weight::from_parts(41_695_000, 0) + // Minimum execution time: 36_887_000 picoseconds. + Weight::from_parts(38_022_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -190,8 +196,8 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_194_000 picoseconds. - Weight::from_parts(2_317_000, 0) + // Minimum execution time: 2_031_000 picoseconds. + Weight::from_parts(2_168_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/polkadot/src/weights/pallet_identity.rs b/relay/polkadot/src/weights/pallet_identity.rs index be63487a97..758715c6eb 100644 --- a/relay/polkadot/src/weights/pallet_identity.rs +++ b/relay/polkadot/src/weights/pallet_identity.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_identity -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +58,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 10_592_000 picoseconds. - Weight::from_parts(11_433_343, 0) + // Minimum execution time: 7_733_000 picoseconds. + Weight::from_parts(8_366_649, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 2_165 - .saturating_add(Weight::from_parts(107_392, 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)) } @@ -68,13 +74,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `442 + r * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 29_921_000 picoseconds. - Weight::from_parts(28_819_468, 0) + // Minimum execution time: 27_475_000 picoseconds. + Weight::from_parts(24_816_235, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_148 - .saturating_add(Weight::from_parts(143_283, 0).saturating_mul(r.into())) - // Standard Error: 809 - .saturating_add(Weight::from_parts(374_343, 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: 8_351_000 picoseconds. - Weight::from_parts(21_002_939, 0) + // Minimum execution time: 8_375_000 picoseconds. + Weight::from_parts(18_446_361, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 5_058 - .saturating_add(Weight::from_parts(2_985_826, 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: 8_168_000 picoseconds. - Weight::from_parts(21_688_162, 0) + // Minimum execution time: 8_419_000 picoseconds. + Weight::from_parts(19_014_707, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 5_507 - .saturating_add(Weight::from_parts(1_259_620, 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()))) @@ -133,15 +139,15 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 50_899_000 picoseconds. - Weight::from_parts(23_919_723, 0) + // Minimum execution time: 52_441_000 picoseconds. + Weight::from_parts(28_075_401, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 24_805 - .saturating_add(Weight::from_parts(309_252, 0).saturating_mul(r.into())) - // Standard Error: 4_844 - .saturating_add(Weight::from_parts(1_296_722, 0).saturating_mul(s.into())) - // Standard Error: 4_844 - .saturating_add(Weight::from_parts(250_637, 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()))) @@ -156,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: 30_696_000 picoseconds. - Weight::from_parts(28_576_581, 0) + // Minimum execution time: 26_848_000 picoseconds. + Weight::from_parts(25_011_542, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_633 - .saturating_add(Weight::from_parts(199_810, 0).saturating_mul(r.into())) - // Standard Error: 904 - .saturating_add(Weight::from_parts(393_551, 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)) } @@ -174,13 +180,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398 + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 27_213_000 picoseconds. - Weight::from_parts(27_512_661, 0) + // Minimum execution time: 24_370_000 picoseconds. + Weight::from_parts(23_616_593, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_273 - .saturating_add(Weight::from_parts(100_122, 0).saturating_mul(r.into())) - // Standard Error: 833 - .saturating_add(Weight::from_parts(383_720, 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)) } @@ -191,11 +197,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_365_000 picoseconds. - Weight::from_parts(6_869_288, 0) + // Minimum execution time: 5_515_000 picoseconds. + Weight::from_parts(6_052_251, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_139 - .saturating_add(Weight::from_parts(77_496, 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)) } @@ -206,11 +212,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_248_000 picoseconds. - Weight::from_parts(6_815_435, 0) + // Minimum execution time: 5_911_000 picoseconds. + Weight::from_parts(6_258_125, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 937 - .saturating_add(Weight::from_parts(80_674, 0).saturating_mul(r.into())) + // 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)) } @@ -221,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_386_000 picoseconds. - Weight::from_parts(6_889_903, 0) + // Minimum execution time: 5_690_000 picoseconds. + Weight::from_parts(6_049_149, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_467 - .saturating_add(Weight::from_parts(75_937, 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)) } @@ -239,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: 21_393_000 picoseconds. - Weight::from_parts(20_856_136, 0) + // Minimum execution time: 19_558_000 picoseconds. + Weight::from_parts(18_348_326, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_273 - .saturating_add(Weight::from_parts(112_498, 0).saturating_mul(r.into())) - // Standard Error: 790 - .saturating_add(Weight::from_parts(628_545, 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)) } @@ -264,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: 66_546_000 picoseconds. - Weight::from_parts(35_967_174, 0) + // Minimum execution time: 66_002_000 picoseconds. + Weight::from_parts(39_371_039, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 24_918 - .saturating_add(Weight::from_parts(670_971, 0).saturating_mul(r.into())) - // Standard Error: 4_866 - .saturating_add(Weight::from_parts(1_317_531, 0).saturating_mul(s.into())) - // Standard Error: 4_866 - .saturating_add(Weight::from_parts(268_630, 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()))) @@ -288,11 +294,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `475 + s * (36 ±0)` // Estimated: `11003` - // Minimum execution time: 26_375_000 picoseconds. - Weight::from_parts(30_738_363, 0) + // Minimum execution time: 24_323_000 picoseconds. + Weight::from_parts(27_243_349, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_582 - .saturating_add(Weight::from_parts(122_854, 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)) } @@ -305,11 +311,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `591 + s * (3 ±0)` // Estimated: `11003` - // Minimum execution time: 11_436_000 picoseconds. - Weight::from_parts(15_073_494, 0) + // Minimum execution time: 11_716_000 picoseconds. + Weight::from_parts(15_075_277, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 997 - .saturating_add(Weight::from_parts(48_603, 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)) } @@ -324,11 +330,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `638 + s * (35 ±0)` // Estimated: `11003` - // Minimum execution time: 32_693_000 picoseconds. - Weight::from_parts(35_058_166, 0) + // Minimum execution time: 29_421_000 picoseconds. + Weight::from_parts(30_979_411, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_122 - .saturating_add(Weight::from_parts(83_914, 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)) } @@ -343,11 +349,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `704 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 24_803_000 picoseconds. - Weight::from_parts(26_684_339, 0) + // Minimum execution time: 22_936_000 picoseconds. + Weight::from_parts(24_517_892, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 760 - .saturating_add(Weight::from_parts(82_389, 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/polkadot/src/weights/pallet_im_online.rs b/relay/polkadot/src/weights/pallet_im_online.rs index ee31f2bf9a..3e20819f97 100644 --- a/relay/polkadot/src/weights/pallet_im_online.rs +++ b/relay/polkadot/src/weights/pallet_im_online.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_im_online -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,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: `361 + k * (32 ±0)` + // Measured: `559 + k * (32 ±0)` // Estimated: `321487 + k * (1761 ±0)` - // Minimum execution time: 79_067_000 picoseconds. - Weight::from_parts(98_684_161, 0) + // Minimum execution time: 76_514_000 picoseconds. + Weight::from_parts(93_114_641, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 656 - .saturating_add(Weight::from_parts(35_001, 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/polkadot/src/weights/pallet_indices.rs b/relay/polkadot/src/weights/pallet_indices.rs index 8dda7f5802..7b62b08968 100644 --- a/relay/polkadot/src/weights/pallet_indices.rs +++ b/relay/polkadot/src/weights/pallet_indices.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_indices -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3534` - // Minimum execution time: 21_622_000 picoseconds. - Weight::from_parts(22_432_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)) @@ -65,8 +71,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 32_186_000 picoseconds. - Weight::from_parts(33_034_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)) @@ -77,8 +83,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 22_981_000 picoseconds. - Weight::from_parts(23_764_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)) @@ -91,8 +97,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 24_593_000 picoseconds. - Weight::from_parts(25_413_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)) @@ -103,8 +109,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 24_713_000 picoseconds. - Weight::from_parts(25_482_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/polkadot/src/weights/pallet_membership.rs b/relay/polkadot/src/weights/pallet_membership.rs deleted file mode 100644 index a4e5ce4a7b..0000000000 --- a/relay/polkadot/src/weights/pallet_membership.rs +++ /dev/null @@ -1,207 +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_membership` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=polkadot-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_membership -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/polkadot/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_membership`. -pub struct WeightInfo(PhantomData); -impl pallet_membership::WeightInfo for WeightInfo { - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 99]`. - fn add_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `174 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 17_443_000 picoseconds. - Weight::from_parts(18_272_399, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 376 - .saturating_add(Weight::from_parts(33_633, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:0) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[2, 100]`. - fn remove_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `278 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 19_826_000 picoseconds. - Weight::from_parts(20_859_732, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 667 - .saturating_add(Weight::from_parts(33_155, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:0) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[2, 100]`. - fn swap_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `278 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 20_151_000 picoseconds. - Weight::from_parts(20_774_114, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 447 - .saturating_add(Weight::from_parts(44_052, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:0) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn reset_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `278 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 19_846_000 picoseconds. - Weight::from_parts(20_903_563, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 865 - .saturating_add(Weight::from_parts(149_306, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:1) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalMembership Prime (r:1 w:1) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Members (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn change_key(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `278 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 20_523_000 picoseconds. - Weight::from_parts(21_705_085, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 948 - .saturating_add(Weight::from_parts(44_568, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Members (r:1 w:0) - /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: TechnicalMembership Prime (r:0 w:1) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn set_prime(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `32 + m * (32 ±0)` - // Estimated: `4687 + m * (32 ±0)` - // Minimum execution time: 8_032_000 picoseconds. - Weight::from_parts(8_386_682, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 190 - .saturating_add(Weight::from_parts(9_724, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: TechnicalMembership Prime (r:0 w:1) - /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[1, 100]`. - fn clear_prime(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_061_000 picoseconds. - Weight::from_parts(3_304_217, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 80 - .saturating_add(Weight::from_parts(273, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/relay/polkadot/src/weights/pallet_message_queue.rs b/relay/polkadot/src/weights/pallet_message_queue.rs index 61c1d2aa75..dd801c29f1 100644 --- a/relay/polkadot/src/weights/pallet_message_queue.rs +++ b/relay/polkadot/src/weights/pallet_message_queue.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_message_queue -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 13_384_000 picoseconds. - Weight::from_parts(13_959_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)) @@ -67,8 +73,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 12_676_000 picoseconds. - Weight::from_parts(13_250_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)) @@ -79,8 +85,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `42` // Estimated: `3520` - // Minimum execution time: 3_691_000 picoseconds. - Weight::from_parts(4_016_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)) @@ -91,8 +97,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 5_466_000 picoseconds. - Weight::from_parts(5_720_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)) @@ -103,8 +109,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 5_590_000 picoseconds. - Weight::from_parts(5_876_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)) @@ -113,8 +119,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 93_834_000 picoseconds. - Weight::from_parts(94_578_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) @@ -125,8 +131,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `220` // Estimated: `3520` - // Minimum execution time: 7_010_000 picoseconds. - Weight::from_parts(7_393_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)) @@ -143,8 +149,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 57_844_000 picoseconds. - Weight::from_parts(59_627_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)) @@ -161,8 +167,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 73_673_000 picoseconds. - Weight::from_parts(74_898_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)) @@ -179,8 +185,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 113_910_000 picoseconds. - Weight::from_parts(117_052_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/polkadot/src/weights/pallet_multisig.rs b/relay/polkadot/src/weights/pallet_multisig.rs index e1c0f8bf0e..557ef18d9c 100644 --- a/relay/polkadot/src/weights/pallet_multisig.rs +++ b/relay/polkadot/src/weights/pallet_multisig.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +56,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_504_000 picoseconds. - Weight::from_parts(13_886_909, 0) + // Minimum execution time: 12_662_000 picoseconds. + Weight::from_parts(13_481_934, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 4 - .saturating_add(Weight::from_parts(475, 0).saturating_mul(z.into())) + .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`) @@ -64,13 +70,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `267 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 43_608_000 picoseconds. - Weight::from_parts(30_357_018, 0) + // Minimum execution time: 41_446_000 picoseconds. + Weight::from_parts(28_224_090, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_152 - .saturating_add(Weight::from_parts(152_625, 0).saturating_mul(s.into())) - // Standard Error: 11 - .saturating_add(Weight::from_parts(1_517, 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)) } @@ -82,13 +88,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `286` // Estimated: `6811` - // Minimum execution time: 28_218_000 picoseconds. - Weight::from_parts(17_826_935, 0) + // Minimum execution time: 25_377_000 picoseconds. + Weight::from_parts(16_607_084, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 542 - .saturating_add(Weight::from_parts(112_939, 0).saturating_mul(s.into())) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_419, 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)) } @@ -102,13 +108,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `392 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 46_663_000 picoseconds. - Weight::from_parts(34_291_681, 0) + // Minimum execution time: 45_986_000 picoseconds. + Weight::from_parts(34_083_317, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_674 - .saturating_add(Weight::from_parts(187_582, 0).saturating_mul(s.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_663, 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)) } @@ -119,11 +125,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `267 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 27_875_000 picoseconds. - Weight::from_parts(29_607_829, 0) + // Minimum execution time: 25_804_000 picoseconds. + Weight::from_parts(27_560_338, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_877 - .saturating_add(Weight::from_parts(158_804, 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)) } @@ -134,11 +140,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `286` // Estimated: `6811` - // Minimum execution time: 16_069_000 picoseconds. - Weight::from_parts(16_866_363, 0) + // Minimum execution time: 14_894_000 picoseconds. + Weight::from_parts(15_336_125, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 855 - .saturating_add(Weight::from_parts(102_679, 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)) } @@ -149,11 +155,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `458 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 29_662_000 picoseconds. - Weight::from_parts(33_274_185, 0) + // Minimum execution time: 27_780_000 picoseconds. + Weight::from_parts(30_590_352, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_558 - .saturating_add(Weight::from_parts(131_959, 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/polkadot/src/weights/pallet_nomination_pools.rs b/relay/polkadot/src/weights/pallet_nomination_pools.rs index 32ff276f7f..7dc54be883 100644 --- a/relay/polkadot/src/weights/pallet_nomination_pools.rs +++ b/relay/polkadot/src/weights/pallet_nomination_pools.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_nomination_pools -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -70,20 +76,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn join() -> Weight { // Proof Size summary in bytes: - // Measured: `3196` + // Measured: `3362` // Estimated: `8877` - // Minimum execution time: 180_100_000 picoseconds. - Weight::from_parts(185_018_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(19)) - .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().reads(20)) + .saturating_add(T::DbWeight::get().writes(13)) } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) @@ -102,20 +110,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// 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: `3206` + // Measured: `3372` // Estimated: `8877` - // Minimum execution time: 177_778_000 picoseconds. - Weight::from_parts(181_902_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(16)) - .saturating_add(T::DbWeight::get().writes(12)) + .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`) @@ -136,20 +146,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// 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: `3153` + // Measured: `3282` // Estimated: `8799` - // Minimum execution time: 200_388_000 picoseconds. - Weight::from_parts(207_517_000, 0) + // 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(16)) - .saturating_add(T::DbWeight::get().writes(12)) + .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`) @@ -167,8 +179,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1137` // Estimated: `4182` - // Minimum execution time: 70_927_000 picoseconds. - Weight::from_parts(74_540_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)) @@ -196,7 +208,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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) @@ -207,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: `3475` + // Measured: `3552` // Estimated: `8877` - // Minimum execution time: 159_951_000 picoseconds. - Weight::from_parts(165_324_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)) @@ -226,19 +238,21 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1580` + // Measured: `1816` // Estimated: `4764` - // Minimum execution time: 57_688_000 picoseconds. - Weight::from_parts(60_387_918, 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_537 - .saturating_add(Weight::from_parts(49_566, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // 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)) } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) @@ -255,9 +269,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1) /// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ClaimPermissions` (r:0 w:1) @@ -265,15 +281,15 @@ 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: `2008` + // Measured: `2206` // Estimated: `4764` - // Minimum execution time: 119_843_000 picoseconds. - Weight::from_parts(126_404_999, 0) + // Minimum execution time: 121_755_000 picoseconds. + Weight::from_parts(125_922_454, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 2_839 - .saturating_add(Weight::from_parts(59_921, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(10)) - .saturating_add(T::DbWeight::get().writes(8)) + // 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)) } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) @@ -289,16 +305,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:0) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:2 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:2 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:0) /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1) /// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1) @@ -320,17 +338,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `NominationPools::ClaimPermissions` (r:0 w:1) /// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(s: u32, ) -> Weight { + fn withdraw_unbonded_kill(_s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2364` - // Estimated: `6196` - // Minimum execution time: 199_121_000 picoseconds. - Weight::from_parts(213_890_796, 0) - .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 4_446 - .saturating_add(Weight::from_parts(11_035, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(21)) - .saturating_add(T::DbWeight::get().writes(18)) + // Measured: `2666` + // Estimated: `8538` + // 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)) } /// Storage: `NominationPools::LastPoolId` (r:1 w:1) /// Proof: `NominationPools::LastPoolId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -356,14 +372,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) + /// Storage: `Balances::Locks` (r:2 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:2 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `NominationPools::TotalValueLocked` (r:1 w:1) + /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `NominationPools::RewardPools` (r:1 w:1) /// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) /// Storage: `NominationPools::CounterForRewardPools` (r:1 w:1) @@ -374,17 +390,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `NominationPools::BondedPools` (r:1 w:1) /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:0 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `1188` - // Estimated: `6196` - // Minimum execution time: 172_860_000 picoseconds. - Weight::from_parts(183_643_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(22)) - .saturating_add(T::DbWeight::get().writes(15)) + // Measured: `1067` + // Estimated: `8538` + // 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)) } /// Storage: `NominationPools::BondedPools` (r:1 w:0) /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) @@ -413,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: `1745` + // Measured: `1866` // Estimated: `4556 + n * (2520 ±0)` - // Minimum execution time: 61_571_000 picoseconds. - Weight::from_parts(63_708_704, 0) + // Minimum execution time: 59_258_000 picoseconds. + Weight::from_parts(60_008_870, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 10_013 - .saturating_add(Weight::from_parts(1_423_052, 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)) @@ -433,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: `1333` + // Measured: `1401` // Estimated: `4556` - // Minimum execution time: 33_208_000 picoseconds. - Weight::from_parts(34_170_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)) @@ -452,11 +470,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3735` - // Minimum execution time: 12_711_000 picoseconds. - Weight::from_parts(13_413_431, 0) + // Minimum execution time: 12_106_000 picoseconds. + Weight::from_parts(12_748_197, 0) .saturating_add(Weight::from_parts(0, 3735)) - // Standard Error: 151 - .saturating_add(Weight::from_parts(1_541, 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)) } @@ -476,8 +494,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_334_000 picoseconds. - Weight::from_parts(5_780_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)) } @@ -487,8 +505,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3685` - // Minimum execution time: 17_112_000 picoseconds. - Weight::from_parts(17_839_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)) @@ -513,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: `1908` + // Measured: `2035` // Estimated: `4556` - // Minimum execution time: 61_743_000 picoseconds. - Weight::from_parts(63_675_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)) @@ -533,8 +551,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `736` // Estimated: `3685` - // Minimum execution time: 28_711_000 picoseconds. - Weight::from_parts(30_136_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)) @@ -547,8 +565,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `537` // Estimated: `3685` - // Minimum execution time: 17_582_000 picoseconds. - Weight::from_parts(18_587_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)) @@ -559,8 +577,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3685` - // Minimum execution time: 17_526_000 picoseconds. - Weight::from_parts(18_135_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)) @@ -573,8 +591,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `508` // Estimated: `4182` - // Minimum execution time: 13_447_000 picoseconds. - Weight::from_parts(13_782_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)) @@ -591,8 +609,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `934` // Estimated: `3685` - // Minimum execution time: 58_346_000 picoseconds. - Weight::from_parts(61_063_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)) @@ -600,7 +618,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `NominationPools::BondedPools` (r:1 w:0) /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) @@ -609,8 +627,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `946` // Estimated: `4764` - // Minimum execution time: 53_711_000 picoseconds. - Weight::from_parts(54_615_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/polkadot/src/weights/pallet_offences.rs b/relay/polkadot/src/weights/pallet_offences.rs index 2a75078d59..ceb53fbc87 100644 --- a/relay/polkadot/src/weights/pallet_offences.rs +++ b/relay/polkadot/src/weights/pallet_offences.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_offences` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_offences -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -89,14 +95,14 @@ impl pallet_offences::WeightInfo for WeightInfo { fn report_offence_im_online(_r: u32, o: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + n * (3454 ±0) + o * (1042 ±0)` - // Estimated: `88614 + n * (157019 ±38) + o * (26384 ±6)` - // Minimum execution time: 469_688_000 picoseconds. - Weight::from_parts(484_054_000, 0) - .saturating_add(Weight::from_parts(0, 88614)) - // Standard Error: 3_729_684 - .saturating_add(Weight::from_parts(372_493_375, 0).saturating_mul(o.into())) - // Standard Error: 22_663_238 - .saturating_add(Weight::from_parts(364_302_950, 0).saturating_mul(n.into())) + // Estimated: `88747 + n * (157019 ±40) + o * (26384 ±6)` + // Minimum execution time: 473_782_000 picoseconds. + Weight::from_parts(479_341_000, 0) + .saturating_add(Weight::from_parts(0, 88747)) + // Standard Error: 3_762_212 + .saturating_add(Weight::from_parts(371_072_722, 0).saturating_mul(o.into())) + // Standard Error: 22_860_891 + .saturating_add(Weight::from_parts(350_723_087, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(124)) .saturating_add(T::DbWeight::get().reads((37_u64).saturating_mul(o.into()))) .saturating_add(T::DbWeight::get().reads((187_u64).saturating_mul(n.into()))) @@ -147,13 +153,13 @@ impl pallet_offences::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 16]`. fn report_offence_grandpa(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1709 + n * (66 ±0)` + // Measured: `1863 + n * (60 ±0)` // Estimated: `5520 + n * (2551 ±0)` - // Minimum execution time: 84_339_000 picoseconds. - Weight::from_parts(95_415_053, 0) + // Minimum execution time: 79_320_000 picoseconds. + Weight::from_parts(88_196_115, 0) .saturating_add(Weight::from_parts(0, 5520)) - // Standard Error: 29_083 - .saturating_add(Weight::from_parts(9_727_466, 0).saturating_mul(n.into())) + // Standard Error: 30_338 + .saturating_add(Weight::from_parts(10_619_584, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(19)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(13)) @@ -201,13 +207,13 @@ impl pallet_offences::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 16]`. fn report_offence_babe(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1709 + n * (66 ±0)` + // Measured: `1863 + n * (60 ±0)` // Estimated: `5520 + n * (2551 ±0)` - // Minimum execution time: 84_702_000 picoseconds. - Weight::from_parts(95_753_264, 0) + // Minimum execution time: 78_599_000 picoseconds. + Weight::from_parts(87_677_606, 0) .saturating_add(Weight::from_parts(0, 5520)) - // Standard Error: 33_324 - .saturating_add(Weight::from_parts(9_689_149, 0).saturating_mul(n.into())) + // Standard Error: 30_607 + .saturating_add(Weight::from_parts(10_829_813, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(19)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(13)) diff --git a/relay/polkadot/src/weights/pallet_preimage.rs b/relay/polkadot/src/weights/pallet_preimage.rs index e7576d9147..6b58e5ba92 100644 --- a/relay/polkadot/src/weights/pallet_preimage.rs +++ b/relay/polkadot/src/weights/pallet_preimage.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_preimage -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,25 +51,31 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `143` + // Measured: `42` // Estimated: `3556` - // Minimum execution time: 26_405_000 picoseconds. - Weight::from_parts(27_095_000, 0) + // Minimum execution time: 41_264_000 picoseconds. + Weight::from_parts(115_478_709, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(2_457, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // 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)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. @@ -71,16 +83,18 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 14_725_000 picoseconds. - Weight::from_parts(15_125_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: 5 - .saturating_add(Weight::from_parts(2_726, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // 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)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. @@ -88,147 +102,168 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 13_914_000 picoseconds. - Weight::from_parts(14_388_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: 5 - .saturating_add(Weight::from_parts(2_742, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + .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)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `289` + // Measured: `244` // Estimated: `3556` - // Minimum execution time: 50_195_000 picoseconds. - Weight::from_parts(55_889_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(1)) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 33_126_000 picoseconds. - Weight::from_parts(36_460_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `188` // Estimated: `3556` - // Minimum execution time: 30_657_000 picoseconds. - Weight::from_parts(33_621_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 18_853_000 picoseconds. - Weight::from_parts(24_110_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3556` - // Minimum execution time: 24_091_000 picoseconds. - Weight::from_parts(26_239_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 11_552_000 picoseconds. - Weight::from_parts(13_497_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 30_932_000 picoseconds. - Weight::from_parts(33_896_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 10_875_000 picoseconds. - Weight::from_parts(12_227_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 10_995_000 picoseconds. - Weight::from_parts(12_221_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(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1024 w:1024) + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:1023 w:1023) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Preimage::RequestStatusFor` (r:0 w:1024) - /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 1024]`. + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. fn ensure_updated(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `193 + n * (91 ±0)` - // Estimated: `3593 + n * (2566 ±0)` - // Minimum execution time: 2_452_000 picoseconds. - Weight::from_parts(2_641_000, 3593) - // Standard Error: 19_797 - .saturating_add(Weight::from_parts(15_620_946, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into())) + // Measured: `0 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 46_578_000 picoseconds. + Weight::from_parts(46_893_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())) + .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/polkadot/src/weights/pallet_proxy.rs b/relay/polkadot/src/weights/pallet_proxy.rs index 02d299fd2c..1233c30978 100644 --- a/relay/polkadot/src/weights/pallet_proxy.rs +++ b/relay/polkadot/src/weights/pallet_proxy.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_proxy -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +58,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 13_352_000 picoseconds. - Weight::from_parts(14_114_090, 0) + // Minimum execution time: 12_025_000 picoseconds. + Weight::from_parts(12_596_335, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_945 - .saturating_add(Weight::from_parts(28_877, 0).saturating_mul(p.into())) + // 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: 35_767_000 picoseconds. - Weight::from_parts(36_335_824, 0) + // Minimum execution time: 32_295_000 picoseconds. + Weight::from_parts(32_939_511, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 3_259 - .saturating_add(Weight::from_parts(121_300, 0).saturating_mul(a.into())) - // Standard Error: 3_368 - .saturating_add(Weight::from_parts(32_462, 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: 20_872_000 picoseconds. - Weight::from_parts(21_297_325, 0) + // Minimum execution time: 19_936_000 picoseconds. + Weight::from_parts(20_165_711, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_404 - .saturating_add(Weight::from_parts(116_175, 0).saturating_mul(a.into())) - // Standard Error: 2_484 - .saturating_add(Weight::from_parts(18_205, 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: 21_437_000 picoseconds. - Weight::from_parts(21_853_458, 0) + // Minimum execution time: 19_872_000 picoseconds. + Weight::from_parts(20_398_560, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 3_143 - .saturating_add(Weight::from_parts(115_847, 0).saturating_mul(a.into())) - // Standard Error: 3_247 - .saturating_add(Weight::from_parts(8_625, 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: 31_770_000 picoseconds. - Weight::from_parts(32_833_635, 0) + // Minimum execution time: 29_565_000 picoseconds. + Weight::from_parts(29_853_281, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_227 - .saturating_add(Weight::from_parts(106_356, 0).saturating_mul(a.into())) - // Standard Error: 2_301 - .saturating_add(Weight::from_parts(40_026, 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: 21_371_000 picoseconds. - Weight::from_parts(22_573_606, 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_340 - .saturating_add(Weight::from_parts(37_463, 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: 21_593_000 picoseconds. - Weight::from_parts(22_754_822, 0) + // Minimum execution time: 19_497_000 picoseconds. + Weight::from_parts(20_481_952, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_116 - .saturating_add(Weight::from_parts(40_867, 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,11 +186,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 18_798_000 picoseconds. - Weight::from_parts(19_969_826, 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_553 - .saturating_add(Weight::from_parts(23_271, 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)) } @@ -195,11 +201,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `4706` - // Minimum execution time: 23_001_000 picoseconds. - Weight::from_parts(23_980_898, 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_173 - .saturating_add(Weight::from_parts(10_019, 0).saturating_mul(p.into())) + // 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)) } @@ -210,11 +216,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `126 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_557_000 picoseconds. - Weight::from_parts(20_248_689, 0) + // Minimum execution time: 18_774_000 picoseconds. + Weight::from_parts(19_624_167, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_179 - .saturating_add(Weight::from_parts(38_440, 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/polkadot/src/weights/pallet_referenda.rs b/relay/polkadot/src/weights/pallet_referenda.rs index 12e5aadf03..6b01a21e7d 100644 --- a/relay/polkadot/src/weights/pallet_referenda.rs +++ b/relay/polkadot/src/weights/pallet_referenda.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_referenda -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +61,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `42428` - // Minimum execution time: 35_376_000 picoseconds. - Weight::from_parts(36_517_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)) @@ -69,8 +75,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 49_778_000 picoseconds. - Weight::from_parts(50_686_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)) @@ -87,8 +93,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3226` // Estimated: `42428` - // Minimum execution time: 61_681_000 picoseconds. - Weight::from_parts(63_483_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)) @@ -105,8 +111,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3246` // Estimated: `42428` - // Minimum execution time: 60_699_000 picoseconds. - Weight::from_parts(62_223_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)) @@ -121,8 +127,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 61_401_000 picoseconds. - Weight::from_parts(62_890_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)) @@ -137,8 +143,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 57_572_000 picoseconds. - Weight::from_parts(59_953_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)) @@ -149,8 +155,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `4401` - // Minimum execution time: 26_730_000 picoseconds. - Weight::from_parts(28_055_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)) @@ -161,8 +167,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `269` // Estimated: `4401` - // Minimum execution time: 27_341_000 picoseconds. - Weight::from_parts(28_373_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)) @@ -175,8 +181,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `83866` - // Minimum execution time: 33_650_000 picoseconds. - Weight::from_parts(35_107_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)) @@ -191,8 +197,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `588` // Estimated: `83866` - // Minimum execution time: 96_383_000 picoseconds. - Weight::from_parts(99_296_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)) @@ -205,8 +211,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `102` // Estimated: `5477` - // Minimum execution time: 8_323_000 picoseconds. - Weight::from_parts(8_776_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)) @@ -221,8 +227,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3116` // Estimated: `42428` - // Minimum execution time: 46_817_000 picoseconds. - Weight::from_parts(48_988_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)) @@ -237,8 +243,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3116` // Estimated: `42428` - // Minimum execution time: 50_644_000 picoseconds. - Weight::from_parts(51_929_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)) @@ -251,8 +257,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 22_716_000 picoseconds. - Weight::from_parts(23_508_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)) @@ -265,8 +271,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 22_223_000 picoseconds. - Weight::from_parts(23_359_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)) @@ -281,8 +287,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2943` // Estimated: `5477` - // Minimum execution time: 26_541_000 picoseconds. - Weight::from_parts(27_446_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)) @@ -297,8 +303,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2963` // Estimated: `5477` - // Minimum execution time: 25_749_000 picoseconds. - Weight::from_parts(26_662_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)) @@ -311,8 +317,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `299` // Estimated: `42428` - // Minimum execution time: 21_944_000 picoseconds. - Weight::from_parts(23_129_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)) @@ -325,8 +331,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 22_252_000 picoseconds. - Weight::from_parts(23_071_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)) @@ -337,8 +343,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `4401` - // Minimum execution time: 14_336_000 picoseconds. - Weight::from_parts(15_039_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)) @@ -353,8 +359,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 31_108_000 picoseconds. - Weight::from_parts(32_446_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)) @@ -369,8 +375,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 33_666_000 picoseconds. - Weight::from_parts(34_575_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)) @@ -383,8 +389,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 30_250_000 picoseconds. - Weight::from_parts(31_267_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)) @@ -397,8 +403,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `383` // Estimated: `42428` - // Minimum execution time: 30_782_000 picoseconds. - Weight::from_parts(32_258_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)) @@ -411,8 +417,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 28_260_000 picoseconds. - Weight::from_parts(29_450_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)) @@ -425,8 +431,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `404` // Estimated: `42428` - // Minimum execution time: 27_024_000 picoseconds. - Weight::from_parts(28_253_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)) @@ -441,8 +447,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `404` // Estimated: `83866` - // Minimum execution time: 41_811_000 picoseconds. - Weight::from_parts(42_989_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)) @@ -455,8 +461,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 30_478_000 picoseconds. - Weight::from_parts(31_556_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)) @@ -465,16 +471,18 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Referenda::MetadataOf` (r:0 w:1) /// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn set_some_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4401` - // Minimum execution time: 18_549_000 picoseconds. - Weight::from_parts(19_181_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(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) @@ -485,8 +493,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `283` // Estimated: `4401` - // Minimum execution time: 16_085_000 picoseconds. - Weight::from_parts(16_480_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/polkadot/src/weights/pallet_scheduler.rs b/relay/polkadot/src/weights/pallet_scheduler.rs index a078bfd105..36061f4ac3 100644 --- a/relay/polkadot/src/weights/pallet_scheduler.rs +++ b/relay/polkadot/src/weights/pallet_scheduler.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_scheduler -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `1489` - // Minimum execution time: 3_755_000 picoseconds. - Weight::from_parts(3_973_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)) @@ -64,11 +70,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 3_317_000 picoseconds. - Weight::from_parts(5_580_416, 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_377 - .saturating_add(Weight::from_parts(740_682, 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)) } @@ -76,25 +82,27 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_096_000 picoseconds. - Weight::from_parts(5_224_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) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 17_844_000 picoseconds. - Weight::from_parts(18_287_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: 11 - .saturating_add(Weight::from_parts(1_555, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // 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())) } @@ -104,8 +112,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_335_000 picoseconds. - Weight::from_parts(6_488_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)) } @@ -113,24 +121,24 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_096_000 picoseconds. - Weight::from_parts(5_209_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: 2_172_000 picoseconds. - Weight::from_parts(2_393_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: 2_163_000 picoseconds. - Weight::from_parts(2_295_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) @@ -140,11 +148,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 11_681_000 picoseconds. - Weight::from_parts(13_839_432, 0) + // Minimum execution time: 9_935_000 picoseconds. + Weight::from_parts(12_025_044, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 2_267 - .saturating_add(Weight::from_parts(767_188, 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)) } @@ -157,11 +165,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 15_934_000 picoseconds. - Weight::from_parts(14_512_715, 0) + // Minimum execution time: 14_350_000 picoseconds. + Weight::from_parts(12_961_113, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_083 - .saturating_add(Weight::from_parts(1_384_993, 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)) } @@ -174,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_370_000 picoseconds. - Weight::from_parts(17_126_344, 0) + // Minimum execution time: 12_775_000 picoseconds. + Weight::from_parts(15_812_724, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_858 - .saturating_add(Weight::from_parts(823_880, 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)) } @@ -191,11 +199,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `319 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 17_338_000 picoseconds. - Weight::from_parts(16_558_474, 0) + // Minimum execution time: 16_065_000 picoseconds. + Weight::from_parts(15_269_187, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_454 - .saturating_add(Weight::from_parts(1_407_061, 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/polkadot/src/weights/pallet_session.rs b/relay/polkadot/src/weights/pallet_session.rs index 392a88453e..f119bfbaec 100644 --- a/relay/polkadot/src/weights/pallet_session.rs +++ b/relay/polkadot/src/weights/pallet_session.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,32 +55,32 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Session::NextKeys` (r:1 w:1) /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Session::KeyOwner` (r:6 w:6) + /// Storage: `Session::KeyOwner` (r:7 w:7) /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `1920` - // Estimated: `17760` - // Minimum execution time: 54_270_000 picoseconds. - Weight::from_parts(55_996_000, 0) - .saturating_add(Weight::from_parts(0, 17760)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) + // Measured: `2152` + // Estimated: `20467` + // Minimum execution time: 59_953_000 picoseconds. + Weight::from_parts(62_079_000, 0) + .saturating_add(Weight::from_parts(0, 20467)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } /// Storage: `Staking::Ledger` (r:1 w:0) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Session::NextKeys` (r:1 w:1) /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Session::KeyOwner` (r:0 w:6) + /// Storage: `Session::KeyOwner` (r:0 w:7) /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `1784` - // Estimated: `5249` - // Minimum execution time: 39_082_000 picoseconds. - Weight::from_parts(40_147_000, 0) - .saturating_add(Weight::from_parts(0, 5249)) + // Measured: `1851` + // Estimated: `5316` + // Minimum execution time: 41_347_000 picoseconds. + Weight::from_parts(42_664_000, 0) + .saturating_add(Weight::from_parts(0, 5316)) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(7)) + .saturating_add(T::DbWeight::get().writes(8)) } } diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index 6b36e9f698..8eca02acc4 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_staking -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,24 +53,24 @@ pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:0 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn bond() -> Weight { // Proof Size summary in bytes: - // Measured: `980` + // Measured: `813` // Estimated: `4764` - // Minimum execution time: 48_707_000 picoseconds. - Weight::from_parts(50_298_000, 0) + // Minimum execution time: 39_697_000 picoseconds. + Weight::from_parts(41_113_000, 0) .saturating_add(Weight::from_parts(0, 4764)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Staking::Bonded` (r:1 w:0) @@ -74,17 +80,17 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// 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`) fn bond_extra() -> Weight { // Proof Size summary in bytes: - // Measured: `1925` + // Measured: `2024` // Estimated: `8877` - // Minimum execution time: 89_423_000 picoseconds. - Weight::from_parts(92_717_000, 0) + // Minimum execution time: 81_796_000 picoseconds. + Weight::from_parts(83_299_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -97,22 +103,22 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListNodes` (r:3 w:3) /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListBags` (r:2 w:2) /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn unbond() -> Weight { // Proof Size summary in bytes: - // Measured: `2132` + // Measured: `2231` // Estimated: `8877` - // Minimum execution time: 91_297_000 picoseconds. - Weight::from_parts(93_898_000, 0) + // Minimum execution time: 85_496_000 picoseconds. + Weight::from_parts(89_129_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(7)) @@ -121,31 +127,37 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `947` + // Measured: `1148` // Estimated: `4764` - // Minimum execution time: 41_586_000 picoseconds. - Weight::from_parts(43_262_602, 0) + // Minimum execution time: 40_068_000 picoseconds. + Weight::from_parts(41_793_790, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_205 - .saturating_add(Weight::from_parts(46_724, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(4)) + // Standard Error: 1_207 + .saturating_add(Weight::from_parts(46_634, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Staking::Ledger` (r:1 w:1) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::CurrentEra` (r:1 w:0) /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:1) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:1) @@ -158,10 +170,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// Storage: `Staking::SpanSlash` (r:0 w:100) @@ -169,13 +177,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2185 + s * (4 ±0)` + // Measured: `2297 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 86_625_000 picoseconds. - Weight::from_parts(95_845_283, 0) + // Minimum execution time: 84_458_000 picoseconds. + Weight::from_parts(91_914_460, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 4_221 - .saturating_add(Weight::from_parts(1_101_643, 0).saturating_mul(s.into())) + // Standard Error: 3_231 + .saturating_add(Weight::from_parts(1_208_780, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -205,10 +213,10 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn validate() -> Weight { // Proof Size summary in bytes: - // Measured: `1309` + // Measured: `1430` // Estimated: `4556` - // Minimum execution time: 53_705_000 picoseconds. - Weight::from_parts(56_092_000, 0) + // Minimum execution time: 47_121_000 picoseconds. + Weight::from_parts(48_717_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(5)) @@ -222,11 +230,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1214 + k * (569 ±0)` // Estimated: `4556 + k * (3033 ±0)` - // Minimum execution time: 31_473_000 picoseconds. - Weight::from_parts(26_994_634, 0) + // Minimum execution time: 29_081_000 picoseconds. + Weight::from_parts(30_452_129, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 11_450 - .saturating_add(Weight::from_parts(8_355_569, 0).saturating_mul(k.into())) + // Standard Error: 11_070 + .saturating_add(Weight::from_parts(6_536_178, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -257,13 +265,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1803 + n * (102 ±0)` + // Measured: `1876 + n * (99 ±0)` // Estimated: `6248 + n * (2520 ±0)` - // Minimum execution time: 62_316_000 picoseconds. - Weight::from_parts(61_017_004, 0) + // Minimum execution time: 59_956_000 picoseconds. + Weight::from_parts(59_208_949, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 25_446 - .saturating_add(Weight::from_parts(3_981_268, 0).saturating_mul(n.into())) + // Standard Error: 19_426 + .saturating_add(Weight::from_parts(3_894_458, 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(6)) @@ -285,40 +293,42 @@ impl pallet_staking::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: `1639` + // Measured: `1685` // Estimated: `6248` - // Minimum execution time: 56_112_000 picoseconds. - Weight::from_parts(57_209_000, 0) + // Minimum execution time: 51_526_000 picoseconds. + Weight::from_parts(52_943_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } /// Storage: `Staking::Ledger` (r:1 w:0) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn set_payee() -> Weight { // Proof Size summary in bytes: - // Measured: `737` + // Measured: `904` // Estimated: `4556` - // Minimum execution time: 13_191_000 picoseconds. - Weight::from_parts(13_520_000, 0) + // Minimum execution time: 18_481_000 picoseconds. + Weight::from_parts(19_196_000, 0) .saturating_add(Weight::from_parts(0, 4556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:2 w:2) + /// Storage: `Staking::Ledger` (r:1 w:2) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) fn set_controller() -> Weight { // Proof Size summary in bytes: - // Measured: `836` - // Estimated: `8122` - // Minimum execution time: 22_561_000 picoseconds. - Weight::from_parts(23_137_000, 0) - .saturating_add(Weight::from_parts(0, 8122)) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `904` + // Estimated: `4556` + // Minimum execution time: 21_537_000 picoseconds. + Weight::from_parts(22_584_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Staking::ValidatorCount` (r:0 w:1) @@ -327,8 +337,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_671_000 picoseconds. - Weight::from_parts(2_848_000, 0) + // Minimum execution time: 2_272_000 picoseconds. + Weight::from_parts(2_445_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -338,8 +348,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_111_000 picoseconds. - Weight::from_parts(7_365_000, 0) + // Minimum execution time: 7_854_000 picoseconds. + Weight::from_parts(8_160_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -349,8 +359,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_154_000 picoseconds. - Weight::from_parts(7_422_000, 0) + // Minimum execution time: 7_725_000 picoseconds. + Weight::from_parts(8_052_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -360,8 +370,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_016_000 picoseconds. - Weight::from_parts(7_402_000, 0) + // Minimum execution time: 7_468_000 picoseconds. + Weight::from_parts(7_823_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -372,17 +382,25 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_863_000 picoseconds. - Weight::from_parts(3_048_427, 0) + // Minimum execution time: 2_294_000 picoseconds. + Weight::from_parts(2_668_007, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 38 - .saturating_add(Weight::from_parts(10_495, 0).saturating_mul(v.into())) + // Standard Error: 33 + .saturating_add(Weight::from_parts(10_309, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Staking::Bonded` (r:1 w:1) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:1) @@ -395,14 +413,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:0 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// Storage: `Staking::SpanSlash` (r:0 w:100) @@ -410,14 +420,14 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1911 + s * (4 ±0)` + // Measured: `2297 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 78_837_000 picoseconds. - Weight::from_parts(85_181_607, 0) + // Minimum execution time: 82_605_000 picoseconds. + Weight::from_parts(89_061_775, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 3_317 - .saturating_add(Weight::from_parts(1_123_909, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(12)) + // Standard Error: 3_439 + .saturating_add(Weight::from_parts(1_237_466, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(12)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) @@ -429,11 +439,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `66572` // Estimated: `70037` - // Minimum execution time: 133_752_000 picoseconds. - Weight::from_parts(1_203_856_726, 0) + // Minimum execution time: 136_385_000 picoseconds. + Weight::from_parts(1_200_700_238, 0) .saturating_add(Weight::from_parts(0, 70037)) - // Standard Error: 77_277 - .saturating_add(Weight::from_parts(6_467_382, 0).saturating_mul(s.into())) + // Standard Error: 76_782 + .saturating_add(Weight::from_parts(6_466_005, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -447,27 +457,31 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `System::Account` (r:514 w:514) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:513 w:0) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:513 w:513) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 512]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `34179 + n * (150 ±0)` - // Estimated: `32391 + n * (2603 ±1)` - // Minimum execution time: 122_071_000 picoseconds. - Weight::from_parts(210_138_473, 0) - .saturating_add(Weight::from_parts(0, 32391)) - // Standard Error: 17_199 - .saturating_add(Weight::from_parts(32_277_073, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(9)) + // Measured: `36212 + n * (160 ±0)` + // Estimated: `34673 + n * (2603 ±1)` + // Minimum execution time: 121_546_000 picoseconds. + Weight::from_parts(176_075_574, 0) + .saturating_add(Weight::from_parts(0, 34673)) + // Standard Error: 38_394 + .saturating_add(Weight::from_parts(27_529_654, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) } @@ -481,28 +495,28 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:513 w:513) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:513 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:513 w:513) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:513 w:0) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:513 w:513) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:513 w:513) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:513 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 512]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `58153 + n * (388 ±0)` - // Estimated: `53040 + n * (3774 ±0)` - // Minimum execution time: 160_911_000 picoseconds. - Weight::from_parts(99_911_474, 0) - .saturating_add(Weight::from_parts(0, 53040)) - // Standard Error: 31_649 - .saturating_add(Weight::from_parts(54_504_270, 0).saturating_mul(n.into())) + // Measured: `58213 + n * (388 ±0)` + // Estimated: `53081 + n * (3774 ±2)` + // Minimum execution time: 147_341_000 picoseconds. + Weight::from_parts(40_653_193, 0) + .saturating_add(Weight::from_parts(0, 53081)) + // Standard Error: 100_332 + .saturating_add(Weight::from_parts(51_207_677, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -511,26 +525,26 @@ impl pallet_staking::WeightInfo for WeightInfo { } /// Storage: `Staking::Ledger` (r:1 w:1) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListNodes` (r:3 w:3) /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListBags` (r:2 w:2) /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1926 + l * (5 ±0)` + // Measured: `2025 + l * (5 ±0)` // Estimated: `8877` - // Minimum execution time: 81_907_000 picoseconds. - Weight::from_parts(85_498_692, 0) + // Minimum execution time: 77_847_000 picoseconds. + Weight::from_parts(81_060_295, 0) .saturating_add(Weight::from_parts(0, 8877)) - // Standard Error: 5_823 - .saturating_add(Weight::from_parts(46_095, 0).saturating_mul(l.into())) + // Standard Error: 4_191 + .saturating_add(Weight::from_parts(50_598, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -540,6 +554,10 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// 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: `Staking::Validators` (r:1 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `Staking::Nominators` (r:1 w:1) @@ -552,10 +570,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// 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(49), added: 2524, mode: `MaxEncodedLen`) /// Storage: `Staking::Payee` (r:0 w:1) /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) /// Storage: `Staking::SpanSlash` (r:0 w:100) @@ -563,13 +577,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2185 + s * (4 ±0)` + // Measured: `2297 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 91_683_000 picoseconds. - Weight::from_parts(95_405_447, 0) + // Minimum execution time: 92_710_000 picoseconds. + Weight::from_parts(94_394_878, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 3_924 - .saturating_add(Weight::from_parts(1_141_741, 0).saturating_mul(s.into())) + // Standard Error: 3_210 + .saturating_add(Weight::from_parts(1_237_728, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -615,13 +629,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + n * (716 ±0) + v * (3594 ±0)` // Estimated: `456136 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 501_630_000 picoseconds. - Weight::from_parts(510_650_000, 0) + // Minimum execution time: 545_420_000 picoseconds. + Weight::from_parts(549_587_000, 0) .saturating_add(Weight::from_parts(0, 456136)) - // Standard Error: 2_068_796 - .saturating_add(Weight::from_parts(65_532_064, 0).saturating_mul(v.into())) - // Standard Error: 206_144 - .saturating_add(Weight::from_parts(19_142_214, 0).saturating_mul(n.into())) + // Standard Error: 2_048_437 + .saturating_add(Weight::from_parts(64_611_184, 0).saturating_mul(v.into())) + // Standard Error: 204_115 + .saturating_add(Weight::from_parts(18_936_024, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(184)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -650,15 +664,15 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[500, 1000]`. fn get_npos_voters(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3116 + n * (907 ±0) + v * (391 ±0)` + // Measured: `3190 + n * (907 ±0) + v * (391 ±0)` // Estimated: `456136 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 35_057_215_000 picoseconds. - Weight::from_parts(35_735_725_000, 0) + // Minimum execution time: 35_021_192_000 picoseconds. + Weight::from_parts(36_669_101_000, 0) .saturating_add(Weight::from_parts(0, 456136)) - // Standard Error: 375_086 - .saturating_add(Weight::from_parts(3_430_783, 0).saturating_mul(v.into())) - // Standard Error: 375_086 - .saturating_add(Weight::from_parts(5_140_095, 0).saturating_mul(n.into())) + // Standard Error: 439_600 + .saturating_add(Weight::from_parts(5_191_250, 0).saturating_mul(v.into())) + // Standard Error: 439_600 + .saturating_add(Weight::from_parts(5_153_719, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(179)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -675,11 +689,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `916 + v * (50 ±0)` // Estimated: `3510 + v * (2520 ±0)` - // Minimum execution time: 2_420_207_000 picoseconds. - Weight::from_parts(83_643_108, 0) + // Minimum execution time: 2_549_857_000 picoseconds. + Weight::from_parts(133_124_760, 0) .saturating_add(Weight::from_parts(0, 3510)) - // Standard Error: 6_937 - .saturating_add(Weight::from_parts(4_730_253, 0).saturating_mul(v.into())) + // Standard Error: 15_097 + .saturating_add(Weight::from_parts(5_104_432, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into())) @@ -700,8 +714,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_926_000 picoseconds. - Weight::from_parts(6_234_000, 0) + // Minimum execution time: 3_727_000 picoseconds. + Weight::from_parts(3_968_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -721,8 +735,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_566_000 picoseconds. - Weight::from_parts(5_791_000, 0) + // Minimum execution time: 3_502_000 picoseconds. + Weight::from_parts(3_706_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -748,10 +762,10 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn chill_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1762` + // Measured: `1808` // Estimated: `6248` - // Minimum execution time: 68_129_000 picoseconds. - Weight::from_parts(70_229_000, 0) + // Minimum execution time: 62_630_000 picoseconds. + Weight::from_parts(64_480_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) @@ -764,8 +778,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `627` // Estimated: `3510` - // Minimum execution time: 12_356_000 picoseconds. - Weight::from_parts(13_066_000, 0) + // Minimum execution time: 11_920_000 picoseconds. + Weight::from_parts(12_278_000, 0) .saturating_add(Weight::from_parts(0, 3510)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -776,8 +790,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_575_000 picoseconds. - Weight::from_parts(2_794_000, 0) + // Minimum execution time: 2_124_000 picoseconds. + Weight::from_parts(2_385_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/polkadot/src/weights/pallet_timestamp.rs b/relay/polkadot/src/weights/pallet_timestamp.rs index 715a863f63..9626be2fed 100644 --- a/relay/polkadot/src/weights/pallet_timestamp.rs +++ b/relay/polkadot/src/weights/pallet_timestamp.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `1493` - // Minimum execution time: 7_888_000 picoseconds. - Weight::from_parts(8_393_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)) @@ -63,8 +69,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `94` // Estimated: `0` - // Minimum execution time: 3_614_000 picoseconds. - Weight::from_parts(3_773_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/polkadot/src/weights/pallet_tips.rs b/relay/polkadot/src/weights/pallet_tips.rs deleted file mode 100644 index 62e08e017a..0000000000 --- a/relay/polkadot/src/weights/pallet_tips.rs +++ /dev/null @@ -1,164 +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_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=polkadot-dev -// --steps=50 -// --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_tips -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/polkadot/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_tips`. -pub struct WeightInfo(PhantomData); -impl pallet_tips::WeightInfo for WeightInfo { - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4` - // Estimated: `3469` - // Minimum execution time: 28_332_000 picoseconds. - Weight::from_parts(29_229_064, 0) - .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(1_717, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `221` - // Estimated: `3686` - // Minimum execution time: 28_421_000 picoseconds. - Weight::from_parts(29_235_000, 0) - .saturating_add(Weight::from_parts(0, 3686)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:0 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - /// The range of component `t` is `[1, 13]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `74 + t * (64 ±0)` - // Estimated: `3539 + t * (64 ±0)` - // Minimum execution time: 19_215_000 picoseconds. - Weight::from_parts(18_521_677, 0) - .saturating_add(Weight::from_parts(0, 3539)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_600, 0).saturating_mul(r.into())) - // Standard Error: 5_637 - .saturating_add(Weight::from_parts(171_000, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(t.into())) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 13]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `295 + t * (112 ±0)` - // Estimated: `3760 + t * (112 ±0)` - // Minimum execution time: 15_664_000 picoseconds. - Weight::from_parts(16_047_212, 0) - .saturating_add(Weight::from_parts(0, 3760)) - // Standard Error: 1_859 - .saturating_add(Weight::from_parts(133_685, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 13]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `334 + t * (112 ±0)` - // Estimated: `3790 + t * (112 ±0)` - // Minimum execution time: 61_465_000 picoseconds. - Weight::from_parts(62_876_205, 0) - .saturating_add(Weight::from_parts(0, 3790)) - // Standard Error: 6_840 - .saturating_add(Weight::from_parts(133_654, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 13]`. - fn slash_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `269` - // Estimated: `3734` - // Minimum execution time: 14_539_000 picoseconds. - Weight::from_parts(15_138_065, 0) - .saturating_add(Weight::from_parts(0, 3734)) - // Standard Error: 1_577 - .saturating_add(Weight::from_parts(6_176, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/relay/polkadot/src/weights/pallet_treasury.rs b/relay/polkadot/src/weights/pallet_treasury.rs index fad730f4c1..d4b34de036 100644 --- a/relay/polkadot/src/weights/pallet_treasury.rs +++ b/relay/polkadot/src/weights/pallet_treasury.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_treasury -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,10 +59,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn spend_local() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `42` // Estimated: `1887` - // Minimum execution time: 7_278_000 picoseconds. - Weight::from_parts(7_633_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)) @@ -67,10 +73,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `107` + // Measured: `143` // Estimated: `1489` - // Minimum execution time: 16_116_000 picoseconds. - Weight::from_parts(16_811_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)) @@ -81,10 +87,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `265` + // Measured: `301` // Estimated: `3593` - // Minimum execution time: 25_554_000 picoseconds. - Weight::from_parts(26_473_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)) @@ -96,13 +102,13 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `433 + p * (8 ±0)` + // Measured: `470 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 5_048_000 picoseconds. - Weight::from_parts(7_308_351, 0) + // Minimum execution time: 7_362_000 picoseconds. + Weight::from_parts(9_257_989, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 950 - .saturating_add(Weight::from_parts(40_390, 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)) } @@ -110,10 +116,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `90` + // Measured: `127` // Estimated: `1887` - // Minimum execution time: 4_029_000 picoseconds. - Weight::from_parts(4_175_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)) @@ -131,31 +137,33 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `214 + p * (251 ±0)` + // Measured: `285 + p * (251 ±0)` // Estimated: `1887 + p * (5206 ±0)` - // Minimum execution time: 21_953_000 picoseconds. - Weight::from_parts(26_546_487, 0) + // Minimum execution time: 28_051_000 picoseconds. + Weight::from_parts(23_853_733, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 9_168 - .saturating_add(Weight::from_parts(25_474_821, 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)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) /// Storage: `Treasury::SpendCount` (r:1 w:1) /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `Treasury::Spends` (r:0 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) fn spend() -> Weight { // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `1489` - // Minimum execution time: 8_354_000 picoseconds. - Weight::from_parts(8_786_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `115` + // Estimated: `4703` + // 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)) } /// Storage: `Treasury::Spends` (r:1 w:1) @@ -174,10 +182,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn payout() -> Weight { // Proof Size summary in bytes: - // Measured: `218` + // Measured: `254` // Estimated: `5318` - // Minimum execution time: 29_975_000 picoseconds. - Weight::from_parts(30_430_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)) @@ -188,10 +196,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn check_status() -> Weight { // Proof Size summary in bytes: - // Measured: `170` + // Measured: `206` // Estimated: `5318` - // Minimum execution time: 14_485_000 picoseconds. - Weight::from_parts(14_964_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)) @@ -200,10 +208,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) fn void_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `178` // Estimated: `5318` - // Minimum execution time: 8_322_000 picoseconds. - Weight::from_parts(8_580_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/polkadot/src/weights/pallet_utility.rs b/relay/polkadot/src/weights/pallet_utility.rs index fccbef501e..6a9548609c 100644 --- a/relay/polkadot/src/weights/pallet_utility.rs +++ b/relay/polkadot/src/weights/pallet_utility.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +56,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_992_000 picoseconds. - Weight::from_parts(3_564_447, 0) + // Minimum execution time: 4_453_000 picoseconds. + Weight::from_parts(5_295_358, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_518 - .saturating_add(Weight::from_parts(4_724_708, 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_160_000 picoseconds. - Weight::from_parts(4_365_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]`. @@ -69,18 +75,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_271_000 picoseconds. - Weight::from_parts(14_664_357, 0) + // Minimum execution time: 4_360_000 picoseconds. + Weight::from_parts(6_086_702, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_305 - .saturating_add(Weight::from_parts(4_957_373, 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_795_000 picoseconds. - Weight::from_parts(8_139_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]`. @@ -88,10 +94,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_838_000 picoseconds. - Weight::from_parts(10_745_062, 0) + // Minimum execution time: 4_510_000 picoseconds. + Weight::from_parts(18_022_183, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_224 - .saturating_add(Weight::from_parts(4_709_705, 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/polkadot/src/weights/pallet_vesting.rs b/relay/polkadot/src/weights/pallet_vesting.rs index 5c9bd678c6..41831b8f30 100644 --- a/relay/polkadot/src/weights/pallet_vesting.rs +++ b/relay/polkadot/src/weights/pallet_vesting.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_vesting -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,20 +56,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `314 + l * (25 ±0) + s * (36 ±0)` + // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 33_540_000 picoseconds. - Weight::from_parts(33_128_056, 0) + // Minimum execution time: 31_405_000 picoseconds. + Weight::from_parts(30_840_736, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_390 - .saturating_add(Weight::from_parts(33_920, 0).saturating_mul(l.into())) - // Standard Error: 2_474 - .saturating_add(Weight::from_parts(68_899, 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)) } @@ -72,20 +78,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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 { // Proof Size summary in bytes: - // Measured: `314 + l * (25 ±0) + s * (36 ±0)` + // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 36_691_000 picoseconds. - Weight::from_parts(37_531_434, 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_403 - .saturating_add(Weight::from_parts(17_115, 0).saturating_mul(l.into())) - // Standard Error: 2_496 - .saturating_add(Weight::from_parts(57_869, 0).saturating_mul(s.into())) + // 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)) } @@ -94,22 +100,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `417 + l * (25 ±0) + s * (36 ±0)` + // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 35_253_000 picoseconds. - Weight::from_parts(33_837_428, 0) + // Minimum execution time: 33_180_000 picoseconds. + Weight::from_parts(32_321_116, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_612 - .saturating_add(Weight::from_parts(41_861, 0).saturating_mul(l.into())) - // Standard Error: 2_868 - .saturating_add(Weight::from_parts(100_793, 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)) } @@ -118,22 +124,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `417 + l * (25 ±0) + s * (36 ±0)` + // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 38_591_000 picoseconds. - Weight::from_parts(38_791_213, 0) + // Minimum execution time: 35_454_000 picoseconds. + Weight::from_parts(34_966_137, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_386 - .saturating_add(Weight::from_parts(24_682, 0).saturating_mul(l.into())) - // Standard Error: 2_466 - .saturating_add(Weight::from_parts(63_684, 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)) } @@ -144,20 +150,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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 { // Proof Size summary in bytes: - // Measured: `488 + l * (25 ±0) + s * (36 ±0)` + // Measured: `522 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 68_970_000 picoseconds. - Weight::from_parts(70_364_277, 0) + // Minimum execution time: 65_630_000 picoseconds. + Weight::from_parts(66_625_551, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_847 - .saturating_add(Weight::from_parts(36_813, 0).saturating_mul(l.into())) - // Standard Error: 3_287 - .saturating_add(Weight::from_parts(83_685, 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)) } @@ -168,20 +174,20 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// 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 force_vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `591 + l * (25 ±0) + s * (36 ±0)` + // Measured: `625 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 70_085_000 picoseconds. - Weight::from_parts(71_727_202, 0) + // Minimum execution time: 66_782_000 picoseconds. + Weight::from_parts(67_144_629, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 1_700 - .saturating_add(Weight::from_parts(37_217, 0).saturating_mul(l.into())) - // Standard Error: 3_025 - .saturating_add(Weight::from_parts(86_722, 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)) } @@ -190,22 +196,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `415 + l * (25 ±0) + s * (36 ±0)` + // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 35_858_000 picoseconds. - Weight::from_parts(35_589_750, 0) + // Minimum execution time: 34_170_000 picoseconds. + Weight::from_parts(33_344_840, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_301 - .saturating_add(Weight::from_parts(31_797, 0).saturating_mul(l.into())) - // Standard Error: 2_402 - .saturating_add(Weight::from_parts(81_631, 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)) } @@ -214,22 +220,22 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `415 + l * (25 ±0) + s * (36 ±0)` + // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 39_479_000 picoseconds. - Weight::from_parts(39_122_385, 0) + // Minimum execution time: 36_360_000 picoseconds. + Weight::from_parts(35_601_232, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_209 - .saturating_add(Weight::from_parts(41_495, 0).saturating_mul(l.into())) - // Standard Error: 2_233 - .saturating_add(Weight::from_parts(83_307, 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/polkadot/src/weights/pallet_whitelist.rs b/relay/polkadot/src/weights/pallet_whitelist.rs index 30bd49d211..802c551ee7 100644 --- a/relay/polkadot/src/weights/pallet_whitelist.rs +++ b/relay/polkadot/src/weights/pallet_whitelist.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_whitelist` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_whitelist -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,67 +53,75 @@ pub struct WeightInfo(PhantomData); impl pallet_whitelist::WeightInfo for WeightInfo { /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn whitelist_call() -> Weight { // Proof Size summary in bytes: - // Measured: `84` + // Measured: `118` // Estimated: `3556` - // Minimum execution time: 18_497_000 picoseconds. - Weight::from_parts(18_977_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(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn remove_whitelisted_call() -> Weight { // Proof Size summary in bytes: - // Measured: `213` + // Measured: `247` // Estimated: `3556` - // Minimum execution time: 16_070_000 picoseconds. - Weight::from_parts(16_697_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(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:1 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 4194294]`. fn dispatch_whitelisted_call(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `289 + n * (1 ±0)` - // Estimated: `3753 + n * (1 ±0)` - // Minimum execution time: 27_611_000 picoseconds. - Weight::from_parts(27_934_000, 0) - .saturating_add(Weight::from_parts(0, 3753)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_213, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `323 + n * (1 ±0)` + // Estimated: `3787 + n * (1 ±0)` + // Minimum execution time: 26_102_000 picoseconds. + Weight::from_parts(28_436_000, 0) + .saturating_add(Weight::from_parts(0, 3787)) + // 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())) } /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10000]`. fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `213` + // Measured: `247` // Estimated: `3556` - // Minimum execution time: 19_188_000 picoseconds. - Weight::from_parts(19_932_877, 0) + // Minimum execution time: 19_423_000 picoseconds. + Weight::from_parts(20_061_587, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_418, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // 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/polkadot/src/weights/pallet_xcm.rs b/relay/polkadot/src/weights/pallet_xcm.rs index 93f32f3e80..6296c77af7 100644 --- a/relay/polkadot/src/weights/pallet_xcm.rs +++ b/relay/polkadot/src/weights/pallet_xcm.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +63,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 30_098_000 picoseconds. - Weight::from_parts(30_720_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)) @@ -67,16 +73,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_711_000 picoseconds. - Weight::from_parts(19_460_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: 18_630_000 picoseconds. - Weight::from_parts(19_246_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) @@ -95,8 +101,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_764_000 picoseconds. - Weight::from_parts(9_019_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)) } @@ -104,8 +110,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_341_000 picoseconds. - Weight::from_parts(2_489_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) @@ -126,8 +132,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 33_752_000 picoseconds. - Weight::from_parts(35_131_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)) @@ -148,8 +154,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `256` // Estimated: `3721` - // Minimum execution time: 39_722_000 picoseconds. - Weight::from_parts(40_720_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)) @@ -160,8 +166,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_270_000 picoseconds. - Weight::from_parts(2_481_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)) } @@ -171,8 +177,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `26` // Estimated: `10916` - // Minimum execution time: 13_500_000 picoseconds. - Weight::from_parts(14_189_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)) @@ -183,8 +189,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `30` // Estimated: `10920` - // Minimum execution time: 13_578_000 picoseconds. - Weight::from_parts(13_969_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)) @@ -195,8 +201,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `13405` - // Minimum execution time: 15_785_000 picoseconds. - Weight::from_parts(16_264_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)) } @@ -214,8 +220,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `112` // Estimated: `6052` - // Minimum execution time: 31_497_000 picoseconds. - Weight::from_parts(32_733_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)) @@ -226,8 +232,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `8484` - // Minimum execution time: 9_017_000 picoseconds. - Weight::from_parts(9_234_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)) } @@ -237,8 +243,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `37` // Estimated: `10927` - // Minimum execution time: 13_907_000 picoseconds. - Weight::from_parts(14_354_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)) @@ -257,8 +263,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116` // Estimated: `11006` - // Minimum execution time: 37_741_000 picoseconds. - Weight::from_parts(39_618_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/polkadot/src/weights/runtime_common_auctions.rs b/relay/polkadot/src/weights/runtime_common_auctions.rs index 8c7d7bb999..5be08526e8 100644 --- a/relay/polkadot/src/weights/runtime_common_auctions.rs +++ b/relay/polkadot/src/weights/runtime_common_auctions.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::auctions -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +59,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `4` // Estimated: `1493` - // Minimum execution time: 11_570_000 picoseconds. - Weight::from_parts(11_811_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)) @@ -77,8 +83,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `695` // Estimated: `6060` - // Minimum execution time: 94_382_000 picoseconds. - Weight::from_parts(101_437_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)) @@ -107,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_679_812_000 picoseconds. - Weight::from_parts(7_852_648_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)) @@ -127,8 +133,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `177732` // Estimated: `15822990` - // Minimum execution time: 5_899_491_000 picoseconds. - Weight::from_parts(6_010_908_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/polkadot/src/weights/runtime_common_claims.rs b/relay/polkadot/src/weights/runtime_common_claims.rs index 053e436565..1fb3ad981e 100644 --- a/relay/polkadot/src/weights/runtime_common_claims.rs +++ b/relay/polkadot/src/weights/runtime_common_claims.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::claims -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,13 +66,13 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn claim() -> Weight { // Proof Size summary in bytes: - // Measured: `586` + // Measured: `578` // Estimated: `4764` - // Minimum execution time: 193_623_000 picoseconds. - Weight::from_parts(204_084_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)) @@ -83,8 +89,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `182` // Estimated: `1667` - // Minimum execution time: 12_517_000 picoseconds. - Weight::from_parts(15_320_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)) @@ -104,13 +110,13 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn claim_attest() -> Weight { // Proof Size summary in bytes: - // Measured: `586` + // Measured: `578` // Estimated: `4764` - // Minimum execution time: 187_859_000 picoseconds. - Weight::from_parts(203_164_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)) @@ -132,13 +138,13 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Storage: `Balances::Locks` (r:1 w:1) /// 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(49), added: 2524, mode: `MaxEncodedLen`) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn attest() -> Weight { // Proof Size summary in bytes: - // Measured: `660` + // Measured: `652` // Estimated: `4764` - // Minimum execution time: 88_637_000 picoseconds. - Weight::from_parts(96_809_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)) @@ -155,8 +161,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `406` // Estimated: `3871` - // Minimum execution time: 29_280_000 picoseconds. - Weight::from_parts(34_416_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/polkadot/src/weights/runtime_common_crowdloan.rs b/relay/polkadot/src/weights/runtime_common_crowdloan.rs index b64ff3f9e3..11f0bab3ba 100644 --- a/relay/polkadot/src/weights/runtime_common_crowdloan.rs +++ b/relay/polkadot/src/weights/runtime_common_crowdloan.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::crowdloan -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +65,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `415` // Estimated: `3880` - // Minimum execution time: 52_093_000 picoseconds. - Weight::from_parts(55_243_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)) @@ -83,8 +89,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `497` // Estimated: `3962` - // Minimum execution time: 141_034_000 picoseconds. - Weight::from_parts(146_270_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)) @@ -99,8 +105,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `687` // Estimated: `6196` - // Minimum execution time: 73_238_000 picoseconds. - Weight::from_parts(74_180_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)) @@ -112,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: 32_422_000 picoseconds. - Weight::from_parts(33_226_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: 23_678 - .saturating_add(Weight::from_parts(38_440_634, 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)) @@ -131,8 +137,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `515` // Estimated: `6196` - // Minimum execution time: 46_542_000 picoseconds. - Weight::from_parts(48_339_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)) @@ -143,8 +149,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 19_504_000 picoseconds. - Weight::from_parts(20_923_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)) @@ -157,8 +163,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 30_670_000 picoseconds. - Weight::from_parts(32_659_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)) @@ -171,8 +177,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `239` // Estimated: `3704` - // Minimum execution time: 24_704_000 picoseconds. - Weight::from_parts(27_182_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)) @@ -202,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: 132_950_000 picoseconds. - Weight::from_parts(13_287_824, 0) + // Minimum execution time: 121_731_000 picoseconds. + Weight::from_parts(14_348_244, 0) .saturating_add(Weight::from_parts(0, 5385)) - // Standard Error: 43_858 - .saturating_add(Weight::from_parts(61_666_895, 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/polkadot/src/weights/runtime_common_paras_registrar.rs b/relay/polkadot/src/weights/runtime_common_paras_registrar.rs index 33f762e737..42d14e6c35 100644 --- a/relay/polkadot/src/weights/runtime_common_paras_registrar.rs +++ b/relay/polkadot/src/weights/runtime_common_paras_registrar.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::paras_registrar -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +61,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 26_310_000 picoseconds. - Weight::from_parts(27_652_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)) @@ -81,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: 7_207_763_000 picoseconds. - Weight::from_parts(8_027_991_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)) } @@ -109,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: 7_193_776_000 picoseconds. - Weight::from_parts(7_562_284_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)) } @@ -133,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: 73_229_000 picoseconds. - Weight::from_parts(79_145_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)) } @@ -157,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: 76_781_000 picoseconds. - Weight::from_parts(81_626_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)) } @@ -186,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: 37_538_000 picoseconds. - Weight::from_parts(38_317_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_655, 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)) } @@ -203,11 +209,11 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_128_000 picoseconds. - Weight::from_parts(2_009_331, 0) + // Minimum execution time: 6_614_000 picoseconds. + Weight::from_parts(5_881_578, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(983, 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/polkadot/src/weights/runtime_common_slots.rs b/relay/polkadot/src/weights/runtime_common_slots.rs index 2eb4a0f7c9..aad71211de 100644 --- a/relay/polkadot/src/weights/runtime_common_slots.rs +++ b/relay/polkadot/src/weights/runtime_common_slots.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::slots -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,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: 705_700_000 picoseconds. - Weight::from_parts(720_357_000, 0) - .saturating_add(Weight::from_parts(0, 4024)) - // Standard Error: 94_442 - .saturating_add(Weight::from_parts(3_269_574, 0).saturating_mul(c.into())) - // Standard Error: 94_442 - .saturating_add(Weight::from_parts(8_555_600, 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()))) @@ -99,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: 32_642_000 picoseconds. - Weight::from_parts(35_842_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/polkadot/src/weights/runtime_parachains_configuration.rs b/relay/polkadot/src/weights/runtime_parachains_configuration.rs index 1c24968f66..c35f14898d 100644 --- a/relay/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/relay/polkadot/src/weights/runtime_parachains_configuration.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::configuration -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,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: 9_355_000 picoseconds. - Weight::from_parts(9_707_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)) } @@ -69,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: 9_235_000 picoseconds. - Weight::from_parts(9_728_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)) } @@ -85,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: 9_242_000 picoseconds. - Weight::from_parts(9_637_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)) } @@ -111,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: 9_392_000 picoseconds. - Weight::from_parts(9_610_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)) } @@ -127,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: 9_974_000 picoseconds. - Weight::from_parts(10_284_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)) } @@ -143,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: 9_340_000 picoseconds. - Weight::from_parts(9_826_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/polkadot/src/weights/runtime_parachains_disputes.rs b/relay/polkadot/src/weights/runtime_parachains_disputes.rs index eb58320a0e..887d9492ff 100644 --- a/relay/polkadot/src/weights/runtime_parachains_disputes.rs +++ b/relay/polkadot/src/weights/runtime_parachains_disputes.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::disputes -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +57,8 @@ impl runtime_parachains::disputes::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_534_000 picoseconds. - Weight::from_parts(2_694_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/polkadot/src/weights/runtime_parachains_disputes_slashing.rs b/relay/polkadot/src/weights/runtime_parachains_disputes_slashing.rs index 6a17efc701..05e4797e2a 100644 --- a/relay/polkadot/src/weights/runtime_parachains_disputes_slashing.rs +++ b/relay/polkadot/src/weights/runtime_parachains_disputes_slashing.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::disputes::slashing` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::disputes::slashing -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -82,15 +88,15 @@ impl runtime_parachains::disputes::slashing::WeightInfo /// The range of component `n` is `[4, 1000]`. fn report_dispute_lost(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5287 + n * (185 ±0)` - // Estimated: `8514 + n * (188 ±0)` - // Minimum execution time: 128_419_000 picoseconds. - Weight::from_parts(176_003_885, 0) - .saturating_add(Weight::from_parts(0, 8514)) - // Standard Error: 3_664 - .saturating_add(Weight::from_parts(378_274, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(17)) + // Measured: `5913 + n * (251 ±0)` + // Estimated: `9163 + n * (254 ±0)` + // Minimum execution time: 96_660_000 picoseconds. + Weight::from_parts(158_137_349, 0) + .saturating_add(Weight::from_parts(0, 9163)) + // Standard Error: 3_296 + .saturating_add(Weight::from_parts(381_306, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(10)) - .saturating_add(Weight::from_parts(0, 188).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 254).saturating_mul(n.into())) } } diff --git a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs index 05540b6ade..49c03a79ec 100644 --- a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs +++ b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::hrmp -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,8 +71,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383` // Estimated: `3848` - // Minimum execution time: 32_938_000 picoseconds. - Weight::from_parts(34_387_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)) @@ -85,8 +91,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `373` // Estimated: `3838` - // Minimum execution time: 31_887_000 picoseconds. - Weight::from_parts(32_788_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)) @@ -105,8 +111,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `486` // Estimated: `3951` - // Minimum execution time: 33_051_000 picoseconds. - Weight::from_parts(33_842_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)) @@ -129,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_170_406_000 picoseconds. - Weight::from_parts(1_190_393_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: 114_070 - .saturating_add(Weight::from_parts(3_669_481, 0).saturating_mul(i.into())) - // Standard Error: 114_070 - .saturating_add(Weight::from_parts(3_565_988, 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()))) @@ -166,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: 6_447_000 picoseconds. - Weight::from_parts(6_522_000, 0) + // Minimum execution time: 5_905_000 picoseconds. + Weight::from_parts(5_998_000, 0) .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 22_137 - .saturating_add(Weight::from_parts(20_773_045, 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)) @@ -194,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_369_000 picoseconds. - Weight::from_parts(5_532_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: 16_599 - .saturating_add(Weight::from_parts(12_975_587, 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)) @@ -216,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_212_000 picoseconds. - Weight::from_parts(29_660_461, 0) + // Minimum execution time: 17_426_000 picoseconds. + Weight::from_parts(26_106_849, 0) .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 3_239 - .saturating_add(Weight::from_parts(251_998, 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())) @@ -234,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_226_000 picoseconds. - Weight::from_parts(4_418_000, 0) + // Minimum execution time: 3_609_000 picoseconds. + Weight::from_parts(3_888_793, 0) .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 4_311 - .saturating_add(Weight::from_parts(3_525_389, 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)) @@ -265,15 +271,19 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:1 w:1) /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_open_hrmp_channel(_c: u32) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn force_open_hrmp_channel(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `618` - // Estimated: `6558` - // Minimum execution time: 58_716_000 picoseconds. - Weight::from_parts(61_075_000, 0) - .saturating_add(Weight::from_parts(0, 6558)) + // Measured: `383 + c * (235 ±0)` + // Estimated: `6323 + c * (235 ±0)` + // Minimum execution time: 44_625_000 picoseconds. + Weight::from_parts(46_553_391, 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())) .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())) } /// Storage: `Paras::ParaLifecycles` (r:1 w:0) /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -297,11 +307,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) fn establish_system_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `417` - // Estimated: `6357` - // Minimum execution time: 629_674_000 picoseconds. - Weight::from_parts(640_174_000, 0) - .saturating_add(Weight::from_parts(0, 6357)) + // Measured: `383` + // Estimated: `6323` + // 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)) } @@ -309,11 +319,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) fn poke_channel_deposits() -> Weight { // Proof Size summary in bytes: - // Measured: `263` - // Estimated: `3728` - // Minimum execution time: 173_371_000 picoseconds. - Weight::from_parts(175_860_000, 0) - .saturating_add(Weight::from_parts(0, 3728)) + // Measured: `230` + // Estimated: `3695` + // 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/polkadot/src/weights/runtime_parachains_inclusion.rs b/relay/polkadot/src/weights/runtime_parachains_inclusion.rs index b0e53c62aa..01749dd3cf 100644 --- a/relay/polkadot/src/weights/runtime_parachains_inclusion.rs +++ b/relay/polkadot/src/weights/runtime_parachains_inclusion.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::inclusion` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::inclusion -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,11 +64,11 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Proof Size summary in bytes: // Measured: `65761` // Estimated: `69051` - // Minimum execution time: 114_831_000 picoseconds. - Weight::from_parts(117_677_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: 106_037 - .saturating_add(Weight::from_parts(103_764_934, 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/polkadot/src/weights/runtime_parachains_initializer.rs b/relay/polkadot/src/weights/runtime_parachains_initializer.rs index 35ce1d9f38..11c2bc8781 100644 --- a/relay/polkadot/src/weights/runtime_parachains_initializer.rs +++ b/relay/polkadot/src/weights/runtime_parachains_initializer.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::initializer -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,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_263_000 picoseconds. - Weight::from_parts(3_390_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: 17 - .saturating_add(Weight::from_parts(3_353, 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/polkadot/src/weights/runtime_parachains_paras.rs b/relay/polkadot/src/weights/runtime_parachains_paras.rs index 769b754fae..6679e32e8e 100644 --- a/relay/polkadot/src/weights/runtime_parachains_paras.rs +++ b/relay/polkadot/src/weights/runtime_parachains_paras.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::paras -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -62,11 +68,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `8309` // Estimated: `11774` - // Minimum execution time: 31_373_000 picoseconds. - Weight::from_parts(31_673_000, 0) + // Minimum execution time: 27_533_000 picoseconds. + Weight::from_parts(182_880_491, 0) .saturating_add(Weight::from_parts(0, 11774)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_619, 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)) } @@ -77,11 +83,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_311_000 picoseconds. - Weight::from_parts(7_502_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: 1 - .saturating_add(Weight::from_parts(957, 0).saturating_mul(s.into())) + .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) @@ -90,8 +96,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_864_000 picoseconds. - Weight::from_parts(3_030_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)) } @@ -116,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_905_000 picoseconds. - Weight::from_parts(47_337_000, 0) - .saturating_add(Weight::from_parts(0, 11917)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_633, 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)) } @@ -141,11 +147,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `137` // Estimated: `3602` - // Minimum execution time: 16_105_000 picoseconds. - Weight::from_parts(15_111_792, 0) + // Minimum execution time: 14_795_000 picoseconds. + Weight::from_parts(13_935_047, 0) .saturating_add(Weight::from_parts(0, 3602)) // Standard Error: 1 - .saturating_add(Weight::from_parts(961, 0).saturating_mul(s.into())) + .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)) } @@ -155,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_330_000 picoseconds. - Weight::from_parts(20_107_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)) } @@ -176,11 +182,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `683` // Estimated: `4148` - // Minimum execution time: 94_182_000 picoseconds. - Weight::from_parts(109_039_757, 0) + // Minimum execution time: 75_830_000 picoseconds. + Weight::from_parts(90_916_387, 0) .saturating_add(Weight::from_parts(0, 4148)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_975, 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)) } @@ -192,8 +198,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `28` // Estimated: `3493` - // Minimum execution time: 5_372_000 picoseconds. - Weight::from_parts(5_553_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)) @@ -208,8 +214,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 117_387_000 picoseconds. - Weight::from_parts(122_270_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)) @@ -230,11 +236,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// Proof: `Paras::FutureCodeUpgrades` (`max_values`: None, `max_size`: None, mode: `Measured`) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { // Proof Size summary in bytes: - // Measured: `27260` - // Estimated: `30725` - // Minimum execution time: 883_790_000 picoseconds. - Weight::from_parts(902_000_000, 0) - .saturating_add(Weight::from_parts(0, 30725)) + // Measured: `27360` + // Estimated: `30825` + // 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)) } @@ -246,11 +252,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { // Proof Size summary in bytes: - // Measured: `27238` - // Estimated: `30703` - // Minimum execution time: 110_789_000 picoseconds. - Weight::from_parts(119_883_000, 0) - .saturating_add(Weight::from_parts(0, 30703)) + // Measured: `27338` + // Estimated: `30803` + // 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)) } @@ -268,8 +274,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26728` // Estimated: `30193` - // Minimum execution time: 701_891_000 picoseconds. - Weight::from_parts(712_633_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)) @@ -284,8 +290,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 110_845_000 picoseconds. - Weight::from_parts(116_106_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/polkadot/src/weights/runtime_parachains_paras_inherent.rs b/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs index f4ee8ea1e4..e62d5ca997 100644 --- a/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs +++ b/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs @@ -17,22 +17,28 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-polkadot.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: -// /builds/polkadot-sdk/target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=spec-polkadot.json +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::paras_inherent -// --extrinsic= -// --output=/builds/runtimes/relay/polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -112,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: `50524` - // Estimated: `56464 + v * (23 ±0)` - // Minimum execution time: 982_020_000 picoseconds. - Weight::from_parts(437_604_767, 0) - .saturating_add(Weight::from_parts(0, 56464)) - // Standard Error: 21_162 - .saturating_add(Weight::from_parts(57_030_165, 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())) @@ -187,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: `42358` - // Estimated: `48298` - // Minimum execution time: 460_341_000 picoseconds. - Weight::from_parts(485_120_000, 0) - .saturating_add(Weight::from_parts(0, 48298)) + // 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)) } @@ -264,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: `42430` - // Estimated: `48370` - // Minimum execution time: 6_834_140_000 picoseconds. - Weight::from_parts(1_224_175_160, 0) - .saturating_add(Weight::from_parts(0, 48370)) - // Standard Error: 25_656 - .saturating_add(Weight::from_parts(56_135_036, 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)) } @@ -346,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: `42457` - // Estimated: `48397` - // Minimum execution time: 38_020_151_000 picoseconds. - Weight::from_parts(38_913_206_000, 0) - .saturating_add(Weight::from_parts(0, 48397)) + // 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/polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/relay/polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 038e9f1736..ee7d6d23df 100644 --- a/relay/polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/relay/polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -17,27 +17,28 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-xerhrdyb-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), 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 -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 +// --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json -// --pallet=pallet_xcm_benchmarks::fungible -// --chain=polkadot-dev -// --header=./file_header.txt -// --template=./xcm/pallet-xcm-benchmarks/template.hbs -// --output=./runtime/polkadot/src/weights/xcm/ +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,159 +51,142 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm_benchmarks::fungible`. 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) + /// 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 { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 24_801_000 picoseconds. - Weight::from_parts(25_567_000, 3593) + // 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) + /// 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 { // Proof Size summary in bytes: // Measured: `101` // Estimated: `6196` - // Minimum execution time: 53_090_000 picoseconds. - Weight::from_parts(54_157_000, 6196) + // 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)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Configuration ActiveConfig (r:1 w:0) - /// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) + /// Storage: `System::Account` (r:2 w:2) + /// 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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `628` + // Measured: `177` // Estimated: `6196` - // Minimum execution time: 80_084_000 picoseconds. - Weight::from_parts(81_110_000, 6196) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(5)) + // 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 Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// 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 { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000_000_000 picoseconds. - Weight::from_parts(2_000_000_000_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_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: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) + /// Storage: `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 initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `527` - // Estimated: `3992` - // Minimum execution time: 32_535_000 picoseconds. - Weight::from_parts(33_276_000, 3992) - .saturating_add(T::DbWeight::get().reads(7)) + // Measured: `177` + // Estimated: `3642` + // 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) - /// Storage: Balances InactiveIssuance (r:1 w:1) - /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// 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 { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 24_283_000 picoseconds. - Weight::from_parts(25_042_000, 3593) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // 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) + /// 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 { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 25_002_000 picoseconds. - Weight::from_parts(25_816_000, 3593) + // 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: Configuration ActiveConfig (r:1 w:0) - /// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) + /// Storage: `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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `527` - // Estimated: `3992` - // Minimum execution time: 55_355_000 picoseconds. - Weight::from_parts(56_410_000, 3992) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `76` + // Estimated: `3593` + // 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: Balances InactiveIssuance (r:1 w:1) - /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: Configuration ActiveConfig (r:1 w:0) - /// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) - /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet SupportedVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) - /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueues (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) - /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) - /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) + /// Storage: `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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: - // Measured: `527` - // Estimated: `3992` - // Minimum execution time: 57_258_000 picoseconds. - Weight::from_parts(58_205_000, 3992) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `76` + // Estimated: `3593` + // 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/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index d2495934d4..1b6672d584 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=cumulus_pallet_xcmp_queue -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_635_000 picoseconds. - Weight::from_parts(4_937_000, 0) + // Minimum execution time: 5_027_000 picoseconds. + Weight::from_parts(5_194_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_590_000 picoseconds. - Weight::from_parts(4_878_000, 0) + // Minimum execution time: 4_918_000 picoseconds. + Weight::from_parts(5_123_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs index ee7995b4ac..765cfdecb4 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_815_000 picoseconds. - Weight::from_parts(1_241_063, 0) + // Minimum execution time: 1_782_000 picoseconds. + Weight::from_parts(844_700, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) + .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: 6_962_000 picoseconds. - Weight::from_parts(128_782_669, 0) + // Minimum execution time: 5_246_000 picoseconds. + Weight::from_parts(50_763_605, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 10 - .saturating_add(Weight::from_parts(1_587, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_682, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_517_000 picoseconds. - Weight::from_parts(3_750_000, 0) + // Minimum execution time: 3_158_000 picoseconds. + Weight::from_parts(3_329_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164` // Estimated: `1649` - // Minimum execution time: 97_863_204_000 picoseconds. - Weight::from_parts(101_385_669_000, 0) + // Minimum execution time: 112_475_580_000 picoseconds. + Weight::from_parts(118_917_296_000, 0) .saturating_add(Weight::from_parts(0, 1649)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -110,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_919_000 picoseconds. - Weight::from_parts(2_055_000, 0) + // Minimum execution time: 1_913_000 picoseconds. + Weight::from_parts(1_956_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_130 - .saturating_add(Weight::from_parts(718_734, 0).saturating_mul(i.into())) + // Standard Error: 2_072 + .saturating_add(Weight::from_parts(803_678, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -124,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_943_000 picoseconds. - Weight::from_parts(2_123_000, 0) + // Minimum execution time: 1_948_000 picoseconds. + Weight::from_parts(2_011_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 931 - .saturating_add(Weight::from_parts(541_111, 0).saturating_mul(i.into())) + // Standard Error: 1_108 + .saturating_add(Weight::from_parts(578_044, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,11 +140,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `83 + p * (69 ±0)` // Estimated: `86 + p * (70 ±0)` - // Minimum execution time: 3_533_000 picoseconds. - Weight::from_parts(3_617_000, 0) + // Minimum execution time: 3_632_000 picoseconds. + Weight::from_parts(3_737_000, 0) .saturating_add(Weight::from_parts(0, 86)) - // Standard Error: 1_337 - .saturating_add(Weight::from_parts(1_236_860, 0).saturating_mul(p.into())) + // Standard Error: 1_915 + .saturating_add(Weight::from_parts(1_196_737, 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/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs index 974dffbc19..be47f8e53a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_asset_conversion` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_asset_conversion -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,10 +63,10 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) fn create_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `408` + // Measured: `499` // Estimated: `6196` - // Minimum execution time: 81_143_000 picoseconds. - Weight::from_parts(83_204_000, 0) + // Minimum execution time: 74_492_000 picoseconds. + Weight::from_parts(77_141_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -83,10 +85,10 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `1117` + // Measured: `1188` // Estimated: `7404` - // Minimum execution time: 141_876_000 picoseconds. - Weight::from_parts(145_869_000, 0) + // Minimum execution time: 136_659_000 picoseconds. + Weight::from_parts(138_677_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -105,10 +107,10 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `1106` + // Measured: `1177` // Estimated: `7404` - // Minimum execution time: 131_317_000 picoseconds. - Weight::from_parts(132_832_000, 0) + // Minimum execution time: 126_575_000 picoseconds. + Weight::from_parts(128_510_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -121,10 +123,10 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn swap_exact_tokens_for_tokens() -> Weight { // Proof Size summary in bytes: - // Measured: `1148` + // Measured: `1185` // Estimated: `13818` - // Minimum execution time: 159_569_000 picoseconds. - Weight::from_parts(161_761_000, 0) + // Minimum execution time: 155_900_000 picoseconds. + Weight::from_parts(158_685_000, 0) .saturating_add(Weight::from_parts(0, 13818)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(8)) @@ -137,10 +139,10 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) fn swap_tokens_for_exact_tokens() -> Weight { // Proof Size summary in bytes: - // Measured: `1148` + // Measured: `1185` // Estimated: `13818` - // Minimum execution time: 159_673_000 picoseconds. - Weight::from_parts(164_407_000, 0) + // Minimum execution time: 156_024_000 picoseconds. + Weight::from_parts(157_817_000, 0) .saturating_add(Weight::from_parts(0, 13818)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(8)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs index 20f50bbf2f..25d284e0bc 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_assets -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,10 +55,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `107` + // Measured: `144` // Estimated: `4273` - // Minimum execution time: 27_843_000 picoseconds. - Weight::from_parts(28_475_000, 0) + // Minimum execution time: 25_715_000 picoseconds. + Weight::from_parts(26_409_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +69,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `4273` - // Minimum execution time: 11_107_000 picoseconds. - Weight::from_parts(11_606_000, 0) + // Minimum execution time: 10_306_000 picoseconds. + Weight::from_parts(10_555_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,8 +81,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 14_034_000 picoseconds. - Weight::from_parts(14_413_000, 0) + // Minimum execution time: 11_827_000 picoseconds. + Weight::from_parts(12_253_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -96,13 +98,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + c * (208 ±0)` + // Measured: `84 + c * (208 ±0)` // Estimated: `4273 + c * (3207 ±0)` - // Minimum execution time: 16_047_000 picoseconds. - Weight::from_parts(16_612_000, 0) + // Minimum execution time: 15_309_000 picoseconds. + Weight::from_parts(15_755_000, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 3_979 - .saturating_add(Weight::from_parts(14_009_517, 0).saturating_mul(c.into())) + // Standard Error: 7_234 + .saturating_add(Weight::from_parts(13_318_532, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -120,11 +122,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `413 + a * (86 ±0)` // Estimated: `4273 + a * (3221 ±0)` - // Minimum execution time: 17_371_000 picoseconds. - Weight::from_parts(17_731_000, 0) + // Minimum execution time: 15_540_000 picoseconds. + Weight::from_parts(15_988_000, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 3_294 - .saturating_add(Weight::from_parts(14_083_186, 0).saturating_mul(a.into())) + // Standard Error: 4_226 + .saturating_add(Weight::from_parts(13_778_454, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -139,8 +141,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 13_959_000 picoseconds. - Weight::from_parts(14_507_000, 0) + // Minimum execution time: 13_064_000 picoseconds. + Weight::from_parts(13_646_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -153,8 +155,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 24_455_000 picoseconds. - Weight::from_parts(25_256_000, 0) + // Minimum execution time: 21_965_000 picoseconds. + Weight::from_parts(22_582_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -167,8 +169,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 31_178_000 picoseconds. - Weight::from_parts(32_092_000, 0) + // Minimum execution time: 28_770_000 picoseconds. + Weight::from_parts(29_427_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -181,10 +183,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `350` + // Measured: `389` // Estimated: `7404` - // Minimum execution time: 42_574_000 picoseconds. - Weight::from_parts(43_536_000, 0) + // Minimum execution time: 39_997_000 picoseconds. + Weight::from_parts(40_821_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -197,10 +199,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `350` + // Measured: `389` // Estimated: `7404` - // Minimum execution time: 37_375_000 picoseconds. - Weight::from_parts(38_219_000, 0) + // Minimum execution time: 35_808_000 picoseconds. + Weight::from_parts(36_869_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -213,10 +215,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `350` + // Measured: `389` // Estimated: `7404` - // Minimum execution time: 42_922_000 picoseconds. - Weight::from_parts(43_842_000, 0) + // Minimum execution time: 39_868_000 picoseconds. + Weight::from_parts(41_025_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -229,8 +231,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 17_463_000 picoseconds. - Weight::from_parts(18_125_000, 0) + // Minimum execution time: 15_114_000 picoseconds. + Weight::from_parts(15_855_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -243,8 +245,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 17_044_000 picoseconds. - Weight::from_parts(17_584_000, 0) + // Minimum execution time: 14_960_000 picoseconds. + Weight::from_parts(15_791_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -255,8 +257,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 13_401_000 picoseconds. - Weight::from_parts(13_843_000, 0) + // Minimum execution time: 11_334_000 picoseconds. + Weight::from_parts(11_732_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -267,8 +269,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 13_158_000 picoseconds. - Weight::from_parts(13_620_000, 0) + // Minimum execution time: 11_298_000 picoseconds. + Weight::from_parts(11_695_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,8 +283,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 14_481_000 picoseconds. - Weight::from_parts(14_899_000, 0) + // Minimum execution time: 13_697_000 picoseconds. + Weight::from_parts(14_081_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -293,8 +295,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 13_356_000 picoseconds. - Weight::from_parts(13_686_000, 0) + // Minimum execution time: 11_938_000 picoseconds. + Weight::from_parts(12_467_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -313,13 +315,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 27_013_000 picoseconds. - Weight::from_parts(28_136_998, 0) + // Minimum execution time: 23_923_000 picoseconds. + Weight::from_parts(24_848_115, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 303 - .saturating_add(Weight::from_parts(939, 0).saturating_mul(n.into())) - // Standard Error: 303 - .saturating_add(Weight::from_parts(1_749, 0).saturating_mul(s.into())) + // Standard Error: 330 + .saturating_add(Weight::from_parts(2_394, 0).saturating_mul(n.into())) + // Standard Error: 330 + .saturating_add(Weight::from_parts(2_251, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -331,8 +333,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `4273` - // Minimum execution time: 28_016_000 picoseconds. - Weight::from_parts(28_844_000, 0) + // Minimum execution time: 25_203_000 picoseconds. + Weight::from_parts(25_801_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -347,15 +349,17 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, s: u32, ) -> Weight { + fn force_set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `81` // Estimated: `4273` - // Minimum execution time: 12_148_000 picoseconds. - Weight::from_parts(12_831_380, 0) + // Minimum execution time: 12_047_000 picoseconds. + Weight::from_parts(12_566_541, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 179 - .saturating_add(Weight::from_parts(395, 0).saturating_mul(s.into())) + // Standard Error: 212 + .saturating_add(Weight::from_parts(1_968, 0).saturating_mul(n.into())) + // Standard Error: 212 + .saturating_add(Weight::from_parts(2_053, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -367,8 +371,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `4273` - // Minimum execution time: 27_310_000 picoseconds. - Weight::from_parts(28_093_000, 0) + // Minimum execution time: 24_077_000 picoseconds. + Weight::from_parts(24_855_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -379,8 +383,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 12_064_000 picoseconds. - Weight::from_parts(12_691_000, 0) + // Minimum execution time: 10_988_000 picoseconds. + Weight::from_parts(11_502_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -393,8 +397,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 30_417_000 picoseconds. - Weight::from_parts(31_172_000, 0) + // Minimum execution time: 27_137_000 picoseconds. + Weight::from_parts(27_955_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -409,10 +413,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `520` + // Measured: `559` // Estimated: `7404` - // Minimum execution time: 60_132_000 picoseconds. - Weight::from_parts(62_071_000, 0) + // Minimum execution time: 58_454_000 picoseconds. + Weight::from_parts(59_600_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -425,8 +429,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `4273` - // Minimum execution time: 32_800_000 picoseconds. - Weight::from_parts(33_677_000, 0) + // Minimum execution time: 30_127_000 picoseconds. + Weight::from_parts(30_893_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -439,8 +443,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `4273` - // Minimum execution time: 33_303_000 picoseconds. - Weight::from_parts(33_877_000, 0) + // Minimum execution time: 30_397_000 picoseconds. + Weight::from_parts(31_324_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -451,8 +455,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 13_632_000 picoseconds. - Weight::from_parts(14_294_000, 0) + // Minimum execution time: 12_261_000 picoseconds. + Weight::from_parts(12_601_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -467,8 +471,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `345` // Estimated: `4273` - // Minimum execution time: 32_056_000 picoseconds. - Weight::from_parts(32_737_000, 0) + // Minimum execution time: 29_351_000 picoseconds. + Weight::from_parts(30_292_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -481,8 +485,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 30_156_000 picoseconds. - Weight::from_parts(31_008_000, 0) + // Minimum execution time: 26_937_000 picoseconds. + Weight::from_parts(27_633_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -497,8 +501,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `471` // Estimated: `4273` - // Minimum execution time: 28_770_000 picoseconds. - Weight::from_parts(30_002_000, 0) + // Minimum execution time: 28_274_000 picoseconds. + Weight::from_parts(29_196_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -511,8 +515,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `4273` - // Minimum execution time: 27_274_000 picoseconds. - Weight::from_parts(28_086_000, 0) + // Minimum execution time: 25_903_000 picoseconds. + Weight::from_parts(26_891_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -525,8 +529,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 16_984_000 picoseconds. - Weight::from_parts(17_689_000, 0) + // Minimum execution time: 15_278_000 picoseconds. + Weight::from_parts(15_787_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs index 849b7161a8..71447fab7d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_assets -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,10 +53,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `146` // Estimated: `3675` - // Minimum execution time: 24_090_000 picoseconds. - Weight::from_parts(25_427_000, 0) + // Minimum execution time: 22_548_000 picoseconds. + Weight::from_parts(23_356_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -65,8 +67,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3675` - // Minimum execution time: 9_704_000 picoseconds. - Weight::from_parts(10_139_000, 0) + // Minimum execution time: 8_454_000 picoseconds. + Weight::from_parts(8_907_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +79,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 12_182_000 picoseconds. - Weight::from_parts(12_909_000, 0) + // Minimum execution time: 9_908_000 picoseconds. + Weight::from_parts(10_494_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -94,13 +96,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + c * (208 ±0)` + // Measured: `85 + c * (208 ±0)` // Estimated: `3675 + c * (2609 ±0)` - // Minimum execution time: 15_001_000 picoseconds. - Weight::from_parts(15_352_000, 0) + // Minimum execution time: 13_773_000 picoseconds. + Weight::from_parts(14_074_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 3_849 - .saturating_add(Weight::from_parts(13_909_426, 0).saturating_mul(c.into())) + // Standard Error: 7_273 + .saturating_add(Weight::from_parts(13_185_384, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -118,11 +120,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `414 + a * (86 ±0)` // Estimated: `3675 + a * (2623 ±0)` - // Minimum execution time: 15_743_000 picoseconds. - Weight::from_parts(16_022_000, 0) + // Minimum execution time: 13_609_000 picoseconds. + Weight::from_parts(14_051_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 2_588 - .saturating_add(Weight::from_parts(14_030_571, 0).saturating_mul(a.into())) + // Standard Error: 4_079 + .saturating_add(Weight::from_parts(13_716_341, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -137,8 +139,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 12_738_000 picoseconds. - Weight::from_parts(13_099_000, 0) + // Minimum execution time: 11_598_000 picoseconds. + Weight::from_parts(11_988_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -151,8 +153,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 22_889_000 picoseconds. - Weight::from_parts(23_374_000, 0) + // Minimum execution time: 20_115_000 picoseconds. + Weight::from_parts(20_839_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -165,8 +167,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 29_119_000 picoseconds. - Weight::from_parts(30_024_000, 0) + // Minimum execution time: 26_077_000 picoseconds. + Weight::from_parts(26_864_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -179,10 +181,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `351` + // Measured: `390` // Estimated: `6208` - // Minimum execution time: 39_871_000 picoseconds. - Weight::from_parts(40_851_000, 0) + // Minimum execution time: 36_452_000 picoseconds. + Weight::from_parts(37_661_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -195,10 +197,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `351` + // Measured: `390` // Estimated: `6208` - // Minimum execution time: 34_813_000 picoseconds. - Weight::from_parts(35_874_000, 0) + // Minimum execution time: 32_880_000 picoseconds. + Weight::from_parts(33_660_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -211,10 +213,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `351` + // Measured: `390` // Estimated: `6208` - // Minimum execution time: 40_083_000 picoseconds. - Weight::from_parts(41_235_000, 0) + // Minimum execution time: 36_999_000 picoseconds. + Weight::from_parts(38_016_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -227,8 +229,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 15_833_000 picoseconds. - Weight::from_parts(16_495_000, 0) + // Minimum execution time: 13_626_000 picoseconds. + Weight::from_parts(14_186_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -241,8 +243,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 15_639_000 picoseconds. - Weight::from_parts(16_185_000, 0) + // Minimum execution time: 13_509_000 picoseconds. + Weight::from_parts(14_061_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -253,8 +255,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 12_045_000 picoseconds. - Weight::from_parts(12_440_000, 0) + // Minimum execution time: 9_626_000 picoseconds. + Weight::from_parts(10_018_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -265,8 +267,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 11_844_000 picoseconds. - Weight::from_parts(12_354_000, 0) + // Minimum execution time: 9_512_000 picoseconds. + Weight::from_parts(9_873_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -279,8 +281,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 13_203_000 picoseconds. - Weight::from_parts(13_580_000, 0) + // Minimum execution time: 11_881_000 picoseconds. + Weight::from_parts(12_346_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -291,8 +293,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 11_684_000 picoseconds. - Weight::from_parts(12_313_000, 0) + // Minimum execution time: 10_455_000 picoseconds. + Weight::from_parts(10_945_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -307,15 +309,17 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(_n: u32, s: u32, ) -> Weight { + fn set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 25_694_000 picoseconds. - Weight::from_parts(26_946_456, 0) + // Minimum execution time: 22_322_000 picoseconds. + Weight::from_parts(23_366_297, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 419 - .saturating_add(Weight::from_parts(107, 0).saturating_mul(s.into())) + // Standard Error: 346 + .saturating_add(Weight::from_parts(79, 0).saturating_mul(n.into())) + // Standard Error: 346 + .saturating_add(Weight::from_parts(805, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -327,8 +331,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `407` // Estimated: `3675` - // Minimum execution time: 26_359_000 picoseconds. - Weight::from_parts(27_229_000, 0) + // Minimum execution time: 22_961_000 picoseconds. + Weight::from_parts(23_854_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -347,13 +351,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `82` // Estimated: `3675` - // Minimum execution time: 11_253_000 picoseconds. - Weight::from_parts(11_770_533, 0) + // Minimum execution time: 10_781_000 picoseconds. + Weight::from_parts(11_406_089, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 173 - .saturating_add(Weight::from_parts(403, 0).saturating_mul(n.into())) - // Standard Error: 173 - .saturating_add(Weight::from_parts(1_278, 0).saturating_mul(s.into())) + // Standard Error: 216 + .saturating_add(Weight::from_parts(1_732, 0).saturating_mul(n.into())) + // Standard Error: 216 + .saturating_add(Weight::from_parts(1_841, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -365,8 +369,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `407` // Estimated: `3675` - // Minimum execution time: 25_760_000 picoseconds. - Weight::from_parts(26_862_000, 0) + // Minimum execution time: 22_459_000 picoseconds. + Weight::from_parts(23_446_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -377,8 +381,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 11_256_000 picoseconds. - Weight::from_parts(11_684_000, 0) + // Minimum execution time: 9_937_000 picoseconds. + Weight::from_parts(10_465_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -391,8 +395,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 28_446_000 picoseconds. - Weight::from_parts(29_605_000, 0) + // Minimum execution time: 25_342_000 picoseconds. + Weight::from_parts(26_305_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -407,10 +411,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `521` + // Measured: `560` // Estimated: `6208` - // Minimum execution time: 56_452_000 picoseconds. - Weight::from_parts(58_139_000, 0) + // Minimum execution time: 54_596_000 picoseconds. + Weight::from_parts(55_721_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -423,8 +427,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3675` - // Minimum execution time: 30_916_000 picoseconds. - Weight::from_parts(31_906_000, 0) + // Minimum execution time: 27_945_000 picoseconds. + Weight::from_parts(28_897_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -437,8 +441,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3675` - // Minimum execution time: 31_122_000 picoseconds. - Weight::from_parts(32_076_000, 0) + // Minimum execution time: 28_376_000 picoseconds. + Weight::from_parts(29_227_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -449,8 +453,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 11_922_000 picoseconds. - Weight::from_parts(12_681_000, 0) + // Minimum execution time: 10_788_000 picoseconds. + Weight::from_parts(11_313_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -465,8 +469,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3675` - // Minimum execution time: 29_769_000 picoseconds. - Weight::from_parts(30_922_000, 0) + // Minimum execution time: 27_626_000 picoseconds. + Weight::from_parts(28_506_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -479,8 +483,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 28_511_000 picoseconds. - Weight::from_parts(29_187_000, 0) + // Minimum execution time: 24_979_000 picoseconds. + Weight::from_parts(25_913_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -495,8 +499,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `472` // Estimated: `3675` - // Minimum execution time: 27_820_000 picoseconds. - Weight::from_parts(28_747_000, 0) + // Minimum execution time: 27_017_000 picoseconds. + Weight::from_parts(27_869_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -509,8 +513,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `402` // Estimated: `3675` - // Minimum execution time: 26_024_000 picoseconds. - Weight::from_parts(26_951_000, 0) + // Minimum execution time: 24_757_000 picoseconds. + Weight::from_parts(25_625_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -523,8 +527,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 15_383_000 picoseconds. - Weight::from_parts(16_109_000, 0) + // Minimum execution time: 13_453_000 picoseconds. + Weight::from_parts(14_060_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs index 159222bd63..922137b547 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_assets -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3675` - // Minimum execution time: 10_711_000 picoseconds. - Weight::from_parts(11_184_000, 0) + // Minimum execution time: 10_327_000 picoseconds. + Weight::from_parts(10_767_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3675` - // Minimum execution time: 10_054_000 picoseconds. - Weight::from_parts(10_643_000, 0) + // Minimum execution time: 9_859_000 picoseconds. + Weight::from_parts(10_313_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,8 +77,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 12_609_000 picoseconds. - Weight::from_parts(13_415_000, 0) + // Minimum execution time: 10_349_000 picoseconds. + Weight::from_parts(10_780_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -92,13 +94,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + c * (208 ±0)` + // Measured: `122 + c * (208 ±0)` // Estimated: `3675 + c * (2609 ±0)` - // Minimum execution time: 15_538_000 picoseconds. - Weight::from_parts(15_879_000, 0) + // Minimum execution time: 14_416_000 picoseconds. + Weight::from_parts(14_691_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 3_973 - .saturating_add(Weight::from_parts(13_927_571, 0).saturating_mul(c.into())) + // Standard Error: 7_257 + .saturating_add(Weight::from_parts(13_166_740, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -116,11 +118,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `451 + a * (86 ±0)` // Estimated: `3675 + a * (2623 ±0)` - // Minimum execution time: 16_213_000 picoseconds. - Weight::from_parts(16_794_000, 0) + // Minimum execution time: 14_333_000 picoseconds. + Weight::from_parts(14_651_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 2_690 - .saturating_add(Weight::from_parts(14_038_386, 0).saturating_mul(a.into())) + // Standard Error: 4_812 + .saturating_add(Weight::from_parts(13_784_978, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -135,8 +137,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 12_971_000 picoseconds. - Weight::from_parts(13_466_000, 0) + // Minimum execution time: 11_770_000 picoseconds. + Weight::from_parts(12_178_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -149,8 +151,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 23_158_000 picoseconds. - Weight::from_parts(23_937_000, 0) + // Minimum execution time: 20_274_000 picoseconds. + Weight::from_parts(21_083_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -163,8 +165,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 29_425_000 picoseconds. - Weight::from_parts(30_291_000, 0) + // Minimum execution time: 26_271_000 picoseconds. + Weight::from_parts(27_277_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -177,10 +179,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `388` + // Measured: `427` // Estimated: `6208` - // Minimum execution time: 40_165_000 picoseconds. - Weight::from_parts(41_214_000, 0) + // Minimum execution time: 37_162_000 picoseconds. + Weight::from_parts(38_134_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -193,10 +195,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `388` + // Measured: `427` // Estimated: `6208` - // Minimum execution time: 35_141_000 picoseconds. - Weight::from_parts(35_981_000, 0) + // Minimum execution time: 32_987_000 picoseconds. + Weight::from_parts(33_868_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -209,10 +211,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `388` + // Measured: `427` // Estimated: `6208` - // Minimum execution time: 40_357_000 picoseconds. - Weight::from_parts(41_243_000, 0) + // Minimum execution time: 37_562_000 picoseconds. + Weight::from_parts(38_201_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -225,8 +227,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 16_165_000 picoseconds. - Weight::from_parts(16_916_000, 0) + // Minimum execution time: 14_035_000 picoseconds. + Weight::from_parts(14_629_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -239,8 +241,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 16_083_000 picoseconds. - Weight::from_parts(16_740_000, 0) + // Minimum execution time: 14_047_000 picoseconds. + Weight::from_parts(14_523_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -251,8 +253,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 12_495_000 picoseconds. - Weight::from_parts(12_961_000, 0) + // Minimum execution time: 10_020_000 picoseconds. + Weight::from_parts(10_489_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -263,8 +265,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 12_443_000 picoseconds. - Weight::from_parts(12_874_000, 0) + // Minimum execution time: 10_016_000 picoseconds. + Weight::from_parts(10_344_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -277,8 +279,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 13_471_000 picoseconds. - Weight::from_parts(14_126_000, 0) + // Minimum execution time: 12_335_000 picoseconds. + Weight::from_parts(12_920_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -289,8 +291,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 12_200_000 picoseconds. - Weight::from_parts(12_648_000, 0) + // Minimum execution time: 11_099_000 picoseconds. + Weight::from_parts(11_545_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -309,13 +311,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 14_513_000 picoseconds. - Weight::from_parts(15_284_648, 0) + // Minimum execution time: 11_847_000 picoseconds. + Weight::from_parts(12_587_711, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 235 - .saturating_add(Weight::from_parts(939, 0).saturating_mul(n.into())) - // Standard Error: 235 - .saturating_add(Weight::from_parts(2_107, 0).saturating_mul(s.into())) + // Standard Error: 202 + .saturating_add(Weight::from_parts(2_693, 0).saturating_mul(n.into())) + // Standard Error: 202 + .saturating_add(Weight::from_parts(2_968, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -327,8 +329,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `444` // Estimated: `3675` - // Minimum execution time: 15_162_000 picoseconds. - Weight::from_parts(15_736_000, 0) + // Minimum execution time: 12_969_000 picoseconds. + Weight::from_parts(13_612_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -347,13 +349,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `119` // Estimated: `3675` - // Minimum execution time: 12_573_000 picoseconds. - Weight::from_parts(13_198_845, 0) + // Minimum execution time: 11_159_000 picoseconds. + Weight::from_parts(11_752_476, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 172 - .saturating_add(Weight::from_parts(1_372, 0).saturating_mul(n.into())) - // Standard Error: 172 - .saturating_add(Weight::from_parts(1_464, 0).saturating_mul(s.into())) + // Standard Error: 192 + .saturating_add(Weight::from_parts(1_592, 0).saturating_mul(n.into())) + // Standard Error: 192 + .saturating_add(Weight::from_parts(2_277, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -365,8 +367,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `444` // Estimated: `3675` - // Minimum execution time: 15_221_000 picoseconds. - Weight::from_parts(15_582_000, 0) + // Minimum execution time: 12_375_000 picoseconds. + Weight::from_parts(13_011_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -377,8 +379,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 11_922_000 picoseconds. - Weight::from_parts(12_292_000, 0) + // Minimum execution time: 10_409_000 picoseconds. + Weight::from_parts(10_977_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -391,8 +393,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 29_286_000 picoseconds. - Weight::from_parts(30_054_000, 0) + // Minimum execution time: 26_135_000 picoseconds. + Weight::from_parts(26_736_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -407,10 +409,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `558` + // Measured: `597` // Estimated: `6208` - // Minimum execution time: 57_424_000 picoseconds. - Weight::from_parts(58_708_000, 0) + // Minimum execution time: 55_219_000 picoseconds. + Weight::from_parts(56_400_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -423,8 +425,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `484` // Estimated: `3675` - // Minimum execution time: 31_742_000 picoseconds. - Weight::from_parts(32_630_000, 0) + // Minimum execution time: 28_475_000 picoseconds. + Weight::from_parts(29_194_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -437,8 +439,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `484` // Estimated: `3675` - // Minimum execution time: 31_338_000 picoseconds. - Weight::from_parts(32_830_000, 0) + // Minimum execution time: 28_943_000 picoseconds. + Weight::from_parts(29_674_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -449,8 +451,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 12_698_000 picoseconds. - Weight::from_parts(13_220_000, 0) + // Minimum execution time: 11_309_000 picoseconds. + Weight::from_parts(11_601_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -463,8 +465,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 17_157_000 picoseconds. - Weight::from_parts(17_656_000, 0) + // Minimum execution time: 15_731_000 picoseconds. + Weight::from_parts(16_413_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -477,8 +479,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 17_383_000 picoseconds. - Weight::from_parts(17_935_000, 0) + // Minimum execution time: 15_119_000 picoseconds. + Weight::from_parts(15_668_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -491,8 +493,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `3675` - // Minimum execution time: 14_045_000 picoseconds. - Weight::from_parts(14_640_000, 0) + // Minimum execution time: 14_162_000 picoseconds. + Weight::from_parts(14_911_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -505,8 +507,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `3675` - // Minimum execution time: 14_261_000 picoseconds. - Weight::from_parts(14_912_000, 0) + // Minimum execution time: 13_897_000 picoseconds. + Weight::from_parts(14_365_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -519,8 +521,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 16_232_000 picoseconds. - Weight::from_parts(16_837_000, 0) + // Minimum execution time: 14_060_000 picoseconds. + Weight::from_parts(14_496_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs index 155a6bb5e4..72c3704db5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 49_771_000 picoseconds. - Weight::from_parts(50_505_000, 0) + // Minimum execution time: 43_860_000 picoseconds. + Weight::from_parts(44_224_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_697_000 picoseconds. - Weight::from_parts(37_734_000, 0) + // Minimum execution time: 34_240_000 picoseconds. + Weight::from_parts(34_659_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,10 +75,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_768_000 picoseconds. - Weight::from_parts(14_030_000, 0) + // Minimum execution time: 14_009_000 picoseconds. + Weight::from_parts(14_639_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -85,10 +87,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 20_350_000 picoseconds. - Weight::from_parts(21_248_000, 0) + // Minimum execution time: 18_844_000 picoseconds. + Weight::from_parts(19_518_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 50_875_000 picoseconds. - Weight::from_parts(51_786_000, 0) + // Minimum execution time: 46_279_000 picoseconds. + Weight::from_parts(47_441_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 46_104_000 picoseconds. - Weight::from_parts(46_968_000, 0) + // Minimum execution time: 42_457_000 picoseconds. + Weight::from_parts(42_914_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -121,10 +123,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 15_995_000 picoseconds. - Weight::from_parts(16_336_000, 0) + // Minimum execution time: 16_297_000 picoseconds. + Weight::from_parts(16_925_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 15_756_000 picoseconds. - Weight::from_parts(16_113_000, 0) + // Minimum execution time: 15_740_000 picoseconds. + Weight::from_parts(15_870_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 12_021 - .saturating_add(Weight::from_parts(13_975_314, 0).saturating_mul(u.into())) + // Standard Error: 15_344 + .saturating_add(Weight::from_parts(13_532_274, 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/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs index 98ae9ae4b4..cc84617335 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_collator_selection -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,13 +54,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `b` is `[1, 20]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `163 + b * (79 ±0)` - // Estimated: `1154 + b * (2555 ±0)` - // Minimum execution time: 13_451_000 picoseconds. - Weight::from_parts(11_318_882, 0) - .saturating_add(Weight::from_parts(0, 1154)) - // Standard Error: 7_378 - .saturating_add(Weight::from_parts(3_101_282, 0).saturating_mul(b.into())) + // Measured: `196 + b * (79 ±0)` + // Estimated: `1187 + b * (2555 ±0)` + // Minimum execution time: 11_885_000 picoseconds. + Weight::from_parts(9_091_024, 0) + .saturating_add(Weight::from_parts(0, 1187)) + // Standard Error: 5_764 + .saturating_add(Weight::from_parts(3_201_261, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -75,15 +77,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn add_invulnerable(b: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `756 + b * (32 ±0) + c * (53 ±0)` + // Measured: `794 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 46_311_000 picoseconds. - Weight::from_parts(46_131_865, 0) + // Minimum execution time: 39_570_000 picoseconds. + Weight::from_parts(37_974_968, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_658 - .saturating_add(Weight::from_parts(185_350, 0).saturating_mul(b.into())) - // Standard Error: 1_830 - .saturating_add(Weight::from_parts(121_308, 0).saturating_mul(c.into())) + // Standard Error: 19_956 + .saturating_add(Weight::from_parts(136_659, 0).saturating_mul(b.into())) + // Standard Error: 3_782 + .saturating_add(Weight::from_parts(204_114, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -98,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 15_160_000 picoseconds. - Weight::from_parts(15_177_335, 0) + // Minimum execution time: 11_619_000 picoseconds. + Weight::from_parts(11_368_959, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_360 - .saturating_add(Weight::from_parts(163_632, 0).saturating_mul(b.into())) + // Standard Error: 2_545 + .saturating_add(Weight::from_parts(178_094, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_600_000 picoseconds. - Weight::from_parts(7_020_000, 0) + // Minimum execution time: 4_913_000 picoseconds. + Weight::from_parts(5_133_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,8 +125,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_026_000 picoseconds. - Weight::from_parts(7_320_000, 0) + // Minimum execution time: 4_933_000 picoseconds. + Weight::from_parts(5_195_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,13 +145,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `736 + c * (52 ±0)` + // Measured: `777 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 39_780_000 picoseconds. - Weight::from_parts(44_235_369, 0) + // Minimum execution time: 35_462_000 picoseconds. + Weight::from_parts(40_539_477, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_351 - .saturating_add(Weight::from_parts(156_217, 0).saturating_mul(c.into())) + // Standard Error: 2_447 + .saturating_add(Weight::from_parts(147_560, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -160,16 +162,16 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) - /// The range of component `c` is `[4, 100]`. + /// The range of component `c` is `[3, 100]`. fn leave_intent(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `306 + c * (50 ±0)` + // Measured: `371 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 32_137_000 picoseconds. - Weight::from_parts(35_496_399, 0) + // Minimum execution time: 27_672_000 picoseconds. + Weight::from_parts(30_590_331, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_080 - .saturating_add(Weight::from_parts(134_319, 0).saturating_mul(c.into())) + // Standard Error: 2_397 + .saturating_add(Weight::from_parts(152_439, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -181,10 +183,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn note_author() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `155` // Estimated: `6196` - // Minimum execution time: 42_059_000 picoseconds. - Weight::from_parts(42_771_000, 0) + // Minimum execution time: 39_810_000 picoseconds. + Weight::from_parts(40_459_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -203,13 +205,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 100]`. fn new_session(r: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2243 + c * (97 ±0) + r * (112 ±0)` + // Measured: `2300 + c * (97 ±0) + r * (115 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 16_495_000 picoseconds. - Weight::from_parts(16_813_000, 0) + // Minimum execution time: 15_352_000 picoseconds. + Weight::from_parts(15_879_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 335_348 - .saturating_add(Weight::from_parts(14_404_838, 0).saturating_mul(c.into())) + // Standard Error: 291_685 + .saturating_add(Weight::from_parts(12_673_570, 0).saturating_mul(c.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().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multisig.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multisig.rs index 14bfa6f658..d2157134ee 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multisig.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multisig.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_135_000 picoseconds. - Weight::from_parts(13_971_219, 0) + // Minimum execution time: 13_660_000 picoseconds. + Weight::from_parts(14_266_069, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(506, 0).saturating_mul(z.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(537, 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`) @@ -62,15 +64,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `262 + s * (2 ±0)` + // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 42_420_000 picoseconds. - Weight::from_parts(31_787_821, 0) + // Minimum execution time: 39_625_000 picoseconds. + Weight::from_parts(27_989_754, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 999 - .saturating_add(Weight::from_parts(119_191, 0).saturating_mul(s.into())) + // Standard Error: 978 + .saturating_add(Weight::from_parts(132_284, 0).saturating_mul(s.into())) // Standard Error: 9 - .saturating_add(Weight::from_parts(1_435, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_539, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 28_225_000 picoseconds. - Weight::from_parts(19_513_691, 0) + // Minimum execution time: 26_940_000 picoseconds. + Weight::from_parts(17_285_344, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 429 - .saturating_add(Weight::from_parts(101_965, 0).saturating_mul(s.into())) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_404, 0).saturating_mul(z.into())) + // Standard Error: 691 + .saturating_add(Weight::from_parts(108_518, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_533, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,15 +102,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `385 + s * (33 ±0)` + // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 48_352_000 picoseconds. - Weight::from_parts(35_652_341, 0) + // Minimum execution time: 47_092_000 picoseconds. + Weight::from_parts(32_993_891, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 943 - .saturating_add(Weight::from_parts(147_248, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_443, 0).saturating_mul(z.into())) + // Standard Error: 1_049 + .saturating_add(Weight::from_parts(156_305, 0).saturating_mul(s.into())) + // Standard Error: 10 + .saturating_add(Weight::from_parts(1_557, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 28_733_000 picoseconds. - Weight::from_parts(29_911_041, 0) + // Minimum execution time: 26_581_000 picoseconds. + Weight::from_parts(27_341_247, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 784 - .saturating_add(Weight::from_parts(123_189, 0).saturating_mul(s.into())) + // Standard Error: 1_070 + .saturating_add(Weight::from_parts(128_645, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 16_821_000 picoseconds. - Weight::from_parts(17_305_652, 0) + // Minimum execution time: 15_553_000 picoseconds. + Weight::from_parts(15_848_030, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 643 - .saturating_add(Weight::from_parts(105_057, 0).saturating_mul(s.into())) + // Standard Error: 748 + .saturating_add(Weight::from_parts(116_160, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 29_325_000 picoseconds. - Weight::from_parts(30_507_890, 0) + // Minimum execution time: 28_423_000 picoseconds. + Weight::from_parts(29_506_646, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 600 - .saturating_add(Weight::from_parts(121_488, 0).saturating_mul(s.into())) + // Standard Error: 1_167 + .saturating_add(Weight::from_parts(114_796, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nft_fractionalization.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nft_fractionalization.rs index 6441a72105..fe2d4c63ed 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nft_fractionalization.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nft_fractionalization.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_nft_fractionalization` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_nft_fractionalization -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -67,8 +69,8 @@ impl pallet_nft_fractionalization::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `462` // Estimated: `4326` - // Minimum execution time: 165_355_000 picoseconds. - Weight::from_parts(168_385_000, 0) + // Minimum execution time: 153_227_000 picoseconds. + Weight::from_parts(155_870_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(8)) @@ -101,8 +103,8 @@ impl pallet_nft_fractionalization::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `1275` // Estimated: `4326` - // Minimum execution time: 119_359_000 picoseconds. - Weight::from_parts(120_614_000, 0) + // Minimum execution time: 111_620_000 picoseconds. + Weight::from_parts(113_885_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(10)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nfts.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nfts.rs index 6e356a9652..d1839a053c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nfts.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_nfts.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_nfts` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_nfts -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,10 +59,10 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `179` + // Measured: `216` // Estimated: `3549` - // Minimum execution time: 34_816_000 picoseconds. - Weight::from_parts(36_093_000, 0) + // Minimum execution time: 31_460_000 picoseconds. + Weight::from_parts(32_306_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) @@ -79,8 +81,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3549` - // Minimum execution time: 20_877_000 picoseconds. - Weight::from_parts(21_135_000, 0) + // Minimum execution time: 18_816_000 picoseconds. + Weight::from_parts(19_289_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) @@ -104,19 +106,17 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `c` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. - fn destroy(m: u32, c: u32, a: u32, ) -> Weight { + fn destroy(_m: u32, c: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `32204 + a * (366 ±0)` // Estimated: `2523990 + a * (2954 ±0)` - // Minimum execution time: 1_219_626_000 picoseconds. - Weight::from_parts(1_073_610_577, 0) + // Minimum execution time: 1_154_721_000 picoseconds. + Weight::from_parts(1_200_651_368, 0) .saturating_add(Weight::from_parts(0, 2523990)) - // Standard Error: 4_444 - .saturating_add(Weight::from_parts(48_099, 0).saturating_mul(m.into())) - // Standard Error: 4_444 - .saturating_add(Weight::from_parts(34_719, 0).saturating_mul(c.into())) - // Standard Error: 4_444 - .saturating_add(Weight::from_parts(6_377_357, 0).saturating_mul(a.into())) + // Standard Error: 15_481 + .saturating_add(Weight::from_parts(4_067, 0).saturating_mul(c.into())) + // Standard Error: 15_481 + .saturating_add(Weight::from_parts(6_649_162, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1004)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1005)) @@ -139,8 +139,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `455` // Estimated: `4326` - // Minimum execution time: 45_974_000 picoseconds. - Weight::from_parts(47_017_000, 0) + // Minimum execution time: 43_565_000 picoseconds. + Weight::from_parts(44_197_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -161,8 +161,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `455` // Estimated: `4326` - // Minimum execution time: 44_889_000 picoseconds. - Weight::from_parts(45_826_000, 0) + // Minimum execution time: 43_083_000 picoseconds. + Weight::from_parts(44_399_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -189,8 +189,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `564` // Estimated: `4326` - // Minimum execution time: 50_317_000 picoseconds. - Weight::from_parts(51_142_000, 0) + // Minimum execution time: 47_769_000 picoseconds. + Weight::from_parts(49_189_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(7)) @@ -215,8 +215,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `593` // Estimated: `4326` - // Minimum execution time: 38_356_000 picoseconds. - Weight::from_parts(39_150_000, 0) + // Minimum execution time: 36_996_000 picoseconds. + Weight::from_parts(37_741_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -232,11 +232,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `763 + i * (108 ±0)` // Estimated: `3549 + i * (3336 ±0)` - // Minimum execution time: 15_518_000 picoseconds. - Weight::from_parts(15_773_000, 0) + // Minimum execution time: 13_159_000 picoseconds. + Weight::from_parts(13_416_000, 0) .saturating_add(Weight::from_parts(0, 3549)) - // Standard Error: 19_241 - .saturating_add(Weight::from_parts(15_647_359, 0).saturating_mul(i.into())) + // Standard Error: 22_966 + .saturating_add(Weight::from_parts(15_755_199, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) @@ -250,8 +250,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `435` // Estimated: `3534` - // Minimum execution time: 19_117_000 picoseconds. - Weight::from_parts(19_763_000, 0) + // Minimum execution time: 16_852_000 picoseconds. + Weight::from_parts(17_430_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -264,8 +264,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `435` // Estimated: `3534` - // Minimum execution time: 18_764_000 picoseconds. - Weight::from_parts(19_385_000, 0) + // Minimum execution time: 16_657_000 picoseconds. + Weight::from_parts(17_160_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -278,8 +278,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3549` - // Minimum execution time: 15_824_000 picoseconds. - Weight::from_parts(16_373_000, 0) + // Minimum execution time: 13_757_000 picoseconds. + Weight::from_parts(14_114_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -294,8 +294,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3549` - // Minimum execution time: 21_188_000 picoseconds. - Weight::from_parts(21_719_000, 0) + // Minimum execution time: 19_129_000 picoseconds. + Weight::from_parts(19_726_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -308,8 +308,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369` // Estimated: `6078` - // Minimum execution time: 36_489_000 picoseconds. - Weight::from_parts(37_499_000, 0) + // Minimum execution time: 36_911_000 picoseconds. + Weight::from_parts(38_702_000, 0) .saturating_add(Weight::from_parts(0, 6078)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -322,8 +322,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `311` // Estimated: `3549` - // Minimum execution time: 16_140_000 picoseconds. - Weight::from_parts(16_716_000, 0) + // Minimum execution time: 14_237_000 picoseconds. + Weight::from_parts(14_770_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -336,8 +336,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `3549` - // Minimum execution time: 13_528_000 picoseconds. - Weight::from_parts(13_813_000, 0) + // Minimum execution time: 11_194_000 picoseconds. + Weight::from_parts(11_502_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -350,8 +350,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `435` // Estimated: `3534` - // Minimum execution time: 18_087_000 picoseconds. - Weight::from_parts(18_766_000, 0) + // Minimum execution time: 16_092_000 picoseconds. + Weight::from_parts(16_409_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -370,8 +370,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `539` // Estimated: `3944` - // Minimum execution time: 46_003_000 picoseconds. - Weight::from_parts(47_154_000, 0) + // Minimum execution time: 43_958_000 picoseconds. + Weight::from_parts(44_619_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -384,8 +384,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3944` - // Minimum execution time: 23_996_000 picoseconds. - Weight::from_parts(24_733_000, 0) + // Minimum execution time: 22_514_000 picoseconds. + Weight::from_parts(22_926_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -402,8 +402,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `983` // Estimated: `3944` - // Minimum execution time: 42_133_000 picoseconds. - Weight::from_parts(43_509_000, 0) + // Minimum execution time: 40_025_000 picoseconds. + Weight::from_parts(41_178_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -416,8 +416,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `381` // Estimated: `4466` - // Minimum execution time: 16_502_000 picoseconds. - Weight::from_parts(17_006_000, 0) + // Minimum execution time: 14_239_000 picoseconds. + Weight::from_parts(14_602_000, 0) .saturating_add(Weight::from_parts(0, 4466)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -433,13 +433,13 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 1000]`. fn cancel_item_attributes_approval(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `760 + n * (398 ±0)` + // Measured: `831 + n * (398 ±0)` // Estimated: `4466 + n * (2954 ±0)` - // Minimum execution time: 24_612_000 picoseconds. - Weight::from_parts(25_028_000, 0) + // Minimum execution time: 22_553_000 picoseconds. + Weight::from_parts(22_877_000, 0) .saturating_add(Weight::from_parts(0, 4466)) - // Standard Error: 3_734 - .saturating_add(Weight::from_parts(6_198_068, 0).saturating_mul(n.into())) + // Standard Error: 5_694 + .saturating_add(Weight::from_parts(6_441_935, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -460,8 +460,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `539` // Estimated: `3812` - // Minimum execution time: 38_454_000 picoseconds. - Weight::from_parts(39_063_000, 0) + // Minimum execution time: 35_425_000 picoseconds. + Weight::from_parts(36_190_000, 0) .saturating_add(Weight::from_parts(0, 3812)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -478,8 +478,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `849` // Estimated: `3812` - // Minimum execution time: 35_985_000 picoseconds. - Weight::from_parts(37_369_000, 0) + // Minimum execution time: 33_615_000 picoseconds. + Weight::from_parts(34_340_000, 0) .saturating_add(Weight::from_parts(0, 3812)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -496,8 +496,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398` // Estimated: `3759` - // Minimum execution time: 34_726_000 picoseconds. - Weight::from_parts(35_441_000, 0) + // Minimum execution time: 31_839_000 picoseconds. + Weight::from_parts(32_247_000, 0) .saturating_add(Weight::from_parts(0, 3759)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -514,8 +514,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `716` // Estimated: `3759` - // Minimum execution time: 34_404_000 picoseconds. - Weight::from_parts(35_036_000, 0) + // Minimum execution time: 31_213_000 picoseconds. + Weight::from_parts(31_692_000, 0) .saturating_add(Weight::from_parts(0, 3759)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -528,8 +528,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `4326` - // Minimum execution time: 19_629_000 picoseconds. - Weight::from_parts(20_186_000, 0) + // Minimum execution time: 16_934_000 picoseconds. + Weight::from_parts(17_485_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -540,8 +540,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `418` // Estimated: `4326` - // Minimum execution time: 17_064_000 picoseconds. - Weight::from_parts(17_575_000, 0) + // Minimum execution time: 14_531_000 picoseconds. + Weight::from_parts(15_223_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -552,8 +552,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `418` // Estimated: `4326` - // Minimum execution time: 16_178_000 picoseconds. - Weight::from_parts(16_815_000, 0) + // Minimum execution time: 13_919_000 picoseconds. + Weight::from_parts(14_340_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -564,8 +564,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3517` - // Minimum execution time: 13_982_000 picoseconds. - Weight::from_parts(14_348_000, 0) + // Minimum execution time: 11_347_000 picoseconds. + Weight::from_parts(11_911_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -578,8 +578,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3549` - // Minimum execution time: 17_636_000 picoseconds. - Weight::from_parts(18_419_000, 0) + // Minimum execution time: 15_435_000 picoseconds. + Weight::from_parts(15_890_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -592,8 +592,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `323` // Estimated: `3538` - // Minimum execution time: 17_193_000 picoseconds. - Weight::from_parts(17_678_000, 0) + // Minimum execution time: 14_933_000 picoseconds. + Weight::from_parts(15_311_000, 0) .saturating_add(Weight::from_parts(0, 3538)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -610,8 +610,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `518` // Estimated: `4326` - // Minimum execution time: 21_993_000 picoseconds. - Weight::from_parts(22_546_000, 0) + // Minimum execution time: 19_730_000 picoseconds. + Weight::from_parts(20_314_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -636,8 +636,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `705` // Estimated: `4326` - // Minimum execution time: 46_717_000 picoseconds. - Weight::from_parts(48_006_000, 0) + // Minimum execution time: 44_431_000 picoseconds. + Weight::from_parts(45_603_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -647,11 +647,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_009_000 picoseconds. - Weight::from_parts(3_131_493, 0) + // Minimum execution time: 2_054_000 picoseconds. + Weight::from_parts(2_895_712, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 6_553 - .saturating_add(Weight::from_parts(3_438_770, 0).saturating_mul(n.into())) + // Standard Error: 4_550 + .saturating_add(Weight::from_parts(2_158_535, 0).saturating_mul(n.into())) } /// Storage: `Nfts::Item` (r:2 w:0) /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) @@ -661,8 +661,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `494` // Estimated: `7662` - // Minimum execution time: 19_997_000 picoseconds. - Weight::from_parts(20_666_000, 0) + // Minimum execution time: 16_948_000 picoseconds. + Weight::from_parts(17_442_000, 0) .saturating_add(Weight::from_parts(0, 7662)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -675,8 +675,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `513` // Estimated: `4326` - // Minimum execution time: 19_433_000 picoseconds. - Weight::from_parts(19_903_000, 0) + // Minimum execution time: 17_513_000 picoseconds. + Weight::from_parts(17_940_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -701,8 +701,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `834` // Estimated: `7662` - // Minimum execution time: 78_867_000 picoseconds. - Weight::from_parts(80_637_000, 0) + // Minimum execution time: 75_647_000 picoseconds. + Weight::from_parts(78_024_000, 0) .saturating_add(Weight::from_parts(0, 7662)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(10)) @@ -728,13 +728,13 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 10]`. fn mint_pre_signed(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `558` + // Measured: `629` // Estimated: `6078 + n * (2954 ±0)` - // Minimum execution time: 135_703_000 picoseconds. - Weight::from_parts(142_738_234, 0) + // Minimum execution time: 137_255_000 picoseconds. + Weight::from_parts(144_492_481, 0) .saturating_add(Weight::from_parts(0, 6078)) - // Standard Error: 35_458 - .saturating_add(Weight::from_parts(28_512_058, 0).saturating_mul(n.into())) + // Standard Error: 47_506 + .saturating_add(Weight::from_parts(27_712_285, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -756,13 +756,13 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 10]`. fn set_attributes_pre_signed(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `588` + // Measured: `659` // Estimated: `4466 + n * (2954 ±0)` - // Minimum execution time: 81_868_000 picoseconds. - Weight::from_parts(92_899_810, 0) + // Minimum execution time: 78_833_000 picoseconds. + Weight::from_parts(91_270_784, 0) .saturating_add(Weight::from_parts(0, 4466)) - // Standard Error: 59_557 - .saturating_add(Weight::from_parts(27_876_272, 0).saturating_mul(n.into())) + // Standard Error: 65_425 + .saturating_add(Weight::from_parts(27_195_878, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_proxy.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_proxy.rs index 6dcdc6193b..058221baef 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_proxy.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_proxy.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_proxy -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +54,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 14_885_000 picoseconds. - Weight::from_parts(15_292_885, 0) + // Minimum execution time: 12_574_000 picoseconds. + Weight::from_parts(13_124_777, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_084 - .saturating_add(Weight::from_parts(40_529, 0).saturating_mul(p.into())) + // Standard Error: 887 + .saturating_add(Weight::from_parts(43_519, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -71,13 +73,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 35_211_000 picoseconds. - Weight::from_parts(35_078_505, 0) + // Minimum execution time: 31_564_000 picoseconds. + Weight::from_parts(31_488_146, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_107 - .saturating_add(Weight::from_parts(104_752, 0).saturating_mul(a.into())) - // Standard Error: 2_176 - .saturating_add(Weight::from_parts(40_058, 0).saturating_mul(p.into())) + // Standard Error: 1_698 + .saturating_add(Weight::from_parts(141_356, 0).saturating_mul(a.into())) + // Standard Error: 1_754 + .saturating_add(Weight::from_parts(41_522, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,13 +93,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 22_342_000 picoseconds. - Weight::from_parts(22_619_741, 0) + // Minimum execution time: 20_583_000 picoseconds. + Weight::from_parts(21_501_172, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_388 - .saturating_add(Weight::from_parts(113_492, 0).saturating_mul(a.into())) - // Standard Error: 1_434 - .saturating_add(Weight::from_parts(18_966, 0).saturating_mul(p.into())) + // Standard Error: 1_588 + .saturating_add(Weight::from_parts(133_368, 0).saturating_mul(a.into())) + // Standard Error: 1_641 + .saturating_add(Weight::from_parts(3_200, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -111,13 +113,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 22_555_000 picoseconds. - Weight::from_parts(23_296_356, 0) + // Minimum execution time: 20_518_000 picoseconds. + Weight::from_parts(21_407_954, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_499 - .saturating_add(Weight::from_parts(99_149, 0).saturating_mul(a.into())) - // Standard Error: 1_549 - .saturating_add(Weight::from_parts(9_638, 0).saturating_mul(p.into())) + // Standard Error: 1_341 + .saturating_add(Weight::from_parts(128_660, 0).saturating_mul(a.into())) + // Standard Error: 1_386 + .saturating_add(Weight::from_parts(5_625, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -133,13 +135,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `386 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 31_048_000 picoseconds. - Weight::from_parts(31_062_520, 0) + // Minimum execution time: 27_705_000 picoseconds. + Weight::from_parts(27_787_600, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_892 - .saturating_add(Weight::from_parts(112_188, 0).saturating_mul(a.into())) - // Standard Error: 1_955 - .saturating_add(Weight::from_parts(44_986, 0).saturating_mul(p.into())) + // Standard Error: 1_470 + .saturating_add(Weight::from_parts(138_604, 0).saturating_mul(a.into())) + // Standard Error: 1_519 + .saturating_add(Weight::from_parts(36_732, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -150,11 +152,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_639_000 picoseconds. - Weight::from_parts(23_804_305, 0) + // Minimum execution time: 19_830_000 picoseconds. + Weight::from_parts(20_591_588, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_300 - .saturating_add(Weight::from_parts(37_524, 0).saturating_mul(p.into())) + // Standard Error: 1_546 + .saturating_add(Weight::from_parts(47_532, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -165,11 +167,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_791_000 picoseconds. - Weight::from_parts(24_071_989, 0) + // Minimum execution time: 19_827_000 picoseconds. + Weight::from_parts(20_628_253, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_601 - .saturating_add(Weight::from_parts(35_258, 0).saturating_mul(p.into())) + // Standard Error: 1_677 + .saturating_add(Weight::from_parts(50_169, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,11 +182,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 20_467_000 picoseconds. - Weight::from_parts(21_336_086, 0) + // Minimum execution time: 18_244_000 picoseconds. + Weight::from_parts(19_124_506, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_564 - .saturating_add(Weight::from_parts(31_875, 0).saturating_mul(p.into())) + // Standard Error: 1_136 + .saturating_add(Weight::from_parts(36_535, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -195,11 +197,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 24_755_000 picoseconds. - Weight::from_parts(25_651_835, 0) + // Minimum execution time: 20_799_000 picoseconds. + Weight::from_parts(21_544_192, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_492 - .saturating_add(Weight::from_parts(12_778, 0).saturating_mul(p.into())) + // Standard Error: 988 + .saturating_add(Weight::from_parts(7_973, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -210,11 +212,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 21_067_000 picoseconds. - Weight::from_parts(21_997_043, 0) + // Minimum execution time: 19_300_000 picoseconds. + Weight::from_parts(20_186_188, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_245 - .saturating_add(Weight::from_parts(29_695, 0).saturating_mul(p.into())) + // Standard Error: 1_103 + .saturating_add(Weight::from_parts(29_328, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_session.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_session.rs index ba06a2b730..6b84636102 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_session.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_session.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,11 +53,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `270` - // Estimated: `3735` - // Minimum execution time: 16_755_000 picoseconds. - Weight::from_parts(17_199_000, 0) - .saturating_add(Weight::from_parts(0, 3735)) + // Measured: `297` + // Estimated: `3762` + // Minimum execution time: 14_796_000 picoseconds. + Weight::from_parts(15_428_000, 0) + .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -65,11 +67,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `242` - // Estimated: `3707` - // Minimum execution time: 11_980_000 picoseconds. - Weight::from_parts(12_293_000, 0) - .saturating_add(Weight::from_parts(0, 3707)) + // Measured: `279` + // Estimated: `3744` + // Minimum execution time: 10_583_000 picoseconds. + Weight::from_parts(10_892_000, 0) + .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_timestamp.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_timestamp.rs index c14519c55f..604a21414a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_timestamp.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_timestamp.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `86` // Estimated: `1493` - // Minimum execution time: 8_873_000 picoseconds. - Weight::from_parts(9_117_000, 0) + // Minimum execution time: 6_991_000 picoseconds. + Weight::from_parts(7_163_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 3_150_000 picoseconds. - Weight::from_parts(3_315_000, 0) + // Minimum execution time: 2_869_000 picoseconds. + Weight::from_parts(3_122_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_uniques.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_uniques.rs index 216844db02..8dd3cec994 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_uniques.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_uniques.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_uniques` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_uniques -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,10 +53,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `145` + // Measured: `182` // Estimated: `3643` - // Minimum execution time: 27_094_000 picoseconds. - Weight::from_parts(28_132_000, 0) + // Minimum execution time: 25_105_000 picoseconds. + Weight::from_parts(25_804_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +69,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3643` - // Minimum execution time: 12_424_000 picoseconds. - Weight::from_parts(12_905_000, 0) + // Minimum execution time: 11_958_000 picoseconds. + Weight::from_parts(12_528_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -96,15 +98,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `257 + a * (107 ±0) + m * (56 ±0) + n * (76 ±0)` // Estimated: `3643 + a * (2647 ±0) + m * (2662 ±0) + n * (2597 ±0)` - // Minimum execution time: 2_960_907_000 picoseconds. - Weight::from_parts(3_002_086_000, 0) + // Minimum execution time: 2_771_330_000 picoseconds. + Weight::from_parts(2_893_565_000, 0) .saturating_add(Weight::from_parts(0, 3643)) - // Standard Error: 30_465 - .saturating_add(Weight::from_parts(6_427_419, 0).saturating_mul(n.into())) - // Standard Error: 30_465 - .saturating_add(Weight::from_parts(313_583, 0).saturating_mul(m.into())) - // Standard Error: 30_465 - .saturating_add(Weight::from_parts(438_809, 0).saturating_mul(a.into())) + // Standard Error: 39_888 + .saturating_add(Weight::from_parts(7_451_686, 0).saturating_mul(n.into())) + // Standard Error: 39_888 + .saturating_add(Weight::from_parts(518_263, 0).saturating_mul(m.into())) + // Standard Error: 39_888 + .saturating_add(Weight::from_parts(498_092, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) @@ -129,8 +131,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 32_939_000 picoseconds. - Weight::from_parts(33_550_000, 0) + // Minimum execution time: 30_288_000 picoseconds. + Weight::from_parts(31_042_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -147,8 +149,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 33_926_000 picoseconds. - Weight::from_parts(34_908_000, 0) + // Minimum execution time: 32_018_000 picoseconds. + Weight::from_parts(32_761_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -165,8 +167,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 24_812_000 picoseconds. - Weight::from_parts(25_454_000, 0) + // Minimum execution time: 23_783_000 picoseconds. + Weight::from_parts(24_248_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -180,11 +182,11 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `738 + i * (76 ±0)` // Estimated: `3643 + i * (2597 ±0)` - // Minimum execution time: 13_730_000 picoseconds. - Weight::from_parts(13_832_000, 0) + // Minimum execution time: 11_309_000 picoseconds. + Weight::from_parts(11_542_000, 0) .saturating_add(Weight::from_parts(0, 3643)) - // Standard Error: 19_385 - .saturating_add(Weight::from_parts(15_534_793, 0).saturating_mul(i.into())) + // Standard Error: 25_212 + .saturating_add(Weight::from_parts(16_277_842, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -199,8 +201,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 17_951_000 picoseconds. - Weight::from_parts(18_148_000, 0) + // Minimum execution time: 15_103_000 picoseconds. + Weight::from_parts(15_727_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -213,8 +215,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 17_563_000 picoseconds. - Weight::from_parts(18_017_000, 0) + // Minimum execution time: 15_207_000 picoseconds. + Weight::from_parts(15_658_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -225,8 +227,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 13_017_000 picoseconds. - Weight::from_parts(13_292_000, 0) + // Minimum execution time: 10_168_000 picoseconds. + Weight::from_parts(10_607_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -237,8 +239,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 12_846_000 picoseconds. - Weight::from_parts(13_287_000, 0) + // Minimum execution time: 10_088_000 picoseconds. + Weight::from_parts(10_393_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -253,8 +255,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `356` // Estimated: `3643` - // Minimum execution time: 20_396_000 picoseconds. - Weight::from_parts(20_920_000, 0) + // Minimum execution time: 18_692_000 picoseconds. + Weight::from_parts(19_062_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -265,8 +267,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 13_338_000 picoseconds. - Weight::from_parts(13_607_000, 0) + // Minimum execution time: 10_682_000 picoseconds. + Weight::from_parts(10_934_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -279,8 +281,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 15_733_000 picoseconds. - Weight::from_parts(16_400_000, 0) + // Minimum execution time: 13_768_000 picoseconds. + Weight::from_parts(14_075_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -295,8 +297,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `3652` - // Minimum execution time: 36_064_000 picoseconds. - Weight::from_parts(36_671_000, 0) + // Minimum execution time: 33_596_000 picoseconds. + Weight::from_parts(34_350_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -311,8 +313,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `756` // Estimated: `3652` - // Minimum execution time: 34_987_000 picoseconds. - Weight::from_parts(36_204_000, 0) + // Minimum execution time: 32_208_000 picoseconds. + Weight::from_parts(33_352_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -325,8 +327,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `3652` - // Minimum execution time: 27_811_000 picoseconds. - Weight::from_parts(28_228_000, 0) + // Minimum execution time: 24_835_000 picoseconds. + Weight::from_parts(25_425_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -339,8 +341,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `3652` - // Minimum execution time: 28_865_000 picoseconds. - Weight::from_parts(29_503_000, 0) + // Minimum execution time: 25_720_000 picoseconds. + Weight::from_parts(26_615_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -353,8 +355,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 28_594_000 picoseconds. - Weight::from_parts(28_970_000, 0) + // Minimum execution time: 25_713_000 picoseconds. + Weight::from_parts(26_541_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -367,8 +369,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3643` - // Minimum execution time: 27_705_000 picoseconds. - Weight::from_parts(28_414_000, 0) + // Minimum execution time: 24_866_000 picoseconds. + Weight::from_parts(25_324_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -381,8 +383,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 18_054_000 picoseconds. - Weight::from_parts(18_810_000, 0) + // Minimum execution time: 16_151_000 picoseconds. + Weight::from_parts(16_561_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -395,8 +397,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `461` // Estimated: `3643` - // Minimum execution time: 17_832_000 picoseconds. - Weight::from_parts(18_502_000, 0) + // Minimum execution time: 15_810_000 picoseconds. + Weight::from_parts(16_409_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -407,8 +409,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3517` - // Minimum execution time: 14_256_000 picoseconds. - Weight::from_parts(14_855_000, 0) + // Minimum execution time: 11_603_000 picoseconds. + Weight::from_parts(11_947_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -421,8 +423,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 15_573_000 picoseconds. - Weight::from_parts(15_955_000, 0) + // Minimum execution time: 12_806_000 picoseconds. + Weight::from_parts(13_452_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -435,8 +437,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `3587` - // Minimum execution time: 15_326_000 picoseconds. - Weight::from_parts(15_716_000, 0) + // Minimum execution time: 12_660_000 picoseconds. + Weight::from_parts(13_168_000, 0) .saturating_add(Weight::from_parts(0, 3587)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -453,8 +455,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `540` // Estimated: `3643` - // Minimum execution time: 33_128_000 picoseconds. - Weight::from_parts(34_358_000, 0) + // Minimum execution time: 30_980_000 picoseconds. + Weight::from_parts(31_768_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_utility.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_utility.rs index 5433aa24a9..b9ff4af453 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_utility.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_utility.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_260_000 picoseconds. - Weight::from_parts(1_617_714, 0) + // Minimum execution time: 4_413_000 picoseconds. + Weight::from_parts(4_513_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_346 - .saturating_add(Weight::from_parts(5_704_682, 0).saturating_mul(c.into())) + // Standard Error: 2_189 + .saturating_add(Weight::from_parts(4_460_684, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_546_000 picoseconds. - Weight::from_parts(4_783_000, 0) + // Minimum execution time: 4_872_000 picoseconds. + Weight::from_parts(4_985_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -69,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_363_000 picoseconds. - Weight::from_parts(6_338_075, 0) + // Minimum execution time: 4_647_000 picoseconds. + Weight::from_parts(4_644_693, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_339 - .saturating_add(Weight::from_parts(5_951_720, 0).saturating_mul(c.into())) + // Standard Error: 4_280 + .saturating_add(Weight::from_parts(4_753_050, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_494_000 picoseconds. - Weight::from_parts(8_778_000, 0) + // Minimum execution time: 7_118_000 picoseconds. + Weight::from_parts(7_362_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -88,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_197_000 picoseconds. - Weight::from_parts(6_485_000, 0) + // Minimum execution time: 4_497_000 picoseconds. + Weight::from_parts(4_723_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_090 - .saturating_add(Weight::from_parts(5_769_050, 0).saturating_mul(c.into())) + // Standard Error: 1_992 + .saturating_add(Weight::from_parts(4_469_619, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs index 2bed45174b..7d39d91318 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,6 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -59,10 +63,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 29_160_000 picoseconds. - Weight::from_parts(29_893_000, 0) + // Minimum execution time: 24_856_000 picoseconds. + Weight::from_parts(25_639_000, 0) .saturating_add(Weight::from_parts(0, 3610)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -71,8 +75,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1489` - // Minimum execution time: 22_168_000 picoseconds. - Weight::from_parts(23_121_000, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_357_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -82,8 +86,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1489` - // Minimum execution time: 16_624_000 picoseconds. - Weight::from_parts(17_330_000, 0) + // Minimum execution time: 14_600_000 picoseconds. + Weight::from_parts(15_045_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -103,8 +107,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_364_000 picoseconds. - Weight::from_parts(8_719_000, 0) + // Minimum execution time: 6_899_000 picoseconds. + Weight::from_parts(7_127_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +118,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_479_000 picoseconds. - Weight::from_parts(2_654_000, 0) + // Minimum execution time: 2_198_000 picoseconds. + Weight::from_parts(2_440_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,6 +127,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -139,14 +145,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 33_264_000 picoseconds. - Weight::from_parts(33_802_000, 0) + // Minimum execution time: 29_009_000 picoseconds. + Weight::from_parts(30_280_000, 0) .saturating_add(Weight::from_parts(0, 3610)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -163,10 +171,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `363` // Estimated: `3828` - // Minimum execution time: 34_682_000 picoseconds. - Weight::from_parts(35_467_000, 0) + // Minimum execution time: 30_806_000 picoseconds. + Weight::from_parts(31_646_000, 0) .saturating_add(Weight::from_parts(0, 3828)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) @@ -175,8 +183,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_594_000 picoseconds. - Weight::from_parts(2_782_000, 0) + // Minimum execution time: 2_139_000 picoseconds. + Weight::from_parts(2_319_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,8 +194,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `162` // Estimated: `11052` - // Minimum execution time: 16_783_000 picoseconds. - Weight::from_parts(17_309_000, 0) + // Minimum execution time: 16_833_000 picoseconds. + Weight::from_parts(17_423_000, 0) .saturating_add(Weight::from_parts(0, 11052)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -198,8 +206,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `166` // Estimated: `11056` - // Minimum execution time: 16_731_000 picoseconds. - Weight::from_parts(17_167_000, 0) + // Minimum execution time: 17_002_000 picoseconds. + Weight::from_parts(17_667_000, 0) .saturating_add(Weight::from_parts(0, 11056)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -210,13 +218,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `13538` - // Minimum execution time: 18_215_000 picoseconds. - Weight::from_parts(18_635_000, 0) + // Minimum execution time: 18_497_000 picoseconds. + Weight::from_parts(18_995_000, 0) .saturating_add(Weight::from_parts(0, 13538)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -231,10 +241,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6152` - // Minimum execution time: 31_277_000 picoseconds. - Weight::from_parts(31_731_000, 0) + // Minimum execution time: 27_060_000 picoseconds. + Weight::from_parts(27_662_000, 0) .saturating_add(Weight::from_parts(0, 6152)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0) @@ -243,8 +253,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `8621` - // Minimum execution time: 8_916_000 picoseconds. - Weight::from_parts(9_299_000, 0) + // Minimum execution time: 9_157_000 picoseconds. + Weight::from_parts(9_437_000, 0) .saturating_add(Weight::from_parts(0, 8621)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -254,14 +264,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `11063` - // Minimum execution time: 16_990_000 picoseconds. - Weight::from_parts(17_520_000, 0) + // Minimum execution time: 17_430_000 picoseconds. + Weight::from_parts(17_727_000, 0) .saturating_add(Weight::from_parts(0, 11063)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -276,10 +288,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `11105` - // Minimum execution time: 37_700_000 picoseconds. - Weight::from_parts(38_337_000, 0) + // Minimum execution time: 33_562_000 picoseconds. + Weight::from_parts(34_612_000, 0) .saturating_add(Weight::from_parts(0, 11105)) - .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs deleted file mode 100644 index 41d933cac6..0000000000 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs +++ /dev/null @@ -1,194 +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_xcm_benchmarks::fungible` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 - -// Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain -// benchmark -// pallet -// --chain=spec-asset-hub-kusama.json -// --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares - -#![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_xcm_benchmarks::fungible`. -pub struct WeightInfo(PhantomData); -impl pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn withdraw_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `3593` - // Minimum execution time: 23_673_000 picoseconds. - Weight::from_parts(24_210_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `6196` - // Minimum execution time: 46_382_000 picoseconds. - Weight::from_parts(47_031_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn transfer_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `6196` - // Minimum execution time: 69_976_000 picoseconds. - Weight::from_parts(71_137_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(8)) - .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`) - fn reserve_asset_deposited() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_reserve_withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `145` - // Estimated: `3610` - // Minimum execution time: 450_366_000 picoseconds. - Weight::from_parts(468_128_000, 0) - .saturating_add(Weight::from_parts(0, 3610)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - fn receive_teleported_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_443_000 picoseconds. - Weight::from_parts(3_572_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn deposit_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 23_910_000 picoseconds. - Weight::from_parts(24_291_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: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn deposit_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `145` - // Estimated: `3610` - // Minimum execution time: 48_790_000 picoseconds. - Weight::from_parts(50_652_000, 0) - .saturating_add(Weight::from_parts(0, 3610)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_teleport() -> Weight { - // Proof Size summary in bytes: - // Measured: `145` - // Estimated: `3610` - // Minimum execution time: 30_580_000 picoseconds. - Weight::from_parts(31_674_000, 0) - .saturating_add(Weight::from_parts(0, 3610)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 6e663039b0..d8344feeb2 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -1,190 +1,208 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. +// This file is part of Polkadot. -// Cumulus 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. -// Cumulus 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 Cumulus. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=asset-hub-kusama-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::fungible -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --extrinsic=* +// --chain=../asset-hub-kusama-chain-spec.json // --steps=50 // --repeat=20 -// --json +// --pallet=pallet_xcm_benchmarks::fungible +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights // --header=./file_header.txt -// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs #![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::fungible`. +/// Weight functions for `pallet_xcm_benchmarks::fungible`. 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 { + /// 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 { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 26_104_000 picoseconds. - Weight::from_parts(26_722_000, 3593) + // Minimum execution time: 21_483_000 picoseconds. + Weight::from_parts(21_909_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 { + /// 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 { // Proof Size summary in bytes: - // Measured: `101` + // Measured: `153` // Estimated: `6196` - // Minimum execution time: 52_259_000 picoseconds. - Weight::from_parts(53_854_000, 6196) + // Minimum execution time: 44_634_000 picoseconds. + Weight::from_parts(45_271_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: `System::Account` (r:2 w:2) - // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn transfer_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `210` - // Estimated: `6196` - // Minimum execution time: 77_248_000 picoseconds. - Weight::from_parts(80_354_000, 6196) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `298` + // Estimated: `8799` + // Minimum execution time: 87_196_000 picoseconds. + Weight::from_parts(88_847_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: `Benchmark::Override` (r:0 w:0) - // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub fn reserve_asset_deposited() -> Weight { + /// 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 { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_reserve_withdraw() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 482_070_000 picoseconds. - Weight::from_parts(490_269_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `246` + // Estimated: `6196` + // Minimum execution time: 199_789_000 picoseconds. + Weight::from_parts(201_357_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } - pub fn receive_teleported_asset() -> Weight { + pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_970_000 picoseconds. - Weight::from_parts(4_056_000, 0) + // Minimum execution time: 3_282_000 picoseconds. + Weight::from_parts(3_371_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // 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 { + /// 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 { // Proof Size summary in bytes: - // Measured: `0` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 26_324_000 picoseconds. - Weight::from_parts(26_985_000, 3593) + // Minimum execution time: 20_517_000 picoseconds. + Weight::from_parts(20_942_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: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn deposit_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3593` - // Minimum execution time: 52_814_000 picoseconds. - Weight::from_parts(54_666_000, 3593) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `197` + // Estimated: `6196` + // Minimum execution time: 60_207_000 picoseconds. + Weight::from_parts(60_830_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_teleport() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 33_044_000 picoseconds. - Weight::from_parts(33_849_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 45_197_000 picoseconds. + Weight::from_parts(46_750_000, 0) + .saturating_add(Weight::from_parts(0, 3610)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 808546131e..db77d8f6ac 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=cumulus_pallet_xcmp_queue -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_580_000 picoseconds. - Weight::from_parts(4_922_000, 0) + // Minimum execution time: 4_927_000 picoseconds. + Weight::from_parts(5_144_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_815_000 picoseconds. - Weight::from_parts(4_969_000, 0) + // Minimum execution time: 4_977_000 picoseconds. + Weight::from_parts(5_242_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs index 6f61364a74..0f8e05242a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,8 +52,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_753_000 picoseconds. - Weight::from_parts(471_604, 0) + // Minimum execution time: 1_769_000 picoseconds. + Weight::from_parts(1_816_000, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) @@ -61,11 +63,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_056_000 picoseconds. - Weight::from_parts(124_926_511, 0) + // Minimum execution time: 4_963_000 picoseconds. + Weight::from_parts(91_839_738, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_584, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_617, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_425_000 picoseconds. - Weight::from_parts(3_760_000, 0) + // Minimum execution time: 3_116_000 picoseconds. + Weight::from_parts(3_346_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127` // Estimated: `1612` - // Minimum execution time: 96_398_451_000 picoseconds. - Weight::from_parts(99_636_929_000, 0) + // Minimum execution time: 117_129_128_000 picoseconds. + Weight::from_parts(121_546_391_000, 0) .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -110,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_845_000 picoseconds. - Weight::from_parts(1_931_000, 0) + // Minimum execution time: 1_851_000 picoseconds. + Weight::from_parts(1_921_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_169 - .saturating_add(Weight::from_parts(745_846, 0).saturating_mul(i.into())) + // Standard Error: 1_991 + .saturating_add(Weight::from_parts(782_201, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -124,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_903_000 picoseconds. - Weight::from_parts(1_975_000, 0) + // Minimum execution time: 1_907_000 picoseconds. + Weight::from_parts(2_004_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 875 - .saturating_add(Weight::from_parts(546_772, 0).saturating_mul(i.into())) + // Standard Error: 1_174 + .saturating_add(Weight::from_parts(583_431, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,11 +140,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `84 + p * (69 ±0)` // Estimated: `77 + p * (70 ±0)` - // Minimum execution time: 3_542_000 picoseconds. - Weight::from_parts(3_628_000, 0) + // Minimum execution time: 3_580_000 picoseconds. + Weight::from_parts(3_694_000, 0) .saturating_add(Weight::from_parts(0, 77)) - // Standard Error: 1_254 - .saturating_add(Weight::from_parts(1_244_686, 0).saturating_mul(p.into())) + // Standard Error: 1_827 + .saturating_add(Weight::from_parts(1_195_792, 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/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs index 33b0f53530..b985824d6a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_assets -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,10 +55,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `107` + // Measured: `144` // Estimated: `4273` - // Minimum execution time: 28_090_000 picoseconds. - Weight::from_parts(29_009_000, 0) + // Minimum execution time: 25_292_000 picoseconds. + Weight::from_parts(26_182_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +69,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `4273` - // Minimum execution time: 11_603_000 picoseconds. - Weight::from_parts(12_030_000, 0) + // Minimum execution time: 9_974_000 picoseconds. + Weight::from_parts(10_442_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,8 +81,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 14_170_000 picoseconds. - Weight::from_parts(14_726_000, 0) + // Minimum execution time: 11_208_000 picoseconds. + Weight::from_parts(11_539_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -95,13 +97,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + c * (208 ±0)` + // Measured: `84 + c * (208 ±0)` // Estimated: `4273 + c * (3207 ±0)` - // Minimum execution time: 16_972_000 picoseconds. - Weight::from_parts(17_221_000, 0) + // Minimum execution time: 15_213_000 picoseconds. + Weight::from_parts(15_515_000, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 5_493 - .saturating_add(Weight::from_parts(14_322_220, 0).saturating_mul(c.into())) + // Standard Error: 9_715 + .saturating_add(Weight::from_parts(13_388_629, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -118,11 +120,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `413 + a * (86 ±0)` // Estimated: `4273 + a * (3221 ±0)` - // Minimum execution time: 17_653_000 picoseconds. - Weight::from_parts(18_080_000, 0) + // Minimum execution time: 15_401_000 picoseconds. + Weight::from_parts(15_766_000, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 3_870 - .saturating_add(Weight::from_parts(14_459_100, 0).saturating_mul(a.into())) + // Standard Error: 5_326 + .saturating_add(Weight::from_parts(13_694_221, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -137,8 +139,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 14_682_000 picoseconds. - Weight::from_parts(14_985_000, 0) + // Minimum execution time: 12_957_000 picoseconds. + Weight::from_parts(13_439_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -151,8 +153,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 25_872_000 picoseconds. - Weight::from_parts(26_409_000, 0) + // Minimum execution time: 22_107_000 picoseconds. + Weight::from_parts(22_473_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -165,8 +167,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 33_488_000 picoseconds. - Weight::from_parts(34_106_000, 0) + // Minimum execution time: 28_507_000 picoseconds. + Weight::from_parts(29_464_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -179,10 +181,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `350` + // Measured: `389` // Estimated: `7404` - // Minimum execution time: 45_187_000 picoseconds. - Weight::from_parts(46_037_000, 0) + // Minimum execution time: 39_917_000 picoseconds. + Weight::from_parts(40_835_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -195,10 +197,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `350` + // Measured: `389` // Estimated: `7404` - // Minimum execution time: 39_515_000 picoseconds. - Weight::from_parts(40_326_000, 0) + // Minimum execution time: 35_683_000 picoseconds. + Weight::from_parts(36_564_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -211,10 +213,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `350` + // Measured: `389` // Estimated: `7404` - // Minimum execution time: 44_926_000 picoseconds. - Weight::from_parts(45_853_000, 0) + // Minimum execution time: 40_264_000 picoseconds. + Weight::from_parts(41_054_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -227,8 +229,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 17_895_000 picoseconds. - Weight::from_parts(18_520_000, 0) + // Minimum execution time: 15_315_000 picoseconds. + Weight::from_parts(15_829_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -241,8 +243,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 17_827_000 picoseconds. - Weight::from_parts(18_243_000, 0) + // Minimum execution time: 15_083_000 picoseconds. + Weight::from_parts(15_697_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -253,8 +255,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 13_903_000 picoseconds. - Weight::from_parts(14_294_000, 0) + // Minimum execution time: 11_045_000 picoseconds. + Weight::from_parts(11_511_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -265,8 +267,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 13_409_000 picoseconds. - Weight::from_parts(13_896_000, 0) + // Minimum execution time: 10_952_000 picoseconds. + Weight::from_parts(11_484_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -279,8 +281,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 14_840_000 picoseconds. - Weight::from_parts(15_216_000, 0) + // Minimum execution time: 13_559_000 picoseconds. + Weight::from_parts(13_945_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -291,8 +293,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 13_315_000 picoseconds. - Weight::from_parts(13_774_000, 0) + // Minimum execution time: 11_947_000 picoseconds. + Weight::from_parts(12_507_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -305,17 +307,15 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, s: u32, ) -> Weight { + fn set_metadata(_n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 27_956_000 picoseconds. - Weight::from_parts(28_848_957, 0) + // Minimum execution time: 24_078_000 picoseconds. + Weight::from_parts(25_091_345, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 405 - .saturating_add(Weight::from_parts(2_134, 0).saturating_mul(n.into())) - // Standard Error: 405 - .saturating_add(Weight::from_parts(2_635, 0).saturating_mul(s.into())) + // Standard Error: 384 + .saturating_add(Weight::from_parts(775, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -327,8 +327,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `4273` - // Minimum execution time: 28_915_000 picoseconds. - Weight::from_parts(29_566_000, 0) + // Minimum execution time: 24_832_000 picoseconds. + Weight::from_parts(25_603_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -345,13 +345,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `81` // Estimated: `4273` - // Minimum execution time: 12_730_000 picoseconds. - Weight::from_parts(13_296_822, 0) + // Minimum execution time: 11_719_000 picoseconds. + Weight::from_parts(12_408_239, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 216 - .saturating_add(Weight::from_parts(2_059, 0).saturating_mul(n.into())) - // Standard Error: 216 - .saturating_add(Weight::from_parts(1_566, 0).saturating_mul(s.into())) + // Standard Error: 226 + .saturating_add(Weight::from_parts(598, 0).saturating_mul(n.into())) + // Standard Error: 226 + .saturating_add(Weight::from_parts(1_155, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -363,8 +363,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `4273` - // Minimum execution time: 28_139_000 picoseconds. - Weight::from_parts(29_007_000, 0) + // Minimum execution time: 24_507_000 picoseconds. + Weight::from_parts(25_007_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -375,8 +375,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 12_761_000 picoseconds. - Weight::from_parts(13_260_000, 0) + // Minimum execution time: 11_105_000 picoseconds. + Weight::from_parts(11_442_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -389,8 +389,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 31_499_000 picoseconds. - Weight::from_parts(32_235_000, 0) + // Minimum execution time: 27_579_000 picoseconds. + Weight::from_parts(28_210_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -405,10 +405,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `520` + // Measured: `559` // Estimated: `7404` - // Minimum execution time: 63_764_000 picoseconds. - Weight::from_parts(64_921_000, 0) + // Minimum execution time: 58_788_000 picoseconds. + Weight::from_parts(59_949_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -421,8 +421,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `4273` - // Minimum execution time: 32_860_000 picoseconds. - Weight::from_parts(34_081_000, 0) + // Minimum execution time: 30_081_000 picoseconds. + Weight::from_parts(30_819_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -435,8 +435,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `4273` - // Minimum execution time: 33_807_000 picoseconds. - Weight::from_parts(34_674_000, 0) + // Minimum execution time: 30_593_000 picoseconds. + Weight::from_parts(31_313_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -447,8 +447,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 14_594_000 picoseconds. - Weight::from_parts(15_139_000, 0) + // Minimum execution time: 11_972_000 picoseconds. + Weight::from_parts(12_440_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -463,8 +463,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `345` // Estimated: `4273` - // Minimum execution time: 32_833_000 picoseconds. - Weight::from_parts(33_776_000, 0) + // Minimum execution time: 29_713_000 picoseconds. + Weight::from_parts(30_579_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -477,8 +477,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 31_385_000 picoseconds. - Weight::from_parts(32_354_000, 0) + // Minimum execution time: 27_196_000 picoseconds. + Weight::from_parts(27_831_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -493,8 +493,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `471` // Estimated: `4273` - // Minimum execution time: 30_206_000 picoseconds. - Weight::from_parts(31_275_000, 0) + // Minimum execution time: 28_577_000 picoseconds. + Weight::from_parts(29_244_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -507,8 +507,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `4273` - // Minimum execution time: 28_538_000 picoseconds. - Weight::from_parts(29_568_000, 0) + // Minimum execution time: 25_918_000 picoseconds. + Weight::from_parts(26_790_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -521,8 +521,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 17_567_000 picoseconds. - Weight::from_parts(18_202_000, 0) + // Minimum execution time: 15_073_000 picoseconds. + Weight::from_parts(15_625_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs index 1b756b005f..77074502b9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_assets -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,10 +53,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `146` // Estimated: `3675` - // Minimum execution time: 24_842_000 picoseconds. - Weight::from_parts(25_695_000, 0) + // Minimum execution time: 22_482_000 picoseconds. + Weight::from_parts(23_313_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -65,8 +67,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3675` - // Minimum execution time: 10_003_000 picoseconds. - Weight::from_parts(10_404_000, 0) + // Minimum execution time: 8_327_000 picoseconds. + Weight::from_parts(8_731_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +79,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 12_844_000 picoseconds. - Weight::from_parts(13_279_000, 0) + // Minimum execution time: 9_845_000 picoseconds. + Weight::from_parts(10_158_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -93,13 +95,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + c * (208 ±0)` + // Measured: `85 + c * (208 ±0)` // Estimated: `3675 + c * (2609 ±0)` - // Minimum execution time: 15_247_000 picoseconds. - Weight::from_parts(15_526_000, 0) + // Minimum execution time: 13_465_000 picoseconds. + Weight::from_parts(13_923_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 5_131 - .saturating_add(Weight::from_parts(14_214_542, 0).saturating_mul(c.into())) + // Standard Error: 9_481 + .saturating_add(Weight::from_parts(13_207_367, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -116,11 +118,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `414 + a * (86 ±0)` // Estimated: `3675 + a * (2623 ±0)` - // Minimum execution time: 16_005_000 picoseconds. - Weight::from_parts(16_340_000, 0) + // Minimum execution time: 13_756_000 picoseconds. + Weight::from_parts(14_045_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 3_036 - .saturating_add(Weight::from_parts(14_331_483, 0).saturating_mul(a.into())) + // Standard Error: 5_020 + .saturating_add(Weight::from_parts(13_656_878, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -135,8 +137,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 12_964_000 picoseconds. - Weight::from_parts(13_512_000, 0) + // Minimum execution time: 11_226_000 picoseconds. + Weight::from_parts(11_812_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -149,8 +151,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 23_385_000 picoseconds. - Weight::from_parts(24_068_000, 0) + // Minimum execution time: 19_930_000 picoseconds. + Weight::from_parts(20_735_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -163,8 +165,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 30_037_000 picoseconds. - Weight::from_parts(30_733_000, 0) + // Minimum execution time: 26_134_000 picoseconds. + Weight::from_parts(27_041_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -177,10 +179,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `351` + // Measured: `390` // Estimated: `6208` - // Minimum execution time: 41_079_000 picoseconds. - Weight::from_parts(42_253_000, 0) + // Minimum execution time: 37_000_000 picoseconds. + Weight::from_parts(38_055_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -193,10 +195,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `351` + // Measured: `390` // Estimated: `6208` - // Minimum execution time: 35_808_000 picoseconds. - Weight::from_parts(37_283_000, 0) + // Minimum execution time: 32_766_000 picoseconds. + Weight::from_parts(33_678_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -209,10 +211,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `351` + // Measured: `390` // Estimated: `6208` - // Minimum execution time: 41_022_000 picoseconds. - Weight::from_parts(41_948_000, 0) + // Minimum execution time: 36_893_000 picoseconds. + Weight::from_parts(37_848_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -225,8 +227,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 16_107_000 picoseconds. - Weight::from_parts(16_636_000, 0) + // Minimum execution time: 13_761_000 picoseconds. + Weight::from_parts(14_150_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -239,8 +241,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 16_042_000 picoseconds. - Weight::from_parts(16_489_000, 0) + // Minimum execution time: 13_513_000 picoseconds. + Weight::from_parts(14_094_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -251,8 +253,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 12_534_000 picoseconds. - Weight::from_parts(12_956_000, 0) + // Minimum execution time: 9_505_000 picoseconds. + Weight::from_parts(9_919_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -263,8 +265,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 12_185_000 picoseconds. - Weight::from_parts(12_702_000, 0) + // Minimum execution time: 9_267_000 picoseconds. + Weight::from_parts(9_796_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -277,8 +279,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 13_431_000 picoseconds. - Weight::from_parts(13_777_000, 0) + // Minimum execution time: 11_976_000 picoseconds. + Weight::from_parts(12_308_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -289,8 +291,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 12_121_000 picoseconds. - Weight::from_parts(12_509_000, 0) + // Minimum execution time: 10_467_000 picoseconds. + Weight::from_parts(10_864_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -303,17 +305,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, s: u32, ) -> Weight { + fn set_metadata(_n: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 26_025_000 picoseconds. - Weight::from_parts(27_133_377, 0) + // Minimum execution time: 22_438_000 picoseconds. + Weight::from_parts(23_625_109, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 473 - .saturating_add(Weight::from_parts(2_007, 0).saturating_mul(n.into())) - // Standard Error: 473 - .saturating_add(Weight::from_parts(2_634, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -325,8 +323,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `407` // Estimated: `3675` - // Minimum execution time: 27_063_000 picoseconds. - Weight::from_parts(27_665_000, 0) + // Minimum execution time: 23_115_000 picoseconds. + Weight::from_parts(23_793_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -339,15 +337,15 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `82` // Estimated: `3675` - // Minimum execution time: 11_459_000 picoseconds. - Weight::from_parts(12_123_059, 0) + // Minimum execution time: 10_621_000 picoseconds. + Weight::from_parts(11_514_960, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 244 - .saturating_add(Weight::from_parts(695, 0).saturating_mul(n.into())) + // Standard Error: 293 + .saturating_add(Weight::from_parts(807, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -359,8 +357,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `407` // Estimated: `3675` - // Minimum execution time: 26_473_000 picoseconds. - Weight::from_parts(27_529_000, 0) + // Minimum execution time: 22_780_000 picoseconds. + Weight::from_parts(23_471_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -371,8 +369,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 11_645_000 picoseconds. - Weight::from_parts(12_036_000, 0) + // Minimum execution time: 9_785_000 picoseconds. + Weight::from_parts(10_375_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -385,8 +383,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 29_410_000 picoseconds. - Weight::from_parts(30_301_000, 0) + // Minimum execution time: 26_117_000 picoseconds. + Weight::from_parts(26_718_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -401,10 +399,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `521` + // Measured: `560` // Estimated: `6208` - // Minimum execution time: 58_623_000 picoseconds. - Weight::from_parts(60_208_000, 0) + // Minimum execution time: 55_263_000 picoseconds. + Weight::from_parts(56_362_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -417,8 +415,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3675` - // Minimum execution time: 31_230_000 picoseconds. - Weight::from_parts(32_402_000, 0) + // Minimum execution time: 27_924_000 picoseconds. + Weight::from_parts(29_013_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -431,8 +429,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3675` - // Minimum execution time: 31_906_000 picoseconds. - Weight::from_parts(32_676_000, 0) + // Minimum execution time: 28_837_000 picoseconds. + Weight::from_parts(29_368_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -443,8 +441,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 12_456_000 picoseconds. - Weight::from_parts(13_014_000, 0) + // Minimum execution time: 11_013_000 picoseconds. + Weight::from_parts(11_494_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -459,8 +457,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3675` - // Minimum execution time: 30_503_000 picoseconds. - Weight::from_parts(31_409_000, 0) + // Minimum execution time: 28_008_000 picoseconds. + Weight::from_parts(28_889_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -473,8 +471,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 29_162_000 picoseconds. - Weight::from_parts(30_197_000, 0) + // Minimum execution time: 25_399_000 picoseconds. + Weight::from_parts(26_037_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -489,8 +487,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `472` // Estimated: `3675` - // Minimum execution time: 28_980_000 picoseconds. - Weight::from_parts(29_774_000, 0) + // Minimum execution time: 27_637_000 picoseconds. + Weight::from_parts(28_214_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -503,8 +501,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `402` // Estimated: `3675` - // Minimum execution time: 27_177_000 picoseconds. - Weight::from_parts(28_690_000, 0) + // Minimum execution time: 24_819_000 picoseconds. + Weight::from_parts(25_449_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -517,8 +515,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 16_042_000 picoseconds. - Weight::from_parts(16_654_000, 0) + // Minimum execution time: 13_415_000 picoseconds. + Weight::from_parts(13_922_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs index f9681bfd64..c9d931eec3 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 49_149_000 picoseconds. - Weight::from_parts(50_327_000, 0) + // Minimum execution time: 42_921_000 picoseconds. + Weight::from_parts(43_610_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_698_000 picoseconds. - Weight::from_parts(37_352_000, 0) + // Minimum execution time: 33_529_000 picoseconds. + Weight::from_parts(34_403_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,10 +75,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_430_000 picoseconds. - Weight::from_parts(13_943_000, 0) + // Minimum execution time: 13_729_000 picoseconds. + Weight::from_parts(14_190_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -85,10 +87,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 20_313_000 picoseconds. - Weight::from_parts(20_690_000, 0) + // Minimum execution time: 18_335_000 picoseconds. + Weight::from_parts(19_048_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 51_329_000 picoseconds. - Weight::from_parts(52_624_000, 0) + // Minimum execution time: 45_669_000 picoseconds. + Weight::from_parts(46_310_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 45_697_000 picoseconds. - Weight::from_parts(46_694_000, 0) + // Minimum execution time: 42_296_000 picoseconds. + Weight::from_parts(42_746_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -121,10 +123,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 15_753_000 picoseconds. - Weight::from_parts(16_267_000, 0) + // Minimum execution time: 16_103_000 picoseconds. + Weight::from_parts(16_509_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 15_399_000 picoseconds. - Weight::from_parts(15_974_000, 0) + // Minimum execution time: 15_459_000 picoseconds. + Weight::from_parts(15_812_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 12_381 - .saturating_add(Weight::from_parts(13_931_760, 0).saturating_mul(u.into())) + // Standard Error: 15_725 + .saturating_add(Weight::from_parts(13_371_334, 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/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs index 5872a43ee1..05c0b6d805 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_collator_selection -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,13 +54,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `b` is `[1, 20]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `163 + b * (79 ±0)` - // Estimated: `1154 + b * (2555 ±0)` - // Minimum execution time: 14_249_000 picoseconds. - Weight::from_parts(11_694_405, 0) - .saturating_add(Weight::from_parts(0, 1154)) - // Standard Error: 6_363 - .saturating_add(Weight::from_parts(3_087_200, 0).saturating_mul(b.into())) + // Measured: `196 + b * (79 ±0)` + // Estimated: `1187 + b * (2555 ±0)` + // Minimum execution time: 11_713_000 picoseconds. + Weight::from_parts(8_950_383, 0) + .saturating_add(Weight::from_parts(0, 1187)) + // Standard Error: 6_039 + .saturating_add(Weight::from_parts(3_234_270, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -75,15 +77,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn add_invulnerable(b: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `756 + b * (32 ±0) + c * (53 ±0)` + // Measured: `794 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 46_578_000 picoseconds. - Weight::from_parts(46_080_087, 0) + // Minimum execution time: 40_175_000 picoseconds. + Weight::from_parts(40_293_579, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_237 - .saturating_add(Weight::from_parts(142_616, 0).saturating_mul(b.into())) - // Standard Error: 1_751 - .saturating_add(Weight::from_parts(133_208, 0).saturating_mul(c.into())) + // Standard Error: 17_407 + .saturating_add(Weight::from_parts(56_340, 0).saturating_mul(b.into())) + // Standard Error: 3_299 + .saturating_add(Weight::from_parts(194_751, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -98,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 15_344_000 picoseconds. - Weight::from_parts(15_449_974, 0) + // Minimum execution time: 11_703_000 picoseconds. + Weight::from_parts(11_596_965, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_474 - .saturating_add(Weight::from_parts(143_234, 0).saturating_mul(b.into())) + // Standard Error: 3_159 + .saturating_add(Weight::from_parts(145_531, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_998_000 picoseconds. - Weight::from_parts(7_227_000, 0) + // Minimum execution time: 4_662_000 picoseconds. + Weight::from_parts(4_943_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,8 +125,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_981_000 picoseconds. - Weight::from_parts(7_279_000, 0) + // Minimum execution time: 4_650_000 picoseconds. + Weight::from_parts(4_905_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,13 +145,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `736 + c * (52 ±0)` + // Measured: `777 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 39_448_000 picoseconds. - Weight::from_parts(44_351_666, 0) + // Minimum execution time: 36_181_000 picoseconds. + Weight::from_parts(39_888_810, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_739 - .saturating_add(Weight::from_parts(156_930, 0).saturating_mul(c.into())) + // Standard Error: 2_504 + .saturating_add(Weight::from_parts(178_010, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -160,16 +162,16 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) - /// The range of component `c` is `[4, 100]`. + /// The range of component `c` is `[3, 100]`. fn leave_intent(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `306 + c * (50 ±0)` + // Measured: `371 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 32_936_000 picoseconds. - Weight::from_parts(35_728_381, 0) + // Minimum execution time: 27_978_000 picoseconds. + Weight::from_parts(30_173_445, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_066 - .saturating_add(Weight::from_parts(132_623, 0).saturating_mul(c.into())) + // Standard Error: 2_030 + .saturating_add(Weight::from_parts(173_307, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -181,10 +183,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn note_author() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `155` // Estimated: `6196` - // Minimum execution time: 41_700_000 picoseconds. - Weight::from_parts(43_058_000, 0) + // Minimum execution time: 40_091_000 picoseconds. + Weight::from_parts(40_999_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -203,13 +205,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 100]`. fn new_session(r: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2243 + c * (97 ±0) + r * (112 ±0)` + // Measured: `2300 + c * (97 ±0) + r * (115 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 16_719_000 picoseconds. - Weight::from_parts(16_975_000, 0) + // Minimum execution time: 15_900_000 picoseconds. + Weight::from_parts(16_335_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 333_327 - .saturating_add(Weight::from_parts(14_469_791, 0).saturating_mul(c.into())) + // Standard Error: 292_749 + .saturating_add(Weight::from_parts(12_745_019, 0).saturating_mul(c.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().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multisig.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multisig.rs index b9c9cd186d..c99fd44260 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multisig.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multisig.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_898_000 picoseconds. - Weight::from_parts(13_554_564, 0) + // Minimum execution time: 13_320_000 picoseconds. + Weight::from_parts(14_175_675, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 6 - .saturating_add(Weight::from_parts(532, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(480, 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`) @@ -62,15 +64,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `262 + s * (2 ±0)` + // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 42_057_000 picoseconds. - Weight::from_parts(30_570_872, 0) + // Minimum execution time: 39_363_000 picoseconds. + Weight::from_parts(28_328_575, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 877 - .saturating_add(Weight::from_parts(126_452, 0).saturating_mul(s.into())) + // Standard Error: 845 + .saturating_add(Weight::from_parts(124_782, 0).saturating_mul(s.into())) // Standard Error: 8 - .saturating_add(Weight::from_parts(1_509, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_459, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 28_094_000 picoseconds. - Weight::from_parts(18_561_209, 0) + // Minimum execution time: 26_965_000 picoseconds. + Weight::from_parts(17_343_319, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 556 - .saturating_add(Weight::from_parts(104_177, 0).saturating_mul(s.into())) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_464, 0).saturating_mul(z.into())) + // Standard Error: 662 + .saturating_add(Weight::from_parts(108_683, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_468, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,15 +102,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `385 + s * (33 ±0)` + // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 47_928_000 picoseconds. - Weight::from_parts(35_254_731, 0) + // Minimum execution time: 45_907_000 picoseconds. + Weight::from_parts(32_502_836, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 727 - .saturating_add(Weight::from_parts(143_278, 0).saturating_mul(s.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_469, 0).saturating_mul(z.into())) + // Standard Error: 1_171 + .saturating_add(Weight::from_parts(157_049, 0).saturating_mul(s.into())) + // Standard Error: 11 + .saturating_add(Weight::from_parts(1_520, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 28_999_000 picoseconds. - Weight::from_parts(29_953_345, 0) + // Minimum execution time: 26_301_000 picoseconds. + Weight::from_parts(27_404_307, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 873 - .saturating_add(Weight::from_parts(117_779, 0).saturating_mul(s.into())) + // Standard Error: 890 + .saturating_add(Weight::from_parts(118_603, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 16_756_000 picoseconds. - Weight::from_parts(17_189_215, 0) + // Minimum execution time: 15_649_000 picoseconds. + Weight::from_parts(15_878_739, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 559 - .saturating_add(Weight::from_parts(101_918, 0).saturating_mul(s.into())) + // Standard Error: 598 + .saturating_add(Weight::from_parts(108_991, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 29_810_000 picoseconds. - Weight::from_parts(30_929_904, 0) + // Minimum execution time: 27_967_000 picoseconds. + Weight::from_parts(28_550_404, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 567 - .saturating_add(Weight::from_parts(112_221, 0).saturating_mul(s.into())) + // Standard Error: 1_095 + .saturating_add(Weight::from_parts(120_016, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_nfts.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_nfts.rs index 43774478c7..3c5b3a5adc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_nfts.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_nfts.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_nfts` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_nfts -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,10 +59,10 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `145` + // Measured: `182` // Estimated: `3549` - // Minimum execution time: 35_224_000 picoseconds. - Weight::from_parts(36_113_000, 0) + // Minimum execution time: 31_320_000 picoseconds. + Weight::from_parts(31_856_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) @@ -79,8 +81,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3549` - // Minimum execution time: 21_129_000 picoseconds. - Weight::from_parts(21_623_000, 0) + // Minimum execution time: 18_622_000 picoseconds. + Weight::from_parts(19_053_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) @@ -104,17 +106,19 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `c` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. - fn destroy(m: u32, _c: u32, a: u32, ) -> Weight { + fn destroy(m: u32, c: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `32170 + a * (366 ±0)` // Estimated: `2523990 + a * (2954 ±0)` - // Minimum execution time: 1_203_704_000 picoseconds. - Weight::from_parts(1_085_608_344, 0) + // Minimum execution time: 1_165_079_000 picoseconds. + Weight::from_parts(1_111_416_752, 0) .saturating_add(Weight::from_parts(0, 2523990)) - // Standard Error: 5_182 - .saturating_add(Weight::from_parts(41_422, 0).saturating_mul(m.into())) - // Standard Error: 5_182 - .saturating_add(Weight::from_parts(6_403_886, 0).saturating_mul(a.into())) + // Standard Error: 14_690 + .saturating_add(Weight::from_parts(14_334, 0).saturating_mul(m.into())) + // Standard Error: 14_690 + .saturating_add(Weight::from_parts(11_091, 0).saturating_mul(c.into())) + // Standard Error: 14_690 + .saturating_add(Weight::from_parts(6_689_788, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1004)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1005)) @@ -137,8 +141,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `421` // Estimated: `4326` - // Minimum execution time: 46_061_000 picoseconds. - Weight::from_parts(47_084_000, 0) + // Minimum execution time: 43_992_000 picoseconds. + Weight::from_parts(45_010_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -159,8 +163,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `421` // Estimated: `4326` - // Minimum execution time: 44_686_000 picoseconds. - Weight::from_parts(45_281_000, 0) + // Minimum execution time: 42_472_000 picoseconds. + Weight::from_parts(43_158_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -187,8 +191,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `530` // Estimated: `4326` - // Minimum execution time: 50_570_000 picoseconds. - Weight::from_parts(51_507_000, 0) + // Minimum execution time: 47_787_000 picoseconds. + Weight::from_parts(49_020_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(7)) @@ -213,8 +217,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `4326` - // Minimum execution time: 38_352_000 picoseconds. - Weight::from_parts(39_306_000, 0) + // Minimum execution time: 37_198_000 picoseconds. + Weight::from_parts(37_718_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -230,11 +234,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `729 + i * (108 ±0)` // Estimated: `3549 + i * (3336 ±0)` - // Minimum execution time: 15_630_000 picoseconds. - Weight::from_parts(15_800_000, 0) + // Minimum execution time: 12_777_000 picoseconds. + Weight::from_parts(12_935_000, 0) .saturating_add(Weight::from_parts(0, 3549)) - // Standard Error: 19_466 - .saturating_add(Weight::from_parts(15_612_233, 0).saturating_mul(i.into())) + // Standard Error: 21_129 + .saturating_add(Weight::from_parts(15_766_785, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) @@ -248,8 +252,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `3534` - // Minimum execution time: 19_327_000 picoseconds. - Weight::from_parts(19_826_000, 0) + // Minimum execution time: 16_704_000 picoseconds. + Weight::from_parts(17_156_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -262,8 +266,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `3534` - // Minimum execution time: 19_179_000 picoseconds. - Weight::from_parts(19_565_000, 0) + // Minimum execution time: 16_520_000 picoseconds. + Weight::from_parts(17_097_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -276,8 +280,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `306` // Estimated: `3549` - // Minimum execution time: 16_158_000 picoseconds. - Weight::from_parts(16_780_000, 0) + // Minimum execution time: 13_423_000 picoseconds. + Weight::from_parts(13_912_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -292,8 +296,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `354` // Estimated: `3549` - // Minimum execution time: 21_184_000 picoseconds. - Weight::from_parts(21_914_000, 0) + // Minimum execution time: 19_049_000 picoseconds. + Weight::from_parts(20_088_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -306,8 +310,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `335` // Estimated: `6078` - // Minimum execution time: 37_066_000 picoseconds. - Weight::from_parts(37_970_000, 0) + // Minimum execution time: 35_528_000 picoseconds. + Weight::from_parts(36_762_000, 0) .saturating_add(Weight::from_parts(0, 6078)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -320,8 +324,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3549` - // Minimum execution time: 16_584_000 picoseconds. - Weight::from_parts(17_127_000, 0) + // Minimum execution time: 14_158_000 picoseconds. + Weight::from_parts(14_618_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -334,8 +338,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `3549` - // Minimum execution time: 13_710_000 picoseconds. - Weight::from_parts(13_928_000, 0) + // Minimum execution time: 10_844_000 picoseconds. + Weight::from_parts(11_216_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -348,8 +352,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `3534` - // Minimum execution time: 18_571_000 picoseconds. - Weight::from_parts(18_936_000, 0) + // Minimum execution time: 15_988_000 picoseconds. + Weight::from_parts(16_546_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -368,8 +372,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3944` - // Minimum execution time: 46_676_000 picoseconds. - Weight::from_parts(47_866_000, 0) + // Minimum execution time: 43_812_000 picoseconds. + Weight::from_parts(45_113_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -382,8 +386,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `310` // Estimated: `3944` - // Minimum execution time: 24_112_000 picoseconds. - Weight::from_parts(24_687_000, 0) + // Minimum execution time: 22_306_000 picoseconds. + Weight::from_parts(22_965_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -400,8 +404,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `949` // Estimated: `3944` - // Minimum execution time: 42_792_000 picoseconds. - Weight::from_parts(43_471_000, 0) + // Minimum execution time: 40_153_000 picoseconds. + Weight::from_parts(40_730_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -414,8 +418,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `4466` - // Minimum execution time: 16_827_000 picoseconds. - Weight::from_parts(17_307_000, 0) + // Minimum execution time: 13_836_000 picoseconds. + Weight::from_parts(14_592_000, 0) .saturating_add(Weight::from_parts(0, 4466)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -431,13 +435,13 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 1000]`. fn cancel_item_attributes_approval(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `726 + n * (398 ±0)` + // Measured: `797 + n * (398 ±0)` // Estimated: `4466 + n * (2954 ±0)` - // Minimum execution time: 24_739_000 picoseconds. - Weight::from_parts(25_181_000, 0) + // Minimum execution time: 22_459_000 picoseconds. + Weight::from_parts(22_719_000, 0) .saturating_add(Weight::from_parts(0, 4466)) - // Standard Error: 3_647 - .saturating_add(Weight::from_parts(6_230_914, 0).saturating_mul(n.into())) + // Standard Error: 6_365 + .saturating_add(Weight::from_parts(6_451_268, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -458,8 +462,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3812` - // Minimum execution time: 39_134_000 picoseconds. - Weight::from_parts(39_727_000, 0) + // Minimum execution time: 35_506_000 picoseconds. + Weight::from_parts(36_177_000, 0) .saturating_add(Weight::from_parts(0, 3812)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -476,8 +480,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `815` // Estimated: `3812` - // Minimum execution time: 36_917_000 picoseconds. - Weight::from_parts(37_804_000, 0) + // Minimum execution time: 33_403_000 picoseconds. + Weight::from_parts(34_367_000, 0) .saturating_add(Weight::from_parts(0, 3812)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -494,8 +498,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `364` // Estimated: `3759` - // Minimum execution time: 35_389_000 picoseconds. - Weight::from_parts(36_240_000, 0) + // Minimum execution time: 31_650_000 picoseconds. + Weight::from_parts(32_590_000, 0) .saturating_add(Weight::from_parts(0, 3759)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -512,8 +516,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `682` // Estimated: `3759` - // Minimum execution time: 34_508_000 picoseconds. - Weight::from_parts(35_397_000, 0) + // Minimum execution time: 30_920_000 picoseconds. + Weight::from_parts(31_429_000, 0) .saturating_add(Weight::from_parts(0, 3759)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -526,8 +530,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `376` // Estimated: `4326` - // Minimum execution time: 19_698_000 picoseconds. - Weight::from_parts(20_224_000, 0) + // Minimum execution time: 16_527_000 picoseconds. + Weight::from_parts(17_085_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -538,8 +542,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4326` - // Minimum execution time: 17_426_000 picoseconds. - Weight::from_parts(17_851_000, 0) + // Minimum execution time: 14_322_000 picoseconds. + Weight::from_parts(14_807_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -550,8 +554,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4326` - // Minimum execution time: 16_300_000 picoseconds. - Weight::from_parts(16_648_000, 0) + // Minimum execution time: 13_499_000 picoseconds. + Weight::from_parts(13_902_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -562,8 +566,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3517` - // Minimum execution time: 14_396_000 picoseconds. - Weight::from_parts(14_794_000, 0) + // Minimum execution time: 11_357_000 picoseconds. + Weight::from_parts(11_670_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -576,8 +580,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `306` // Estimated: `3549` - // Minimum execution time: 17_839_000 picoseconds. - Weight::from_parts(18_489_000, 0) + // Minimum execution time: 15_001_000 picoseconds. + Weight::from_parts(15_417_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -590,8 +594,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `289` // Estimated: `3538` - // Minimum execution time: 17_707_000 picoseconds. - Weight::from_parts(18_105_000, 0) + // Minimum execution time: 14_799_000 picoseconds. + Weight::from_parts(15_289_000, 0) .saturating_add(Weight::from_parts(0, 3538)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -608,8 +612,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `484` // Estimated: `4326` - // Minimum execution time: 22_377_000 picoseconds. - Weight::from_parts(23_063_000, 0) + // Minimum execution time: 19_513_000 picoseconds. + Weight::from_parts(20_017_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -634,8 +638,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `671` // Estimated: `4326` - // Minimum execution time: 47_013_000 picoseconds. - Weight::from_parts(48_307_000, 0) + // Minimum execution time: 44_189_000 picoseconds. + Weight::from_parts(45_196_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -645,11 +649,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_905_000 picoseconds. - Weight::from_parts(3_210_712, 0) + // Minimum execution time: 1_828_000 picoseconds. + Weight::from_parts(2_748_364, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7_316 - .saturating_add(Weight::from_parts(3_475_998, 0).saturating_mul(n.into())) + // Standard Error: 5_128 + .saturating_add(Weight::from_parts(1_989_075, 0).saturating_mul(n.into())) } /// Storage: `Nfts::Item` (r:2 w:0) /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) @@ -659,8 +663,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `460` // Estimated: `7662` - // Minimum execution time: 20_037_000 picoseconds. - Weight::from_parts(20_841_000, 0) + // Minimum execution time: 16_840_000 picoseconds. + Weight::from_parts(17_235_000, 0) .saturating_add(Weight::from_parts(0, 7662)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -673,8 +677,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `479` // Estimated: `4326` - // Minimum execution time: 19_108_000 picoseconds. - Weight::from_parts(19_762_000, 0) + // Minimum execution time: 17_351_000 picoseconds. + Weight::from_parts(17_579_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -699,8 +703,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `800` // Estimated: `7662` - // Minimum execution time: 78_960_000 picoseconds. - Weight::from_parts(81_140_000, 0) + // Minimum execution time: 75_332_000 picoseconds. + Weight::from_parts(77_393_000, 0) .saturating_add(Weight::from_parts(0, 7662)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(10)) @@ -726,13 +730,13 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 10]`. fn mint_pre_signed(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `524` + // Measured: `595` // Estimated: `6078 + n * (2954 ±0)` - // Minimum execution time: 136_580_000 picoseconds. - Weight::from_parts(142_994_339, 0) + // Minimum execution time: 137_589_000 picoseconds. + Weight::from_parts(143_457_951, 0) .saturating_add(Weight::from_parts(0, 6078)) - // Standard Error: 34_926 - .saturating_add(Weight::from_parts(28_819_355, 0).saturating_mul(n.into())) + // Standard Error: 36_617 + .saturating_add(Weight::from_parts(28_425_202, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -754,13 +758,13 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 10]`. fn set_attributes_pre_signed(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `554` + // Measured: `625` // Estimated: `4466 + n * (2954 ±0)` - // Minimum execution time: 82_072_000 picoseconds. - Weight::from_parts(93_419_115, 0) + // Minimum execution time: 78_416_000 picoseconds. + Weight::from_parts(90_366_330, 0) .saturating_add(Weight::from_parts(0, 4466)) - // Standard Error: 61_999 - .saturating_add(Weight::from_parts(28_050_342, 0).saturating_mul(n.into())) + // Standard Error: 64_899 + .saturating_add(Weight::from_parts(27_689_833, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_proxy.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_proxy.rs index 38d61db9d8..fff0c8f6fc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_proxy.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_proxy.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_proxy -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +54,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 14_993_000 picoseconds. - Weight::from_parts(15_545_294, 0) + // Minimum execution time: 12_698_000 picoseconds. + Weight::from_parts(13_334_686, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_129 - .saturating_add(Weight::from_parts(33_559, 0).saturating_mul(p.into())) + // Standard Error: 1_022 + .saturating_add(Weight::from_parts(36_959, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -71,13 +73,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 34_998_000 picoseconds. - Weight::from_parts(35_027_857, 0) + // Minimum execution time: 31_840_000 picoseconds. + Weight::from_parts(32_090_665, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_913 - .saturating_add(Weight::from_parts(103_571, 0).saturating_mul(a.into())) - // Standard Error: 1_976 - .saturating_add(Weight::from_parts(41_632, 0).saturating_mul(p.into())) + // Standard Error: 2_043 + .saturating_add(Weight::from_parts(134_800, 0).saturating_mul(a.into())) + // Standard Error: 2_110 + .saturating_add(Weight::from_parts(35_426, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,13 +93,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 22_158_000 picoseconds. - Weight::from_parts(22_619_143, 0) + // Minimum execution time: 20_912_000 picoseconds. + Weight::from_parts(21_450_524, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_298 - .saturating_add(Weight::from_parts(112_966, 0).saturating_mul(a.into())) - // Standard Error: 1_341 - .saturating_add(Weight::from_parts(20_054, 0).saturating_mul(p.into())) + // Standard Error: 1_502 + .saturating_add(Weight::from_parts(133_288, 0).saturating_mul(a.into())) + // Standard Error: 1_552 + .saturating_add(Weight::from_parts(13_367, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -111,13 +113,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 22_335_000 picoseconds. - Weight::from_parts(22_883_668, 0) + // Minimum execution time: 21_223_000 picoseconds. + Weight::from_parts(21_468_747, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_250 - .saturating_add(Weight::from_parts(114_408, 0).saturating_mul(a.into())) - // Standard Error: 1_291 - .saturating_add(Weight::from_parts(19_393, 0).saturating_mul(p.into())) + // Standard Error: 1_866 + .saturating_add(Weight::from_parts(132_671, 0).saturating_mul(a.into())) + // Standard Error: 1_928 + .saturating_add(Weight::from_parts(17_070, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -133,13 +135,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `386 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 31_034_000 picoseconds. - Weight::from_parts(31_114_033, 0) + // Minimum execution time: 28_434_000 picoseconds. + Weight::from_parts(28_566_084, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_474 - .saturating_add(Weight::from_parts(99_199, 0).saturating_mul(a.into())) - // Standard Error: 1_523 - .saturating_add(Weight::from_parts(45_446, 0).saturating_mul(p.into())) + // Standard Error: 1_838 + .saturating_add(Weight::from_parts(131_169, 0).saturating_mul(a.into())) + // Standard Error: 1_899 + .saturating_add(Weight::from_parts(34_718, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -150,11 +152,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_876_000 picoseconds. - Weight::from_parts(23_707_631, 0) + // Minimum execution time: 20_314_000 picoseconds. + Weight::from_parts(21_113_585, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_145 - .saturating_add(Weight::from_parts(41_050, 0).saturating_mul(p.into())) + // Standard Error: 1_030 + .saturating_add(Weight::from_parts(31_967, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -165,11 +167,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_967_000 picoseconds. - Weight::from_parts(23_969_690, 0) + // Minimum execution time: 20_195_000 picoseconds. + Weight::from_parts(21_212_277, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_446 - .saturating_add(Weight::from_parts(34_159, 0).saturating_mul(p.into())) + // Standard Error: 1_683 + .saturating_add(Weight::from_parts(37_978, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,11 +182,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 20_257_000 picoseconds. - Weight::from_parts(21_156_824, 0) + // Minimum execution time: 18_861_000 picoseconds. + Weight::from_parts(19_725_939, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_296 - .saturating_add(Weight::from_parts(30_533, 0).saturating_mul(p.into())) + // Standard Error: 966 + .saturating_add(Weight::from_parts(36_437, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -195,11 +197,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 24_486_000 picoseconds. - Weight::from_parts(25_265_248, 0) + // Minimum execution time: 21_456_000 picoseconds. + Weight::from_parts(22_188_786, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_035 - .saturating_add(Weight::from_parts(9_959, 0).saturating_mul(p.into())) + // Standard Error: 1_146 + .saturating_add(Weight::from_parts(11_585, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -210,11 +212,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 20_751_000 picoseconds. - Weight::from_parts(21_583_681, 0) + // Minimum execution time: 19_482_000 picoseconds. + Weight::from_parts(20_545_300, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 884 - .saturating_add(Weight::from_parts(28_694, 0).saturating_mul(p.into())) + // Standard Error: 1_040 + .saturating_add(Weight::from_parts(33_884, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_session.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_session.rs index f4ac38f7a1..ce129ea1c3 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_session.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_session.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,11 +53,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `270` - // Estimated: `3735` - // Minimum execution time: 15_655_000 picoseconds. - Weight::from_parts(16_027_000, 0) - .saturating_add(Weight::from_parts(0, 3735)) + // Measured: `297` + // Estimated: `3762` + // Minimum execution time: 14_802_000 picoseconds. + Weight::from_parts(15_222_000, 0) + .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -65,11 +67,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `242` - // Estimated: `3707` - // Minimum execution time: 11_194_000 picoseconds. - Weight::from_parts(11_687_000, 0) - .saturating_add(Weight::from_parts(0, 3707)) + // Measured: `279` + // Estimated: `3744` + // Minimum execution time: 10_595_000 picoseconds. + Weight::from_parts(10_984_000, 0) + .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_timestamp.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_timestamp.rs index e4cdeb37f5..2092f104f9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_timestamp.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_timestamp.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `86` // Estimated: `1493` - // Minimum execution time: 8_700_000 picoseconds. - Weight::from_parts(9_004_000, 0) + // Minimum execution time: 6_839_000 picoseconds. + Weight::from_parts(7_171_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 3_136_000 picoseconds. - Weight::from_parts(3_292_000, 0) + // Minimum execution time: 2_834_000 picoseconds. + Weight::from_parts(3_106_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_uniques.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_uniques.rs index 4e5e703a2f..53bceca263 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_uniques.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_uniques.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_uniques` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_uniques -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,10 +53,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `145` + // Measured: `182` // Estimated: `3643` - // Minimum execution time: 26_126_000 picoseconds. - Weight::from_parts(27_010_000, 0) + // Minimum execution time: 24_453_000 picoseconds. + Weight::from_parts(25_248_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +69,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3643` - // Minimum execution time: 12_213_000 picoseconds. - Weight::from_parts(12_587_000, 0) + // Minimum execution time: 11_600_000 picoseconds. + Weight::from_parts(12_025_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -96,15 +98,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `257 + a * (107 ±0) + m * (56 ±0) + n * (76 ±0)` // Estimated: `3643 + a * (2647 ±0) + m * (2662 ±0) + n * (2597 ±0)` - // Minimum execution time: 2_903_360_000 picoseconds. - Weight::from_parts(2_929_987_000, 0) + // Minimum execution time: 2_791_577_000 picoseconds. + Weight::from_parts(2_861_455_000, 0) .saturating_add(Weight::from_parts(0, 3643)) - // Standard Error: 30_288 - .saturating_add(Weight::from_parts(6_364_531, 0).saturating_mul(n.into())) - // Standard Error: 30_288 - .saturating_add(Weight::from_parts(362_465, 0).saturating_mul(m.into())) - // Standard Error: 30_288 - .saturating_add(Weight::from_parts(460_353, 0).saturating_mul(a.into())) + // Standard Error: 39_357 + .saturating_add(Weight::from_parts(7_498_071, 0).saturating_mul(n.into())) + // Standard Error: 39_357 + .saturating_add(Weight::from_parts(436_731, 0).saturating_mul(m.into())) + // Standard Error: 39_357 + .saturating_add(Weight::from_parts(529_050, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) @@ -129,8 +131,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 32_526_000 picoseconds. - Weight::from_parts(32_981_000, 0) + // Minimum execution time: 29_286_000 picoseconds. + Weight::from_parts(30_003_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -147,8 +149,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 33_802_000 picoseconds. - Weight::from_parts(34_560_000, 0) + // Minimum execution time: 31_116_000 picoseconds. + Weight::from_parts(32_218_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -165,8 +167,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 24_567_000 picoseconds. - Weight::from_parts(24_992_000, 0) + // Minimum execution time: 22_767_000 picoseconds. + Weight::from_parts(23_533_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -180,11 +182,11 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `738 + i * (76 ±0)` // Estimated: `3643 + i * (2597 ±0)` - // Minimum execution time: 13_446_000 picoseconds. - Weight::from_parts(13_620_000, 0) + // Minimum execution time: 11_057_000 picoseconds. + Weight::from_parts(11_319_000, 0) .saturating_add(Weight::from_parts(0, 3643)) - // Standard Error: 18_272 - .saturating_add(Weight::from_parts(15_391_970, 0).saturating_mul(i.into())) + // Standard Error: 27_222 + .saturating_add(Weight::from_parts(15_713_128, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -199,8 +201,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 17_461_000 picoseconds. - Weight::from_parts(17_981_000, 0) + // Minimum execution time: 15_057_000 picoseconds. + Weight::from_parts(15_370_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -213,8 +215,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 17_185_000 picoseconds. - Weight::from_parts(17_800_000, 0) + // Minimum execution time: 14_595_000 picoseconds. + Weight::from_parts(15_466_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -225,8 +227,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 12_723_000 picoseconds. - Weight::from_parts(13_115_000, 0) + // Minimum execution time: 10_027_000 picoseconds. + Weight::from_parts(10_713_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -237,8 +239,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 12_557_000 picoseconds. - Weight::from_parts(12_929_000, 0) + // Minimum execution time: 10_096_000 picoseconds. + Weight::from_parts(10_443_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -253,8 +255,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `356` // Estimated: `3643` - // Minimum execution time: 20_226_000 picoseconds. - Weight::from_parts(20_583_000, 0) + // Minimum execution time: 18_298_000 picoseconds. + Weight::from_parts(18_754_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -265,8 +267,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 13_029_000 picoseconds. - Weight::from_parts(13_489_000, 0) + // Minimum execution time: 10_439_000 picoseconds. + Weight::from_parts(10_699_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -279,8 +281,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 15_719_000 picoseconds. - Weight::from_parts(16_033_000, 0) + // Minimum execution time: 13_365_000 picoseconds. + Weight::from_parts(13_859_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -295,8 +297,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `3652` - // Minimum execution time: 35_471_000 picoseconds. - Weight::from_parts(36_757_000, 0) + // Minimum execution time: 33_190_000 picoseconds. + Weight::from_parts(33_967_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -311,8 +313,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `756` // Estimated: `3652` - // Minimum execution time: 35_040_000 picoseconds. - Weight::from_parts(35_960_000, 0) + // Minimum execution time: 32_294_000 picoseconds. + Weight::from_parts(33_148_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -325,8 +327,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `3652` - // Minimum execution time: 27_372_000 picoseconds. - Weight::from_parts(27_856_000, 0) + // Minimum execution time: 23_955_000 picoseconds. + Weight::from_parts(24_606_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -339,8 +341,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `3652` - // Minimum execution time: 28_500_000 picoseconds. - Weight::from_parts(29_085_000, 0) + // Minimum execution time: 25_316_000 picoseconds. + Weight::from_parts(25_820_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -353,8 +355,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 28_323_000 picoseconds. - Weight::from_parts(28_864_000, 0) + // Minimum execution time: 24_756_000 picoseconds. + Weight::from_parts(25_569_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -367,8 +369,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3643` - // Minimum execution time: 27_405_000 picoseconds. - Weight::from_parts(28_101_000, 0) + // Minimum execution time: 24_087_000 picoseconds. + Weight::from_parts(24_934_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -381,8 +383,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `428` // Estimated: `3643` - // Minimum execution time: 18_005_000 picoseconds. - Weight::from_parts(18_564_000, 0) + // Minimum execution time: 15_746_000 picoseconds. + Weight::from_parts(16_448_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -395,8 +397,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `461` // Estimated: `3643` - // Minimum execution time: 17_989_000 picoseconds. - Weight::from_parts(18_247_000, 0) + // Minimum execution time: 15_824_000 picoseconds. + Weight::from_parts(16_329_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -407,8 +409,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3517` - // Minimum execution time: 14_186_000 picoseconds. - Weight::from_parts(14_538_000, 0) + // Minimum execution time: 11_282_000 picoseconds. + Weight::from_parts(11_646_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -421,8 +423,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `3643` - // Minimum execution time: 15_229_000 picoseconds. - Weight::from_parts(15_593_000, 0) + // Minimum execution time: 12_562_000 picoseconds. + Weight::from_parts(13_008_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -435,8 +437,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `3587` - // Minimum execution time: 14_995_000 picoseconds. - Weight::from_parts(15_423_000, 0) + // Minimum execution time: 12_623_000 picoseconds. + Weight::from_parts(13_054_000, 0) .saturating_add(Weight::from_parts(0, 3587)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -453,8 +455,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `540` // Estimated: `3643` - // Minimum execution time: 32_967_000 picoseconds. - Weight::from_parts(33_450_000, 0) + // Minimum execution time: 30_476_000 picoseconds. + Weight::from_parts(31_075_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_utility.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_utility.rs index 604825bc2b..73ea1fb6f0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_utility.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_utility.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_339_000 picoseconds. - Weight::from_parts(534_064, 0) + // Minimum execution time: 4_240_000 picoseconds. + Weight::from_parts(4_346_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_542 - .saturating_add(Weight::from_parts(5_847_740, 0).saturating_mul(c.into())) + // Standard Error: 2_416 + .saturating_add(Weight::from_parts(4_182_470, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_806_000 picoseconds. - Weight::from_parts(5_004_000, 0) + // Minimum execution time: 4_482_000 picoseconds. + Weight::from_parts(4_605_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -69,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_362_000 picoseconds. - Weight::from_parts(2_969_482, 0) + // Minimum execution time: 4_220_000 picoseconds. + Weight::from_parts(4_514_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_595 - .saturating_add(Weight::from_parts(6_134_825, 0).saturating_mul(c.into())) + // Standard Error: 1_640 + .saturating_add(Weight::from_parts(4_510_087, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_578_000 picoseconds. - Weight::from_parts(8_841_000, 0) + // Minimum execution time: 6_335_000 picoseconds. + Weight::from_parts(6_711_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -88,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_384_000 picoseconds. - Weight::from_parts(321_348, 0) + // Minimum execution time: 4_253_000 picoseconds. + Weight::from_parts(481_600, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_064 - .saturating_add(Weight::from_parts(5_876_788, 0).saturating_mul(c.into())) + // Standard Error: 3_971 + .saturating_add(Weight::from_parts(4_208_885, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs index 5d228d3347..1d0adf15d7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-polkadot.json +// --chain=../asset-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,6 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -59,10 +63,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 27_981_000 picoseconds. - Weight::from_parts(28_420_000, 0) + // Minimum execution time: 24_079_000 picoseconds. + Weight::from_parts(24_695_000, 0) .saturating_add(Weight::from_parts(0, 3540)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -71,8 +75,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1489` - // Minimum execution time: 21_895_000 picoseconds. - Weight::from_parts(22_703_000, 0) + // Minimum execution time: 18_654_000 picoseconds. + Weight::from_parts(19_331_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -82,8 +86,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1489` - // Minimum execution time: 16_334_000 picoseconds. - Weight::from_parts(16_853_000, 0) + // Minimum execution time: 13_972_000 picoseconds. + Weight::from_parts(14_410_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -103,8 +107,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_200_000 picoseconds. - Weight::from_parts(8_443_000, 0) + // Minimum execution time: 6_624_000 picoseconds. + Weight::from_parts(7_005_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +118,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_277_000 picoseconds. - Weight::from_parts(2_546_000, 0) + // Minimum execution time: 2_213_000 picoseconds. + Weight::from_parts(2_374_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,6 +127,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -139,14 +145,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 32_038_000 picoseconds. - Weight::from_parts(32_798_000, 0) + // Minimum execution time: 28_117_000 picoseconds. + Weight::from_parts(29_002_000, 0) .saturating_add(Weight::from_parts(0, 3540)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -163,10 +171,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `292` // Estimated: `3757` - // Minimum execution time: 33_697_000 picoseconds. - Weight::from_parts(34_576_000, 0) + // Minimum execution time: 30_111_000 picoseconds. + Weight::from_parts(30_890_000, 0) .saturating_add(Weight::from_parts(0, 3757)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) @@ -175,8 +183,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_387_000 picoseconds. - Weight::from_parts(2_657_000, 0) + // Minimum execution time: 2_126_000 picoseconds. + Weight::from_parts(2_293_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,8 +194,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `129` // Estimated: `11019` - // Minimum execution time: 16_279_000 picoseconds. - Weight::from_parts(16_785_000, 0) + // Minimum execution time: 17_037_000 picoseconds. + Weight::from_parts(17_778_000, 0) .saturating_add(Weight::from_parts(0, 11019)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -198,8 +206,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `133` // Estimated: `11023` - // Minimum execution time: 16_370_000 picoseconds. - Weight::from_parts(16_778_000, 0) + // Minimum execution time: 16_863_000 picoseconds. + Weight::from_parts(17_392_000, 0) .saturating_add(Weight::from_parts(0, 11023)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -210,13 +218,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `13505` - // Minimum execution time: 18_390_000 picoseconds. - Weight::from_parts(18_818_000, 0) + // Minimum execution time: 18_745_000 picoseconds. + Weight::from_parts(19_010_000, 0) .saturating_add(Weight::from_parts(0, 13505)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -231,10 +241,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `6082` - // Minimum execution time: 30_260_000 picoseconds. - Weight::from_parts(30_952_000, 0) + // Minimum execution time: 26_717_000 picoseconds. + Weight::from_parts(27_144_000, 0) .saturating_add(Weight::from_parts(0, 6082)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0) @@ -243,8 +253,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `8587` - // Minimum execution time: 8_847_000 picoseconds. - Weight::from_parts(9_040_000, 0) + // Minimum execution time: 9_128_000 picoseconds. + Weight::from_parts(9_445_000, 0) .saturating_add(Weight::from_parts(0, 8587)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -254,14 +264,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `11030` - // Minimum execution time: 16_980_000 picoseconds. - Weight::from_parts(17_369_000, 0) + // Minimum execution time: 17_316_000 picoseconds. + Weight::from_parts(17_802_000, 0) .saturating_add(Weight::from_parts(0, 11030)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -276,10 +288,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `146` // Estimated: `11036` - // Minimum execution time: 36_585_000 picoseconds. - Weight::from_parts(37_405_000, 0) + // Minimum execution time: 33_426_000 picoseconds. + Weight::from_parts(33_986_000, 0) .saturating_add(Weight::from_parts(0, 11036)) - .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs deleted file mode 100644 index 08efdfc982..0000000000 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs +++ /dev/null @@ -1,194 +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_xcm_benchmarks::fungible` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-polkadot.json")`, DB CACHE: 1024 - -// Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain -// benchmark -// pallet -// --chain=spec-asset-hub-polkadot.json -// --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares - -#![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_xcm_benchmarks::fungible`. -pub struct WeightInfo(PhantomData); -impl pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn withdraw_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `3593` - // Minimum execution time: 23_431_000 picoseconds. - Weight::from_parts(23_798_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `6196` - // Minimum execution time: 46_181_000 picoseconds. - Weight::from_parts(46_721_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn transfer_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `176` - // Estimated: `6196` - // Minimum execution time: 68_388_000 picoseconds. - Weight::from_parts(69_826_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(8)) - .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`) - fn reserve_asset_deposited() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_reserve_withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 443_116_000 picoseconds. - Weight::from_parts(468_720_000, 0) - .saturating_add(Weight::from_parts(0, 3540)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - fn receive_teleported_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_456_000 picoseconds. - Weight::from_parts(3_563_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn deposit_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 23_988_000 picoseconds. - Weight::from_parts(24_434_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: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn deposit_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3593` - // Minimum execution time: 47_797_000 picoseconds. - Weight::from_parts(49_315_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_teleport() -> Weight { - // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 29_674_000 picoseconds. - Weight::from_parts(30_313_000, 0) - .saturating_add(Weight::from_parts(0, 3540)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 4f64ea3fa1..2120b3ddcf 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -1,190 +1,208 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. +// This file is part of Polkadot. -// Cumulus 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. -// Cumulus 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 Cumulus. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=asset-hub-polkadot-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::fungible -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --extrinsic=* +// --chain=../asset-hub-polkadot-chain-spec.json // --steps=50 // --repeat=20 -// --json +// --pallet=pallet_xcm_benchmarks::fungible +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-polkadot-weights // --header=./file_header.txt -// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs #![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::fungible`. +/// Weight functions for `pallet_xcm_benchmarks::fungible`. 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 { + /// 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 { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 26_090_000 picoseconds. - Weight::from_parts(27_006_000, 3593) + // Minimum execution time: 21_524_000 picoseconds. + Weight::from_parts(22_376_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 { + /// 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 { // Proof Size summary in bytes: - // Measured: `101` + // Measured: `153` // Estimated: `6196` - // Minimum execution time: 50_699_000 picoseconds. - Weight::from_parts(51_888_000, 6196) + // Minimum execution time: 45_035_000 picoseconds. + Weight::from_parts(46_186_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: `System::Account` (r:2 w:2) - // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn transfer_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `176` - // Estimated: `6196` - // Minimum execution time: 72_130_000 picoseconds. - Weight::from_parts(73_994_000, 6196) - .saturating_add(T::DbWeight::get().reads(8)) + // Measured: `228` + // Estimated: `8799` + // Minimum execution time: 76_546_000 picoseconds. + Weight::from_parts(78_052_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(10)) .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 { + /// 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 { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_reserve_withdraw() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 477_183_000 picoseconds. - Weight::from_parts(488_156_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `176` + // Estimated: `6196` + // Minimum execution time: 167_713_000 picoseconds. + Weight::from_parts(177_612_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } - pub fn receive_teleported_asset() -> Weight { + pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_966_000 picoseconds. - Weight::from_parts(4_129_000, 0) + // Minimum execution time: 3_022_000 picoseconds. + Weight::from_parts(3_158_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // 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 { + /// 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 { // Proof Size summary in bytes: - // Measured: `0` + // Measured: `52` // Estimated: `3593` - // Minimum execution time: 26_047_000 picoseconds. - Weight::from_parts(26_982_000, 3593) + // Minimum execution time: 20_093_000 picoseconds. + Weight::from_parts(20_483_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: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn deposit_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3593` - // Minimum execution time: 51_076_000 picoseconds. - Weight::from_parts(51_826_000, 3593) - .saturating_add(T::DbWeight::get().reads(7)) + // Measured: `127` + // Estimated: `6196` + // Minimum execution time: 48_694_000 picoseconds. + Weight::from_parts(49_886_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_teleport() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 30_606_000 picoseconds. - Weight::from_parts(31_168_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) + // Estimated: `3593` + // Minimum execution time: 33_889_000 picoseconds. + Weight::from_parts(34_665_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index bf7df58b87..7285ac453e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=cumulus_pallet_xcmp_queue -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_629_000 picoseconds. - Weight::from_parts(4_907_000, 0) + // Minimum execution time: 4_032_000 picoseconds. + Weight::from_parts(4_240_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_735_000 picoseconds. - Weight::from_parts(4_944_000, 0) + // Minimum execution time: 4_062_000 picoseconds. + Weight::from_parts(4_278_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs index 2cf66dc0e5..4a27cf896d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_849_000 picoseconds. - Weight::from_parts(2_313_152, 0) + // Minimum execution time: 1_801_000 picoseconds. + Weight::from_parts(1_878_000, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) + .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: 6_986_000 picoseconds. - Weight::from_parts(38_372_392, 0) + // Minimum execution time: 5_027_000 picoseconds. + Weight::from_parts(59_777_523, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_662, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_661, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_558_000 picoseconds. - Weight::from_parts(3_806_000, 0) + // Minimum execution time: 3_011_000 picoseconds. + Weight::from_parts(3_180_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127` // Estimated: `1612` - // Minimum execution time: 96_815_706_000 picoseconds. - Weight::from_parts(100_138_487_000, 0) + // Minimum execution time: 112_358_604_000 picoseconds. + Weight::from_parts(116_945_119_000, 0) .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -110,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_004_000 picoseconds. - Weight::from_parts(2_054_000, 0) + // Minimum execution time: 1_912_000 picoseconds. + Weight::from_parts(1_953_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_778 - .saturating_add(Weight::from_parts(698_035, 0).saturating_mul(i.into())) + // Standard Error: 2_154 + .saturating_add(Weight::from_parts(778_638, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -124,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_958_000 picoseconds. - Weight::from_parts(2_006_000, 0) + // Minimum execution time: 1_919_000 picoseconds. + Weight::from_parts(1_966_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 873 - .saturating_add(Weight::from_parts(538_062, 0).saturating_mul(i.into())) + // Standard Error: 1_061 + .saturating_add(Weight::from_parts(574_933, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,11 +140,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `68 + p * (69 ±0)` // Estimated: `66 + p * (70 ±0)` - // Minimum execution time: 3_657_000 picoseconds. - Weight::from_parts(3_732_000, 0) + // Minimum execution time: 3_674_000 picoseconds. + Weight::from_parts(3_752_000, 0) .saturating_add(Weight::from_parts(0, 66)) - // Standard Error: 1_369 - .saturating_add(Weight::from_parts(1_239_746, 0).saturating_mul(p.into())) + // Standard Error: 1_879 + .saturating_add(Weight::from_parts(1_198_602, 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/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs index 57f2a65b75..554eb9952e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 50_035_000 picoseconds. - Weight::from_parts(50_745_000, 0) + // Minimum execution time: 43_196_000 picoseconds. + Weight::from_parts(43_772_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 37_128_000 picoseconds. - Weight::from_parts(38_069_000, 0) + // Minimum execution time: 33_789_000 picoseconds. + Weight::from_parts(34_153_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_579_000 picoseconds. - Weight::from_parts(14_926_000, 0) + // Minimum execution time: 12_698_000 picoseconds. + Weight::from_parts(13_038_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -87,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 21_308_000 picoseconds. - Weight::from_parts(22_125_000, 0) + // Minimum execution time: 17_528_000 picoseconds. + Weight::from_parts(18_018_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 52_124_000 picoseconds. - Weight::from_parts(52_934_000, 0) + // Minimum execution time: 44_655_000 picoseconds. + Weight::from_parts(45_297_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 46_860_000 picoseconds. - Weight::from_parts(47_496_000, 0) + // Minimum execution time: 42_422_000 picoseconds. + Weight::from_parts(42_999_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -123,8 +125,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 16_577_000 picoseconds. - Weight::from_parts(17_144_000, 0) + // Minimum execution time: 15_395_000 picoseconds. + Weight::from_parts(15_835_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 16_012_000 picoseconds. - Weight::from_parts(16_186_000, 0) + // Minimum execution time: 14_674_000 picoseconds. + Weight::from_parts(15_020_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 12_975 - .saturating_add(Weight::from_parts(14_485_817, 0).saturating_mul(u.into())) + // Standard Error: 14_177 + .saturating_add(Weight::from_parts(13_470_636, 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/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs index f9743149ef..1bb957240c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_collator_selection -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,11 +56,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `196 + b * (79 ±0)` // Estimated: `1187 + b * (2555 ±0)` - // Minimum execution time: 14_097_000 picoseconds. - Weight::from_parts(11_274_562, 0) + // Minimum execution time: 11_484_000 picoseconds. + Weight::from_parts(8_779_030, 0) .saturating_add(Weight::from_parts(0, 1187)) - // Standard Error: 4_753 - .saturating_add(Weight::from_parts(3_162_320, 0).saturating_mul(b.into())) + // Standard Error: 4_255 + .saturating_add(Weight::from_parts(3_157_671, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -77,13 +79,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `757 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 47_085_000 picoseconds. - Weight::from_parts(47_136_422, 0) + // Minimum execution time: 38_875_000 picoseconds. + Weight::from_parts(38_306_232, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 7_247 - .saturating_add(Weight::from_parts(138_614, 0).saturating_mul(b.into())) - // Standard Error: 1_373 - .saturating_add(Weight::from_parts(117_685, 0).saturating_mul(c.into())) + // Standard Error: 12_673 + .saturating_add(Weight::from_parts(124_832, 0).saturating_mul(b.into())) + // Standard Error: 2_402 + .saturating_add(Weight::from_parts(164_883, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -98,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `82 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 15_356_000 picoseconds. - Weight::from_parts(14_972_543, 0) + // Minimum execution time: 11_182_000 picoseconds. + Weight::from_parts(11_054_923, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_184 - .saturating_add(Weight::from_parts(171_225, 0).saturating_mul(b.into())) + // Standard Error: 2_134 + .saturating_add(Weight::from_parts(160_083, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_030_000 picoseconds. - Weight::from_parts(7_304_000, 0) + // Minimum execution time: 4_736_000 picoseconds. + Weight::from_parts(4_947_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,8 +125,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_080_000 picoseconds. - Weight::from_parts(7_333_000, 0) + // Minimum execution time: 4_670_000 picoseconds. + Weight::from_parts(4_993_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -145,11 +147,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `740 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 40_225_000 picoseconds. - Weight::from_parts(44_522_732, 0) + // Minimum execution time: 33_727_000 picoseconds. + Weight::from_parts(37_163_873, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_261 - .saturating_add(Weight::from_parts(149_396, 0).saturating_mul(c.into())) + // Standard Error: 2_131 + .saturating_add(Weight::from_parts(187_102, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -165,11 +167,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `334 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 32_303_000 picoseconds. - Weight::from_parts(35_559_426, 0) + // Minimum execution time: 27_308_000 picoseconds. + Weight::from_parts(29_806_020, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 1_781 - .saturating_add(Weight::from_parts(131_567, 0).saturating_mul(c.into())) + // Standard Error: 2_064 + .saturating_add(Weight::from_parts(154_141, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -183,8 +185,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 43_817_000 picoseconds. - Weight::from_parts(45_112_000, 0) + // Minimum execution time: 38_488_000 picoseconds. + Weight::from_parts(39_008_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -205,11 +207,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2263 + c * (97 ±0) + r * (115 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 16_136_000 picoseconds. - Weight::from_parts(16_369_000, 0) + // Minimum execution time: 15_179_000 picoseconds. + Weight::from_parts(15_456_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 338_283 - .saturating_add(Weight::from_parts(14_626_916, 0).saturating_mul(c.into())) + // Standard Error: 287_064 + .saturating_add(Weight::from_parts(12_603_043, 0).saturating_mul(c.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().writes(1)) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs index 4e62227609..21c2fc75df 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_788_000 picoseconds. - Weight::from_parts(13_376_629, 0) + // Minimum execution time: 13_233_000 picoseconds. + Weight::from_parts(14_114_439, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(571, 0).saturating_mul(z.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(530, 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`) @@ -64,13 +66,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 42_060_000 picoseconds. - Weight::from_parts(31_082_408, 0) + // Minimum execution time: 38_533_000 picoseconds. + Weight::from_parts(26_869_210, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 907 - .saturating_add(Weight::from_parts(126_049, 0).saturating_mul(s.into())) + // Standard Error: 819 + .saturating_add(Weight::from_parts(128_640, 0).saturating_mul(s.into())) // Standard Error: 8 - .saturating_add(Weight::from_parts(1_498, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_573, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 27_648_000 picoseconds. - Weight::from_parts(18_707_048, 0) + // Minimum execution time: 26_188_000 picoseconds. + Weight::from_parts(16_687_107, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 460 - .saturating_add(Weight::from_parts(101_415, 0).saturating_mul(s.into())) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_475, 0).saturating_mul(z.into())) + // Standard Error: 849 + .saturating_add(Weight::from_parts(104_698, 0).saturating_mul(s.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_525, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,13 +104,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 47_818_000 picoseconds. - Weight::from_parts(34_780_275, 0) + // Minimum execution time: 45_339_000 picoseconds. + Weight::from_parts(30_549_419, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 961 - .saturating_add(Weight::from_parts(144_167, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_563, 0).saturating_mul(z.into())) + // Standard Error: 1_150 + .saturating_add(Weight::from_parts(158_351, 0).saturating_mul(s.into())) + // Standard Error: 11 + .saturating_add(Weight::from_parts(1_645, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 29_625_000 picoseconds. - Weight::from_parts(30_476_472, 0) + // Minimum execution time: 26_547_000 picoseconds. + Weight::from_parts(27_000_490, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_022 - .saturating_add(Weight::from_parts(123_081, 0).saturating_mul(s.into())) + // Standard Error: 837 + .saturating_add(Weight::from_parts(123_863, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 16_731_000 picoseconds. - Weight::from_parts(17_486_938, 0) + // Minimum execution time: 15_319_000 picoseconds. + Weight::from_parts(15_779_764, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 626 - .saturating_add(Weight::from_parts(104_043, 0).saturating_mul(s.into())) + // Standard Error: 546 + .saturating_add(Weight::from_parts(106_160, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 30_733_000 picoseconds. - Weight::from_parts(32_131_484, 0) + // Minimum execution time: 27_786_000 picoseconds. + Weight::from_parts(29_548_156, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 822 - .saturating_add(Weight::from_parts(111_362, 0).saturating_mul(s.into())) + // Standard Error: 896 + .saturating_add(Weight::from_parts(111_139, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs index 5ad4c6da59..833bef4dd8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `297` // Estimated: `3762` - // Minimum execution time: 15_873_000 picoseconds. - Weight::from_parts(16_442_000, 0) + // Minimum execution time: 16_193_000 picoseconds. + Weight::from_parts(16_645_000, 0) .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +69,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `3744` - // Minimum execution time: 11_730_000 picoseconds. - Weight::from_parts(12_298_000, 0) + // Minimum execution time: 11_843_000 picoseconds. + Weight::from_parts(12_214_000, 0) .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs index 4bfe43cad2..903ab79098 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `49` // Estimated: `1493` - // Minimum execution time: 7_120_000 picoseconds. - Weight::from_parts(7_479_000, 0) + // Minimum execution time: 5_596_000 picoseconds. + Weight::from_parts(5_862_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 3_155_000 picoseconds. - Weight::from_parts(3_324_000, 0) + // Minimum execution time: 2_851_000 picoseconds. + Weight::from_parts(2_972_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs index 067737c708..f82f554299 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_419_000 picoseconds. - Weight::from_parts(13_344_125, 0) + // Minimum execution time: 4_628_000 picoseconds. + Weight::from_parts(12_479_012, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_241 - .saturating_add(Weight::from_parts(4_990_325, 0).saturating_mul(c.into())) + // Standard Error: 2_060 + .saturating_add(Weight::from_parts(3_265_434, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_449_000 picoseconds. - Weight::from_parts(4_668_000, 0) + // Minimum execution time: 4_344_000 picoseconds. + Weight::from_parts(4_558_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -69,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_420_000 picoseconds. - Weight::from_parts(10_874_590, 0) + // Minimum execution time: 4_541_000 picoseconds. + Weight::from_parts(8_026_806, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_261 - .saturating_add(Weight::from_parts(5_278_285, 0).saturating_mul(c.into())) + // Standard Error: 2_532 + .saturating_add(Weight::from_parts(3_574_673, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_201_000 picoseconds. - Weight::from_parts(8_489_000, 0) + // Minimum execution time: 6_516_000 picoseconds. + Weight::from_parts(6_940_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -88,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_433_000 picoseconds. - Weight::from_parts(13_058_755, 0) + // Minimum execution time: 4_523_000 picoseconds. + Weight::from_parts(5_041_122, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_601 - .saturating_add(Weight::from_parts(4_998_576, 0).saturating_mul(c.into())) + // Standard Error: 2_614 + .saturating_add(Weight::from_parts(3_284_454, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index e9ef1db1d7..e6f0e1b16c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-kusama.json +// --chain=../bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,6 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -59,10 +63,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `38` // Estimated: `3503` - // Minimum execution time: 27_441_000 picoseconds. - Weight::from_parts(28_207_000, 0) + // Minimum execution time: 23_173_000 picoseconds. + Weight::from_parts(23_835_000, 0) .saturating_add(Weight::from_parts(0, 3503)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -71,8 +75,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `1489` - // Minimum execution time: 24_853_000 picoseconds. - Weight::from_parts(25_353_000, 0) + // Minimum execution time: 20_880_000 picoseconds. + Weight::from_parts(21_403_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -102,8 +106,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_641_000 picoseconds. - Weight::from_parts(8_867_000, 0) + // Minimum execution time: 7_014_000 picoseconds. + Weight::from_parts(7_274_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,8 +117,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_428_000 picoseconds. - Weight::from_parts(2_485_000, 0) + // Minimum execution time: 2_096_000 picoseconds. + Weight::from_parts(2_237_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -122,6 +126,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -138,14 +144,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `38` // Estimated: `3503` - // Minimum execution time: 31_649_000 picoseconds. - Weight::from_parts(32_203_000, 0) + // Minimum execution time: 26_864_000 picoseconds. + Weight::from_parts(27_431_000, 0) .saturating_add(Weight::from_parts(0, 3503)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -162,10 +170,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 34_333_000 picoseconds. - Weight::from_parts(35_196_000, 0) + // Minimum execution time: 29_615_000 picoseconds. + Weight::from_parts(30_528_000, 0) .saturating_add(Weight::from_parts(0, 3720)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) @@ -174,8 +182,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_367_000 picoseconds. - Weight::from_parts(2_478_000, 0) + // Minimum execution time: 2_147_000 picoseconds. + Weight::from_parts(2_238_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -185,8 +193,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `95` // Estimated: `10985` - // Minimum execution time: 14_168_000 picoseconds. - Weight::from_parts(14_570_000, 0) + // Minimum execution time: 14_527_000 picoseconds. + Weight::from_parts(15_123_000, 0) .saturating_add(Weight::from_parts(0, 10985)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -197,8 +205,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `99` // Estimated: `10989` - // Minimum execution time: 14_084_000 picoseconds. - Weight::from_parts(14_474_000, 0) + // Minimum execution time: 14_728_000 picoseconds. + Weight::from_parts(15_187_000, 0) .saturating_add(Weight::from_parts(0, 10989)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -209,13 +217,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `13471` - // Minimum execution time: 15_806_000 picoseconds. - Weight::from_parts(16_214_000, 0) + // Minimum execution time: 15_971_000 picoseconds. + Weight::from_parts(16_444_000, 0) .saturating_add(Weight::from_parts(0, 13471)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -230,10 +240,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `6046` - // Minimum execution time: 28_895_000 picoseconds. - Weight::from_parts(29_545_000, 0) + // Minimum execution time: 25_420_000 picoseconds. + Weight::from_parts(26_049_000, 0) .saturating_add(Weight::from_parts(0, 6046)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0) @@ -242,8 +252,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `8551` - // Minimum execution time: 8_089_000 picoseconds. - Weight::from_parts(8_331_000, 0) + // Minimum execution time: 8_560_000 picoseconds. + Weight::from_parts(8_832_000, 0) .saturating_add(Weight::from_parts(0, 8551)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -253,14 +263,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `10996` - // Minimum execution time: 14_275_000 picoseconds. - Weight::from_parts(14_827_000, 0) + // Minimum execution time: 15_194_000 picoseconds. + Weight::from_parts(15_530_000, 0) .saturating_add(Weight::from_parts(0, 10996)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -275,10 +287,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `112` // Estimated: `11002` - // Minimum execution time: 35_385_000 picoseconds. - Weight::from_parts(36_074_000, 0) + // Minimum execution time: 32_434_000 picoseconds. + Weight::from_parts(33_031_000, 0) .saturating_add(Weight::from_parts(0, 11002)) - .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs deleted file mode 100644 index 8e5a1df940..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm_benchmarks_fungible.rs +++ /dev/null @@ -1,194 +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_xcm_benchmarks::fungible` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-kusama.json")`, DB CACHE: 1024 - -// Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain -// benchmark -// pallet -// --chain=spec-bridge-hub-kusama.json -// --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares - -#![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_xcm_benchmarks::fungible`. -pub struct WeightInfo(PhantomData); -impl pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn withdraw_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `3593` - // Minimum execution time: 23_937_000 picoseconds. - Weight::from_parts(24_423_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `153` - // Estimated: `6196` - // Minimum execution time: 49_422_000 picoseconds. - Weight::from_parts(50_387_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn transfer_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `223` - // Estimated: `6196` - // Minimum execution time: 73_499_000 picoseconds. - Weight::from_parts(75_114_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(8)) - .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`) - fn reserve_asset_deposited() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_reserve_withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 30_070_000 picoseconds. - Weight::from_parts(30_833_000, 0) - .saturating_add(Weight::from_parts(0, 3535)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - fn receive_teleported_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_797_000 picoseconds. - Weight::from_parts(3_950_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn deposit_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `52` - // Estimated: `3593` - // Minimum execution time: 25_104_000 picoseconds. - Weight::from_parts(25_757_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: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn deposit_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `122` - // Estimated: `3593` - // Minimum execution time: 52_098_000 picoseconds. - Weight::from_parts(53_222_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_teleport() -> Weight { - // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 30_520_000 picoseconds. - Weight::from_parts(31_229_000, 0) - .saturating_add(Weight::from_parts(0, 3535)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 6c8c7ab66b..6fbbd9febc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -1,190 +1,208 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. +// This file is part of Polkadot. -// Cumulus 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. -// Cumulus 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 Cumulus. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=bridge-hub-kusama-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::fungible -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --extrinsic=* +// --chain=../bridge-hub-kusama-chain-spec.json // --steps=50 // --repeat=20 -// --json +// --pallet=pallet_xcm_benchmarks::fungible +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights // --header=./file_header.txt -// --output=./parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs #![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::fungible`. +/// Weight functions for `pallet_xcm_benchmarks::fungible`. 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 { + /// 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 { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 24_064_000 picoseconds. - Weight::from_parts(24_751_000, 3593) + // Minimum execution time: 19_531_000 picoseconds. + Weight::from_parts(19_982_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 { + /// 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 { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 51_097_000 picoseconds. - Weight::from_parts(51_960_000, 6196) + // Minimum execution time: 43_976_000 picoseconds. + Weight::from_parts(44_515_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: `System::Account` (r:2 w:2) - // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn transfer_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `223` - // Estimated: `6196` - // Minimum execution time: 75_319_000 picoseconds. - Weight::from_parts(77_356_000, 6196) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) + // Estimated: `8799` + // Minimum execution time: 87_732_000 picoseconds. + Weight::from_parts(88_962_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: `Benchmark::Override` (r:0 w:0) - // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub fn reserve_asset_deposited() -> Weight { + /// 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 { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_reserve_withdraw() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 29_392_000 picoseconds. - Weight::from_parts(29_943_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 58_768_000 picoseconds. + Weight::from_parts(59_908_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } - pub fn receive_teleported_asset() -> Weight { + pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_637_000 picoseconds. - Weight::from_parts(3_720_000, 0) + // Minimum execution time: 3_286_000 picoseconds. + Weight::from_parts(3_356_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // 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 { + /// 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 { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 25_045_000 picoseconds. - Weight::from_parts(25_546_000, 3593) + // Minimum execution time: 19_358_000 picoseconds. + Weight::from_parts(19_772_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: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn deposit_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `122` - // Estimated: `3593` - // Minimum execution time: 51_450_000 picoseconds. - Weight::from_parts(52_354_000, 3593) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Estimated: `6196` + // Minimum execution time: 59_537_000 picoseconds. + Weight::from_parts(60_315_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_teleport() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 29_711_000 picoseconds. - Weight::from_parts(30_759_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Estimated: `3593` + // Minimum execution time: 44_053_000 picoseconds. + Weight::from_parts(44_536_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 13dd94c5b4..27f640dbaf 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=cumulus_pallet_xcmp_queue -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_825_000 picoseconds. - Weight::from_parts(5_084_000, 0) + // Minimum execution time: 4_011_000 picoseconds. + Weight::from_parts(4_247_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_869_000 picoseconds. - Weight::from_parts(5_036_000, 0) + // Minimum execution time: 3_995_000 picoseconds. + Weight::from_parts(4_256_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs index 3b699fd135..0acabfdc2a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_837_000 picoseconds. - Weight::from_parts(5_613_528, 0) + // Minimum execution time: 1_811_000 picoseconds. + Weight::from_parts(4_965_049, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(431, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(375, 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: 7_101_000 picoseconds. - Weight::from_parts(52_721_311, 0) + // Minimum execution time: 5_113_000 picoseconds. + Weight::from_parts(90_245_889, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_704, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_614, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_495_000 picoseconds. - Weight::from_parts(3_689_000, 0) + // Minimum execution time: 3_105_000 picoseconds. + Weight::from_parts(3_276_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127` // Estimated: `1612` - // Minimum execution time: 97_025_145_000 picoseconds. - Weight::from_parts(99_587_673_000, 0) + // Minimum execution time: 113_410_079_000 picoseconds. + Weight::from_parts(117_502_557_000, 0) .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -110,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_945_000 picoseconds. - Weight::from_parts(2_001_000, 0) + // Minimum execution time: 1_884_000 picoseconds. + Weight::from_parts(1_962_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_032 - .saturating_add(Weight::from_parts(716_296, 0).saturating_mul(i.into())) + // Standard Error: 2_224 + .saturating_add(Weight::from_parts(793_307, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -124,11 +126,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(2_024_000, 0) + // Minimum execution time: 1_922_000 picoseconds. + Weight::from_parts(1_988_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 859 - .saturating_add(Weight::from_parts(541_833, 0).saturating_mul(i.into())) + // Standard Error: 1_182 + .saturating_add(Weight::from_parts(576_089, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,11 +140,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `68 + p * (69 ±0)` // Estimated: `66 + p * (70 ±0)` - // Minimum execution time: 3_617_000 picoseconds. - Weight::from_parts(3_646_000, 0) + // Minimum execution time: 3_576_000 picoseconds. + Weight::from_parts(3_669_000, 0) .saturating_add(Weight::from_parts(0, 66)) - // Standard Error: 1_403 - .saturating_add(Weight::from_parts(1_236_040, 0).saturating_mul(p.into())) + // Standard Error: 1_600 + .saturating_add(Weight::from_parts(1_186_481, 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/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs index e5d10da11d..d6bcc10ea0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 50_192_000 picoseconds. - Weight::from_parts(51_002_000, 0) + // Minimum execution time: 44_229_000 picoseconds. + Weight::from_parts(45_100_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 37_741_000 picoseconds. - Weight::from_parts(38_220_000, 0) + // Minimum execution time: 34_769_000 picoseconds. + Weight::from_parts(35_395_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_274_000 picoseconds. - Weight::from_parts(14_858_000, 0) + // Minimum execution time: 13_066_000 picoseconds. + Weight::from_parts(13_312_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -87,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 21_287_000 picoseconds. - Weight::from_parts(21_876_000, 0) + // Minimum execution time: 17_741_000 picoseconds. + Weight::from_parts(18_197_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 52_088_000 picoseconds. - Weight::from_parts(52_885_000, 0) + // Minimum execution time: 45_889_000 picoseconds. + Weight::from_parts(46_650_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 47_345_000 picoseconds. - Weight::from_parts(48_069_000, 0) + // Minimum execution time: 43_233_000 picoseconds. + Weight::from_parts(43_978_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -123,8 +125,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 16_713_000 picoseconds. - Weight::from_parts(17_011_000, 0) + // Minimum execution time: 15_526_000 picoseconds. + Weight::from_parts(15_749_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 16_004_000 picoseconds. - Weight::from_parts(16_370_000, 0) + // Minimum execution time: 14_588_000 picoseconds. + Weight::from_parts(14_983_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 11_297 - .saturating_add(Weight::from_parts(14_279_400, 0).saturating_mul(u.into())) + // Standard Error: 16_011 + .saturating_add(Weight::from_parts(13_555_902, 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/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs index 0888c2a3ff..0df4684175 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_collator_selection -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,11 +56,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `196 + b * (79 ±0)` // Estimated: `1187 + b * (2555 ±0)` - // Minimum execution time: 13_959_000 picoseconds. - Weight::from_parts(11_140_704, 0) + // Minimum execution time: 11_783_000 picoseconds. + Weight::from_parts(8_936_367, 0) .saturating_add(Weight::from_parts(0, 1187)) - // Standard Error: 5_292 - .saturating_add(Weight::from_parts(3_133_926, 0).saturating_mul(b.into())) + // Standard Error: 5_856 + .saturating_add(Weight::from_parts(3_214_845, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -77,13 +79,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `757 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 45_269_000 picoseconds. - Weight::from_parts(46_137_175, 0) + // Minimum execution time: 39_149_000 picoseconds. + Weight::from_parts(39_735_410, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 7_295 - .saturating_add(Weight::from_parts(154_549, 0).saturating_mul(b.into())) - // Standard Error: 1_382 - .saturating_add(Weight::from_parts(122_340, 0).saturating_mul(c.into())) + // Standard Error: 13_272 + .saturating_add(Weight::from_parts(48_061, 0).saturating_mul(b.into())) + // Standard Error: 2_515 + .saturating_add(Weight::from_parts(156_402, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -98,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `82 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 15_092_000 picoseconds. - Weight::from_parts(15_058_351, 0) + // Minimum execution time: 11_554_000 picoseconds. + Weight::from_parts(11_439_859, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_269 - .saturating_add(Weight::from_parts(165_161, 0).saturating_mul(b.into())) + // Standard Error: 2_007 + .saturating_add(Weight::from_parts(159_672, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_170_000 picoseconds. - Weight::from_parts(7_413_000, 0) + // Minimum execution time: 4_667_000 picoseconds. + Weight::from_parts(4_917_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,8 +125,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_163_000 picoseconds. - Weight::from_parts(7_424_000, 0) + // Minimum execution time: 4_689_000 picoseconds. + Weight::from_parts(4_951_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -145,11 +147,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `740 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 39_633_000 picoseconds. - Weight::from_parts(44_185_092, 0) + // Minimum execution time: 34_333_000 picoseconds. + Weight::from_parts(37_804_768, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_561 - .saturating_add(Weight::from_parts(151_881, 0).saturating_mul(c.into())) + // Standard Error: 2_274 + .saturating_add(Weight::from_parts(168_210, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -165,11 +167,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `334 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 32_200_000 picoseconds. - Weight::from_parts(35_866_945, 0) + // Minimum execution time: 27_848_000 picoseconds. + Weight::from_parts(30_594_742, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_176 - .saturating_add(Weight::from_parts(125_881, 0).saturating_mul(c.into())) + // Standard Error: 2_350 + .saturating_add(Weight::from_parts(140_950, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -183,8 +185,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 42_476_000 picoseconds. - Weight::from_parts(43_484_000, 0) + // Minimum execution time: 38_213_000 picoseconds. + Weight::from_parts(38_734_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -205,11 +207,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2263 + c * (97 ±0) + r * (115 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 15_953_000 picoseconds. - Weight::from_parts(16_271_000, 0) + // Minimum execution time: 14_727_000 picoseconds. + Weight::from_parts(15_024_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 332_525 - .saturating_add(Weight::from_parts(14_339_853, 0).saturating_mul(c.into())) + // Standard Error: 288_495 + .saturating_add(Weight::from_parts(12_608_618, 0).saturating_mul(c.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().writes(1)) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs index d70a4157f7..eacd510e45 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_197_000 picoseconds. - Weight::from_parts(13_723_690, 0) + // Minimum execution time: 12_807_000 picoseconds. + Weight::from_parts(14_030_617, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(605, 0).saturating_mul(z.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(529, 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`) @@ -64,13 +66,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 42_714_000 picoseconds. - Weight::from_parts(30_465_567, 0) + // Minimum execution time: 39_948_000 picoseconds. + Weight::from_parts(29_566_642, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_067 - .saturating_add(Weight::from_parts(134_056, 0).saturating_mul(s.into())) - // Standard Error: 10 - .saturating_add(Weight::from_parts(1_538, 0).saturating_mul(z.into())) + // Standard Error: 879 + .saturating_add(Weight::from_parts(121_138, 0).saturating_mul(s.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_424, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 27_909_000 picoseconds. - Weight::from_parts(18_151_669, 0) + // Minimum execution time: 25_937_000 picoseconds. + Weight::from_parts(16_761_002, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 481 - .saturating_add(Weight::from_parts(111_951, 0).saturating_mul(s.into())) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_537, 0).saturating_mul(z.into())) + // Standard Error: 686 + .saturating_add(Weight::from_parts(110_096, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_491, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,13 +104,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 47_950_000 picoseconds. - Weight::from_parts(35_705_471, 0) + // Minimum execution time: 45_635_000 picoseconds. + Weight::from_parts(32_454_072, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_182 - .saturating_add(Weight::from_parts(140_240, 0).saturating_mul(s.into())) - // Standard Error: 11 - .saturating_add(Weight::from_parts(1_565, 0).saturating_mul(z.into())) + // Standard Error: 1_251 + .saturating_add(Weight::from_parts(152_966, 0).saturating_mul(s.into())) + // Standard Error: 12 + .saturating_add(Weight::from_parts(1_560, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 29_133_000 picoseconds. - Weight::from_parts(30_084_707, 0) + // Minimum execution time: 27_043_000 picoseconds. + Weight::from_parts(27_877_731, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 716 - .saturating_add(Weight::from_parts(118_041, 0).saturating_mul(s.into())) + // Standard Error: 703 + .saturating_add(Weight::from_parts(120_142, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 16_585_000 picoseconds. - Weight::from_parts(17_152_037, 0) + // Minimum execution time: 15_483_000 picoseconds. + Weight::from_parts(16_203_956, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 527 - .saturating_add(Weight::from_parts(106_627, 0).saturating_mul(s.into())) + // Standard Error: 753 + .saturating_add(Weight::from_parts(101_759, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 30_321_000 picoseconds. - Weight::from_parts(31_557_992, 0) + // Minimum execution time: 28_399_000 picoseconds. + Weight::from_parts(29_247_819, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 642 - .saturating_add(Weight::from_parts(118_625, 0).saturating_mul(s.into())) + // Standard Error: 703 + .saturating_add(Weight::from_parts(120_113, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs index fa7070110f..879d9ae9fe 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `297` // Estimated: `3762` - // Minimum execution time: 15_632_000 picoseconds. - Weight::from_parts(16_440_000, 0) + // Minimum execution time: 15_811_000 picoseconds. + Weight::from_parts(16_342_000, 0) .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +69,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `3744` - // Minimum execution time: 11_973_000 picoseconds. - Weight::from_parts(12_481_000, 0) + // Minimum execution time: 11_306_000 picoseconds. + Weight::from_parts(11_802_000, 0) .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs index 4f142a35be..fa8d0de329 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `49` // Estimated: `1493` - // Minimum execution time: 6_967_000 picoseconds. - Weight::from_parts(7_367_000, 0) + // Minimum execution time: 5_639_000 picoseconds. + Weight::from_parts(5_920_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 3_167_000 picoseconds. - Weight::from_parts(3_328_000, 0) + // Minimum execution time: 2_851_000 picoseconds. + Weight::from_parts(2_983_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs index f962c797f4..804cc7ba1e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_327_000 picoseconds. - Weight::from_parts(3_628_829, 0) + // Minimum execution time: 4_337_000 picoseconds. + Weight::from_parts(2_981_115, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5_365 - .saturating_add(Weight::from_parts(4_984_674, 0).saturating_mul(c.into())) + // Standard Error: 2_005 + .saturating_add(Weight::from_parts(3_360_115, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_396_000 picoseconds. - Weight::from_parts(4_678_000, 0) + // Minimum execution time: 4_341_000 picoseconds. + Weight::from_parts(4_520_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -69,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_466_000 picoseconds. - Weight::from_parts(12_917_794, 0) + // Minimum execution time: 4_491_000 picoseconds. + Weight::from_parts(10_469_623, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 6_753 - .saturating_add(Weight::from_parts(5_249_420, 0).saturating_mul(c.into())) + // Standard Error: 2_732 + .saturating_add(Weight::from_parts(3_639_297, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_352_000 picoseconds. - Weight::from_parts(8_639_000, 0) + // Minimum execution time: 6_734_000 picoseconds. + Weight::from_parts(7_021_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -88,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_591_000 picoseconds. - Weight::from_parts(23_284_889, 0) + // Minimum execution time: 4_525_000 picoseconds. + Weight::from_parts(1_968_433, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 8_304 - .saturating_add(Weight::from_parts(4_924_564, 0).saturating_mul(c.into())) + // Standard Error: 1_797 + .saturating_add(Weight::from_parts(3_409_775, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs index 3d0d541b45..1a19b58e03 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-bridge-hub-polkadot.json +// --chain=../bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,6 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -59,10 +63,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `38` // Estimated: `3503` - // Minimum execution time: 26_811_000 picoseconds. - Weight::from_parts(27_521_000, 0) + // Minimum execution time: 23_401_000 picoseconds. + Weight::from_parts(24_012_000, 0) .saturating_add(Weight::from_parts(0, 3503)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -71,8 +75,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `1489` - // Minimum execution time: 25_464_000 picoseconds. - Weight::from_parts(26_071_000, 0) + // Minimum execution time: 21_053_000 picoseconds. + Weight::from_parts(21_506_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -102,8 +106,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_318_000 picoseconds. - Weight::from_parts(8_761_000, 0) + // Minimum execution time: 7_074_000 picoseconds. + Weight::from_parts(7_339_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,8 +117,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_422_000 picoseconds. - Weight::from_parts(2_493_000, 0) + // Minimum execution time: 2_277_000 picoseconds. + Weight::from_parts(2_396_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -122,6 +126,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -138,14 +144,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `38` // Estimated: `3503` - // Minimum execution time: 31_189_000 picoseconds. - Weight::from_parts(31_944_000, 0) + // Minimum execution time: 27_192_000 picoseconds. + Weight::from_parts(27_760_000, 0) .saturating_add(Weight::from_parts(0, 3503)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -162,10 +170,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 34_220_000 picoseconds. - Weight::from_parts(35_199_000, 0) + // Minimum execution time: 30_395_000 picoseconds. + Weight::from_parts(31_109_000, 0) .saturating_add(Weight::from_parts(0, 3720)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) @@ -174,8 +182,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_398_000 picoseconds. - Weight::from_parts(2_510_000, 0) + // Minimum execution time: 2_252_000 picoseconds. + Weight::from_parts(2_362_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -185,8 +193,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `95` // Estimated: `10985` - // Minimum execution time: 14_074_000 picoseconds. - Weight::from_parts(14_365_000, 0) + // Minimum execution time: 14_930_000 picoseconds. + Weight::from_parts(15_443_000, 0) .saturating_add(Weight::from_parts(0, 10985)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -197,8 +205,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `99` // Estimated: `10989` - // Minimum execution time: 14_103_000 picoseconds. - Weight::from_parts(14_536_000, 0) + // Minimum execution time: 15_050_000 picoseconds. + Weight::from_parts(15_417_000, 0) .saturating_add(Weight::from_parts(0, 10989)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -209,13 +217,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `13471` - // Minimum execution time: 15_769_000 picoseconds. - Weight::from_parts(16_128_000, 0) + // Minimum execution time: 16_013_000 picoseconds. + Weight::from_parts(16_452_000, 0) .saturating_add(Weight::from_parts(0, 13471)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -230,10 +240,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `6046` - // Minimum execution time: 28_806_000 picoseconds. - Weight::from_parts(29_292_000, 0) + // Minimum execution time: 26_217_000 picoseconds. + Weight::from_parts(26_933_000, 0) .saturating_add(Weight::from_parts(0, 6046)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0) @@ -242,8 +252,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `8551` - // Minimum execution time: 8_012_000 picoseconds. - Weight::from_parts(8_421_000, 0) + // Minimum execution time: 8_570_000 picoseconds. + Weight::from_parts(8_908_000, 0) .saturating_add(Weight::from_parts(0, 8551)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -253,14 +263,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `10996` - // Minimum execution time: 14_574_000 picoseconds. - Weight::from_parts(14_830_000, 0) + // Minimum execution time: 15_561_000 picoseconds. + Weight::from_parts(16_156_000, 0) .saturating_add(Weight::from_parts(0, 10996)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -275,10 +287,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `112` // Estimated: `11002` - // Minimum execution time: 34_888_000 picoseconds. - Weight::from_parts(35_495_000, 0) + // Minimum execution time: 32_705_000 picoseconds. + Weight::from_parts(33_644_000, 0) .saturating_add(Weight::from_parts(0, 11002)) - .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs deleted file mode 100644 index a3d028cca3..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm_benchmarks_fungible.rs +++ /dev/null @@ -1,194 +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_xcm_benchmarks::fungible` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-bridge-hub-polkadot.json")`, DB CACHE: 1024 - -// Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain -// benchmark -// pallet -// --chain=spec-bridge-hub-polkadot.json -// --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic= -// --output=/builds/runtimes/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares - -#![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_xcm_benchmarks::fungible`. -pub struct WeightInfo(PhantomData); -impl pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn withdraw_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `3593` - // Minimum execution time: 23_014_000 picoseconds. - Weight::from_parts(24_248_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `153` - // Estimated: `6196` - // Minimum execution time: 48_380_000 picoseconds. - Weight::from_parts(51_729_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn transfer_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `223` - // Estimated: `6196` - // Minimum execution time: 74_056_000 picoseconds. - Weight::from_parts(76_408_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(8)) - .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`) - fn reserve_asset_deposited() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_reserve_withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 29_892_000 picoseconds. - Weight::from_parts(30_778_000, 0) - .saturating_add(Weight::from_parts(0, 3535)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - fn receive_teleported_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_766_000 picoseconds. - Weight::from_parts(3_831_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn deposit_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `52` - // Estimated: `3593` - // Minimum execution time: 24_739_000 picoseconds. - Weight::from_parts(25_316_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: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn deposit_reserve_asset() -> Weight { - // Proof Size summary in bytes: - // Measured: `122` - // Estimated: `3593` - // Minimum execution time: 51_672_000 picoseconds. - Weight::from_parts(52_770_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn initiate_teleport() -> Weight { - // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_826_000, 0) - .saturating_add(Weight::from_parts(0, 3535)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 7c525dca05..fa9c8f9c79 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -1,190 +1,208 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. +// This file is part of Polkadot. -// Cumulus 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. -// Cumulus 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 Cumulus. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=bridge-hub-polkadot-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::fungible -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --extrinsic=* +// --chain=../bridge-hub-polkadot-chain-spec.json // --steps=50 // --repeat=20 -// --json +// --pallet=pallet_xcm_benchmarks::fungible +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights // --header=./file_header.txt -// --output=./parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs #![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::fungible`. +/// Weight functions for `pallet_xcm_benchmarks::fungible`. 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 { + /// 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 { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 23_862_000 picoseconds. - Weight::from_parts(24_603_000, 3593) + // Minimum execution time: 19_417_000 picoseconds. + Weight::from_parts(19_804_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 { + /// 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 { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 51_101_000 picoseconds. - Weight::from_parts(51_976_000, 6196) + // Minimum execution time: 43_398_000 picoseconds. + Weight::from_parts(44_017_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: `System::Account` (r:2 w:2) - // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn transfer_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `223` - // Estimated: `6196` - // Minimum execution time: 72_983_000 picoseconds. - Weight::from_parts(74_099_000, 6196) - .saturating_add(T::DbWeight::get().reads(8)) + // Estimated: `8799` + // Minimum execution time: 77_534_000 picoseconds. + Weight::from_parts(78_726_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(10)) .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 { + /// 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 { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_reserve_withdraw() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 27_131_000 picoseconds. - Weight::from_parts(28_062_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 49_326_000 picoseconds. + Weight::from_parts(51_094_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } - pub fn receive_teleported_asset() -> Weight { + pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_564_000 picoseconds. - Weight::from_parts(3_738_000, 0) + // Minimum execution time: 3_279_000 picoseconds. + Weight::from_parts(3_401_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // 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 { + /// 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 { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 24_453_000 picoseconds. - Weight::from_parts(25_216_000, 3593) + // Minimum execution time: 19_280_000 picoseconds. + Weight::from_parts(19_761_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: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn deposit_reserve_asset() -> Weight { + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `122` - // Estimated: `3593` - // Minimum execution time: 48_913_000 picoseconds. - Weight::from_parts(50_202_000, 3593) - .saturating_add(T::DbWeight::get().reads(7)) + // Estimated: `6196` + // Minimum execution time: 49_836_000 picoseconds. + Weight::from_parts(50_560_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: `ParachainInfo::ParachainId` (r:1 w:0) - // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - pub fn initiate_teleport() -> Weight { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 27_592_000 picoseconds. - Weight::from_parts(28_099_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) + // Estimated: `3593` + // Minimum execution time: 33_480_000 picoseconds. + Weight::from_parts(34_552_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 79c031b10b..d8834a7ca3 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=cumulus_pallet_xcmp_queue -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 4_735_000 picoseconds. - Weight::from_parts(5_097_000, 0) + // Minimum execution time: 4_103_000 picoseconds. + Weight::from_parts(4_351_000, 0) .saturating_add(Weight::from_parts(0, 1627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 4_801_000 picoseconds. - Weight::from_parts(5_002_000, 0) + // Minimum execution time: 4_125_000 picoseconds. + Weight::from_parts(4_325_000, 0) .saturating_add(Weight::from_parts(0, 1627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs b/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs index b93c45fcd3..b70406f300 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_725_000 picoseconds. - Weight::from_parts(105_975, 0) + // Minimum execution time: 1_769_000 picoseconds. + Weight::from_parts(6_454_049, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(373, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_685_000 picoseconds. - Weight::from_parts(142_725_611, 0) + // Minimum execution time: 5_207_000 picoseconds. + Weight::from_parts(84_231_033, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 10 - .saturating_add(Weight::from_parts(1_584, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_625, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_351_000 picoseconds. - Weight::from_parts(3_552_000, 0) + // Minimum execution time: 3_242_000 picoseconds. + Weight::from_parts(3_588_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164` // Estimated: `1649` - // Minimum execution time: 95_382_034_000 picoseconds. - Weight::from_parts(99_730_421_000, 0) + // Minimum execution time: 114_216_823_000 picoseconds. + Weight::from_parts(120_869_633_000, 0) .saturating_add(Weight::from_parts(0, 1649)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -110,11 +112,11 @@ 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_015_000, 0) + // Minimum execution time: 1_836_000 picoseconds. + Weight::from_parts(1_906_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_064 - .saturating_add(Weight::from_parts(704_797, 0).saturating_mul(i.into())) + // Standard Error: 2_358 + .saturating_add(Weight::from_parts(774_327, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -124,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_917_000 picoseconds. - Weight::from_parts(1_994_000, 0) + // Minimum execution time: 1_840_000 picoseconds. + Weight::from_parts(1_877_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 897 - .saturating_add(Weight::from_parts(538_879, 0).saturating_mul(i.into())) + // Standard Error: 900 + .saturating_add(Weight::from_parts(563_880, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -136,13 +138,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: `82 + p * (69 ±0)` - // Estimated: `78 + p * (70 ±0)` - // Minimum execution time: 3_662_000 picoseconds. - Weight::from_parts(3_713_000, 0) - .saturating_add(Weight::from_parts(0, 78)) - // Standard Error: 1_397 - .saturating_add(Weight::from_parts(1_240_951, 0).saturating_mul(p.into())) + // Measured: `81 + p * (69 ±0)` + // Estimated: `81 + p * (70 ±0)` + // Minimum execution time: 3_617_000 picoseconds. + Weight::from_parts(3_742_000, 0) + .saturating_add(Weight::from_parts(0, 81)) + // Standard Error: 1_580 + .saturating_add(Weight::from_parts(1_183_757, 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/system-parachains/collectives/collectives-polkadot/src/weights/pallet_alliance.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_alliance.rs index fe9822c585..ebe56d7135 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_alliance.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_alliance.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_alliance` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_alliance -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -62,15 +64,15 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439 + m * (32 ±0) + p * (36 ±0)` // Estimated: `6676 + m * (32 ±0) + p * (36 ±0)` - // Minimum execution time: 31_405_000 picoseconds. - Weight::from_parts(31_084_447, 0) + // Minimum execution time: 27_541_000 picoseconds. + Weight::from_parts(26_501_076, 0) .saturating_add(Weight::from_parts(0, 6676)) - // Standard Error: 142 - .saturating_add(Weight::from_parts(2_076, 0).saturating_mul(b.into())) - // Standard Error: 1_489 - .saturating_add(Weight::from_parts(33_497, 0).saturating_mul(m.into())) - // Standard Error: 1_470 - .saturating_add(Weight::from_parts(130_261, 0).saturating_mul(p.into())) + // Standard Error: 155 + .saturating_add(Weight::from_parts(1_699, 0).saturating_mul(b.into())) + // Standard Error: 1_620 + .saturating_add(Weight::from_parts(41_100, 0).saturating_mul(m.into())) + // Standard Error: 1_600 + .saturating_add(Weight::from_parts(165_984, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) @@ -85,11 +87,11 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `868 + m * (64 ±0)` // Estimated: `6676 + m * (64 ±0)` - // Minimum execution time: 27_246_000 picoseconds. - Weight::from_parts(28_180_793, 0) + // Minimum execution time: 25_747_000 picoseconds. + Weight::from_parts(26_539_634, 0) .saturating_add(Weight::from_parts(0, 6676)) - // Standard Error: 971 - .saturating_add(Weight::from_parts(53_699, 0).saturating_mul(m.into())) + // Standard Error: 1_503 + .saturating_add(Weight::from_parts(64_366, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -110,13 +112,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `312 + m * (96 ±0) + p * (36 ±0)` // Estimated: `6676 + m * (97 ±0) + p * (36 ±0)` - // Minimum execution time: 37_895_000 picoseconds. - Weight::from_parts(35_734_904, 0) + // Minimum execution time: 33_675_000 picoseconds. + Weight::from_parts(29_794_245, 0) .saturating_add(Weight::from_parts(0, 6676)) - // Standard Error: 1_006 - .saturating_add(Weight::from_parts(56_849, 0).saturating_mul(m.into())) - // Standard Error: 981 - .saturating_add(Weight::from_parts(117_791, 0).saturating_mul(p.into())) + // Standard Error: 1_663 + .saturating_add(Weight::from_parts(76_731, 0).saturating_mul(m.into())) + // Standard Error: 1_622 + .saturating_add(Weight::from_parts(148_783, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 97).saturating_mul(m.into())) @@ -135,17 +137,19 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. - fn close_early_approved(_b: u32, m: u32, p: u32, ) -> Weight { + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `762 + m * (96 ±0) + p * (41 ±0)` // Estimated: `6676 + m * (97 ±0) + p * (40 ±0)` - // Minimum execution time: 50_320_000 picoseconds. - Weight::from_parts(50_555_846, 0) + // Minimum execution time: 45_057_000 picoseconds. + Weight::from_parts(39_969_457, 0) .saturating_add(Weight::from_parts(0, 6676)) - // Standard Error: 2_192 - .saturating_add(Weight::from_parts(73_309, 0).saturating_mul(m.into())) - // Standard Error: 2_137 - .saturating_add(Weight::from_parts(129_707, 0).saturating_mul(p.into())) + // Standard Error: 289 + .saturating_add(Weight::from_parts(1_338, 0).saturating_mul(b.into())) + // Standard Error: 3_059 + .saturating_add(Weight::from_parts(95_484, 0).saturating_mul(m.into())) + // Standard Error: 2_982 + .saturating_add(Weight::from_parts(185_014, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 97).saturating_mul(m.into())) @@ -171,13 +175,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `518 + m * (96 ±0) + p * (41 ±0)` // Estimated: `6676 + m * (109 ±0) + p * (43 ±0)` - // Minimum execution time: 46_972_000 picoseconds. - Weight::from_parts(50_444_014, 0) + // Minimum execution time: 44_188_000 picoseconds. + Weight::from_parts(38_418_500, 0) .saturating_add(Weight::from_parts(0, 6676)) - // Standard Error: 4_884 - .saturating_add(Weight::from_parts(130_812, 0).saturating_mul(m.into())) - // Standard Error: 4_824 - .saturating_add(Weight::from_parts(154_003, 0).saturating_mul(p.into())) + // Standard Error: 4_327 + .saturating_add(Weight::from_parts(163_142, 0).saturating_mul(m.into())) + // Standard Error: 4_275 + .saturating_add(Weight::from_parts(206_104, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 109).saturating_mul(m.into())) @@ -202,13 +206,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `417 + m * (96 ±0) + p * (36 ±0)` // Estimated: `6676 + m * (96 ±0) + p * (36 ±0)` - // Minimum execution time: 39_870_000 picoseconds. - Weight::from_parts(38_003_802, 0) + // Minimum execution time: 34_952_000 picoseconds. + Weight::from_parts(31_369_845, 0) .saturating_add(Weight::from_parts(0, 6676)) - // Standard Error: 991 - .saturating_add(Weight::from_parts(51_512, 0).saturating_mul(m.into())) - // Standard Error: 955 - .saturating_add(Weight::from_parts(120_021, 0).saturating_mul(p.into())) + // Standard Error: 2_026 + .saturating_add(Weight::from_parts(73_401, 0).saturating_mul(m.into())) + // Standard Error: 1_953 + .saturating_add(Weight::from_parts(152_033, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 96).saturating_mul(m.into())) @@ -224,13 +228,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12` // Estimated: `12362` - // Minimum execution time: 28_091_000 picoseconds. - Weight::from_parts(16_922_218, 0) + // Minimum execution time: 26_263_000 picoseconds. + Weight::from_parts(14_666_996, 0) .saturating_add(Weight::from_parts(0, 12362)) - // Standard Error: 1_246 - .saturating_add(Weight::from_parts(152_217, 0).saturating_mul(m.into())) - // Standard Error: 1_231 - .saturating_add(Weight::from_parts(125_662, 0).saturating_mul(z.into())) + // Standard Error: 1_302 + .saturating_add(Weight::from_parts(154_678, 0).saturating_mul(m.into())) + // Standard Error: 1_287 + .saturating_add(Weight::from_parts(127_234, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -251,17 +255,17 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 50]`. fn disband(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + x * (52 ±0) + y * (53 ±0) + z * (250 ±0)` + // Measured: `0 + x * (51 ±0) + y * (53 ±0) + z * (252 ±0)` // Estimated: `12362 + x * (2539 ±0) + y * (2539 ±0) + z * (2603 ±1)` - // Minimum execution time: 286_663_000 picoseconds. - Weight::from_parts(288_899_000, 0) + // Minimum execution time: 297_271_000 picoseconds. + Weight::from_parts(299_901_000, 0) .saturating_add(Weight::from_parts(0, 12362)) - // Standard Error: 23_244 - .saturating_add(Weight::from_parts(542_070, 0).saturating_mul(x.into())) - // Standard Error: 23_132 - .saturating_add(Weight::from_parts(548_127, 0).saturating_mul(y.into())) - // Standard Error: 46_223 - .saturating_add(Weight::from_parts(14_514_565, 0).saturating_mul(z.into())) + // Standard Error: 24_181 + .saturating_add(Weight::from_parts(559_293, 0).saturating_mul(x.into())) + // Standard Error: 24_064 + .saturating_add(Weight::from_parts(560_126, 0).saturating_mul(y.into())) + // Standard Error: 48_085 + .saturating_add(Weight::from_parts(13_515_780, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) @@ -278,8 +282,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_154_000 picoseconds. - Weight::from_parts(8_415_000, 0) + // Minimum execution time: 5_818_000 picoseconds. + Weight::from_parts(6_067_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -289,8 +293,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `10187` - // Minimum execution time: 11_032_000 picoseconds. - Weight::from_parts(11_289_000, 0) + // Minimum execution time: 7_927_000 picoseconds. + Weight::from_parts(8_271_000, 0) .saturating_add(Weight::from_parts(0, 10187)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -301,8 +305,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149` // Estimated: `10187` - // Minimum execution time: 12_130_000 picoseconds. - Weight::from_parts(12_511_000, 0) + // Minimum execution time: 8_919_000 picoseconds. + Weight::from_parts(9_307_000, 0) .saturating_add(Weight::from_parts(0, 10187)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -319,8 +323,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `294` // Estimated: `18048` - // Minimum execution time: 40_659_000 picoseconds. - Weight::from_parts(41_881_000, 0) + // Minimum execution time: 36_389_000 picoseconds. + Weight::from_parts(37_687_000, 0) .saturating_add(Weight::from_parts(0, 18048)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -333,8 +337,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `193` // Estimated: `18048` - // Minimum execution time: 25_293_000 picoseconds. - Weight::from_parts(26_487_000, 0) + // Minimum execution time: 22_348_000 picoseconds. + Weight::from_parts(22_995_000, 0) .saturating_add(Weight::from_parts(0, 18048)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -351,8 +355,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `236` // Estimated: `12362` - // Minimum execution time: 24_010_000 picoseconds. - Weight::from_parts(24_703_000, 0) + // Minimum execution time: 20_967_000 picoseconds. + Weight::from_parts(21_594_000, 0) .saturating_add(Weight::from_parts(0, 12362)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -371,8 +375,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `236` // Estimated: `23734` - // Minimum execution time: 29_859_000 picoseconds. - Weight::from_parts(30_630_000, 0) + // Minimum execution time: 25_677_000 picoseconds. + Weight::from_parts(27_070_000, 0) .saturating_add(Weight::from_parts(0, 23734)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -389,8 +393,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `517` // Estimated: `6676` - // Minimum execution time: 37_547_000 picoseconds. - Weight::from_parts(38_323_000, 0) + // Minimum execution time: 34_032_000 picoseconds. + Weight::from_parts(34_935_000, 0) .saturating_add(Weight::from_parts(0, 6676)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -405,16 +409,14 @@ impl pallet_alliance::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `AllianceMotion::Members` (r:0 w:1) /// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `AllianceMotion::Prime` (r:0 w:1) @@ -423,11 +425,11 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `643` // Estimated: `18048` - // Minimum execution time: 135_770_000 picoseconds. - Weight::from_parts(139_558_000, 0) + // Minimum execution time: 122_327_000 picoseconds. + Weight::from_parts(126_204_000, 0) .saturating_add(Weight::from_parts(0, 18048)) - .saturating_add(T::DbWeight::get().reads(13)) - .saturating_add(T::DbWeight::get().writes(8)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) } /// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:1) /// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) @@ -439,13 +441,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `27187` - // Minimum execution time: 7_004_000 picoseconds. - Weight::from_parts(7_185_000, 0) + // Minimum execution time: 5_053_000 picoseconds. + Weight::from_parts(5_227_000, 0) .saturating_add(Weight::from_parts(0, 27187)) - // Standard Error: 3_520 - .saturating_add(Weight::from_parts(1_518_451, 0).saturating_mul(n.into())) - // Standard Error: 1_378 - .saturating_add(Weight::from_parts(66_578, 0).saturating_mul(l.into())) + // Standard Error: 3_966 + .saturating_add(Weight::from_parts(1_007_511, 0).saturating_mul(n.into())) + // Standard Error: 1_553 + .saturating_add(Weight::from_parts(71_070, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -459,13 +461,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + l * (100 ±0) + n * (289 ±0)` // Estimated: `27187` - // Minimum execution time: 7_135_000 picoseconds. - Weight::from_parts(7_283_000, 0) + // Minimum execution time: 5_117_000 picoseconds. + Weight::from_parts(5_276_000, 0) .saturating_add(Weight::from_parts(0, 27187)) - // Standard Error: 180_771 - .saturating_add(Weight::from_parts(16_543_666, 0).saturating_mul(n.into())) - // Standard Error: 70_798 - .saturating_add(Weight::from_parts(359_427, 0).saturating_mul(l.into())) + // Standard Error: 186_720 + .saturating_add(Weight::from_parts(17_319_715, 0).saturating_mul(n.into())) + // Standard Error: 73_127 + .saturating_add(Weight::from_parts(268_546, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -481,8 +483,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `236` // Estimated: `18048` - // Minimum execution time: 28_876_000 picoseconds. - Weight::from_parts(29_549_000, 0) + // Minimum execution time: 25_385_000 picoseconds. + Weight::from_parts(26_058_000, 0) .saturating_add(Weight::from_parts(0, 18048)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs index f07cbd35f2..4c858eb977 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_asset_rate.rs @@ -17,23 +17,24 @@ //! Autogenerated weights for `pallet_asset_rate` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-28, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `cob`, CPU: `` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-westend-dev")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/debug/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=collectives-westend-dev -// --steps=2 -// --repeat=2 -// --pallet=pallet-asset-rate +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_asset_rate // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/ +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,8 +53,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `4703` - // Minimum execution time: 102_000_000 picoseconds. - Weight::from_parts(112_000_000, 0) + // Minimum execution time: 10_016_000 picoseconds. + Weight::from_parts(10_321_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `4703` - // Minimum execution time: 101_000_000 picoseconds. - Weight::from_parts(105_000_000, 0) + // Minimum execution time: 10_713_000 picoseconds. + Weight::from_parts(11_065_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -76,8 +77,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `4703` - // Minimum execution time: 112_000_000 picoseconds. - Weight::from_parts(116_000_000, 0) + // Minimum execution time: 11_083_000 picoseconds. + Weight::from_parts(11_579_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/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs index e94aa2f87b..16b63d0cb2 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_balances -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 49_325_000 picoseconds. - Weight::from_parts(50_842_000, 0) + // Minimum execution time: 44_652_000 picoseconds. + Weight::from_parts(45_250_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 37_129_000 picoseconds. - Weight::from_parts(37_999_000, 0) + // Minimum execution time: 35_066_000 picoseconds. + Weight::from_parts(35_483_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,10 +75,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_307_000 picoseconds. - Weight::from_parts(13_886_000, 0) + // Minimum execution time: 13_197_000 picoseconds. + Weight::from_parts(13_792_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -85,10 +87,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 20_162_000 picoseconds. - Weight::from_parts(20_845_000, 0) + // Minimum execution time: 18_630_000 picoseconds. + Weight::from_parts(18_968_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 51_313_000 picoseconds. - Weight::from_parts(52_453_000, 0) + // Minimum execution time: 46_036_000 picoseconds. + Weight::from_parts(46_839_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 46_548_000 picoseconds. - Weight::from_parts(47_150_000, 0) + // Minimum execution time: 43_929_000 picoseconds. + Weight::from_parts(44_576_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -121,10 +123,10 @@ impl pallet_balances::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 15_624_000 picoseconds. - Weight::from_parts(16_191_000, 0) + // Minimum execution time: 15_954_000 picoseconds. + Weight::from_parts(16_276_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 15_847_000 picoseconds. - Weight::from_parts(16_014_000, 0) + // Minimum execution time: 15_377_000 picoseconds. + Weight::from_parts(15_635_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 12_710 - .saturating_add(Weight::from_parts(14_093_441, 0).saturating_mul(u.into())) + // Standard Error: 15_332 + .saturating_add(Weight::from_parts(14_377_132, 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/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs index 8e6ab6386c..195b664455 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_collator_selection -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,13 +54,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `b` is `[1, 20]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `163 + b * (79 ±0)` - // Estimated: `1154 + b * (2555 ±0)` - // Minimum execution time: 13_837_000 picoseconds. - Weight::from_parts(11_211_976, 0) - .saturating_add(Weight::from_parts(0, 1154)) - // Standard Error: 4_725 - .saturating_add(Weight::from_parts(3_089_898, 0).saturating_mul(b.into())) + // Measured: `196 + b * (79 ±0)` + // Estimated: `1187 + b * (2555 ±0)` + // Minimum execution time: 11_664_000 picoseconds. + Weight::from_parts(8_648_056, 0) + .saturating_add(Weight::from_parts(0, 1187)) + // Standard Error: 4_052 + .saturating_add(Weight::from_parts(3_184_759, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -75,15 +77,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn add_invulnerable(b: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `756 + b * (32 ±0) + c * (53 ±0)` + // Measured: `794 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 45_236_000 picoseconds. - Weight::from_parts(46_187_214, 0) + // Minimum execution time: 40_067_000 picoseconds. + Weight::from_parts(34_042_902, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 7_835 - .saturating_add(Weight::from_parts(113_765, 0).saturating_mul(b.into())) - // Standard Error: 1_485 - .saturating_add(Weight::from_parts(125_990, 0).saturating_mul(c.into())) + // Standard Error: 12_915 + .saturating_add(Weight::from_parts(364_580, 0).saturating_mul(b.into())) + // Standard Error: 2_448 + .saturating_add(Weight::from_parts(187_166, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -98,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 15_180_000 picoseconds. - Weight::from_parts(15_228_429, 0) + // Minimum execution time: 11_756_000 picoseconds. + Weight::from_parts(11_402_955, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_991 - .saturating_add(Weight::from_parts(129_508, 0).saturating_mul(b.into())) + // Standard Error: 3_092 + .saturating_add(Weight::from_parts(174_140, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_758_000 picoseconds. - Weight::from_parts(7_137_000, 0) + // Minimum execution time: 4_697_000 picoseconds. + Weight::from_parts(4_915_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,8 +125,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_872_000 picoseconds. - Weight::from_parts(7_059_000, 0) + // Minimum execution time: 4_876_000 picoseconds. + Weight::from_parts(5_073_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,13 +145,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `736 + c * (52 ±0)` + // Measured: `777 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 38_955_000 picoseconds. - Weight::from_parts(43_600_276, 0) + // Minimum execution time: 34_476_000 picoseconds. + Weight::from_parts(37_977_346, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_219 - .saturating_add(Weight::from_parts(151_435, 0).saturating_mul(c.into())) + // Standard Error: 2_207 + .saturating_add(Weight::from_parts(175_956, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -160,16 +162,16 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) - /// The range of component `c` is `[4, 100]`. + /// The range of component `c` is `[3, 100]`. fn leave_intent(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `306 + c * (50 ±0)` + // Measured: `371 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 31_957_000 picoseconds. - Weight::from_parts(35_161_819, 0) + // Minimum execution time: 28_107_000 picoseconds. + Weight::from_parts(29_838_419, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_242 - .saturating_add(Weight::from_parts(128_203, 0).saturating_mul(c.into())) + // Standard Error: 2_226 + .saturating_add(Weight::from_parts(167_782, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -181,10 +183,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn note_author() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `155` // Estimated: `6196` - // Minimum execution time: 40_709_000 picoseconds. - Weight::from_parts(41_276_000, 0) + // Minimum execution time: 38_578_000 picoseconds. + Weight::from_parts(39_502_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -203,13 +205,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 100]`. fn new_session(r: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2243 + c * (97 ±0) + r * (112 ±0)` + // Measured: `2300 + c * (97 ±0) + r * (115 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 16_402_000 picoseconds. - Weight::from_parts(16_647_000, 0) + // Minimum execution time: 15_769_000 picoseconds. + Weight::from_parts(16_019_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 327_066 - .saturating_add(Weight::from_parts(14_185_504, 0).saturating_mul(c.into())) + // Standard Error: 294_706 + .saturating_add(Weight::from_parts(12_732_819, 0).saturating_mul(c.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().writes(1)) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collective.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collective.rs index faf725d69f..edcf19a710 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collective.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collective.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_collective -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,14 +61,14 @@ impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15691 + m * (1967 ±23) + p * (4332 ±23)` - // Minimum execution time: 15_787_000 picoseconds. - Weight::from_parts(16_030_000, 0) + // Estimated: `15691 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 14_960_000 picoseconds. + Weight::from_parts(15_265_000, 0) .saturating_add(Weight::from_parts(0, 15691)) - // Standard Error: 53_046 - .saturating_add(Weight::from_parts(4_123_094, 0).saturating_mul(m.into())) - // Standard Error: 53_046 - .saturating_add(Weight::from_parts(7_319_163, 0).saturating_mul(p.into())) + // Standard Error: 59_824 + .saturating_add(Weight::from_parts(4_547_714, 0).saturating_mul(m.into())) + // Standard Error: 59_824 + .saturating_add(Weight::from_parts(7_901_476, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -82,13 +84,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + m * (32 ±0)` // Estimated: `1518 + m * (32 ±0)` - // Minimum execution time: 13_856_000 picoseconds. - Weight::from_parts(12_951_023, 0) + // Minimum execution time: 12_059_000 picoseconds. + Weight::from_parts(11_114_331, 0) .saturating_add(Weight::from_parts(0, 1518)) - // Standard Error: 23 - .saturating_add(Weight::from_parts(1_663, 0).saturating_mul(b.into())) - // Standard Error: 240 - .saturating_add(Weight::from_parts(13_854, 0).saturating_mul(m.into())) + // Standard Error: 28 + .saturating_add(Weight::from_parts(1_864, 0).saturating_mul(b.into())) + // Standard Error: 292 + .saturating_add(Weight::from_parts(13_330, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -102,13 +104,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + m * (32 ±0)` // Estimated: `3498 + m * (32 ±0)` - // Minimum execution time: 16_413_000 picoseconds. - Weight::from_parts(15_767_489, 0) + // Minimum execution time: 14_514_000 picoseconds. + Weight::from_parts(13_697_404, 0) .saturating_add(Weight::from_parts(0, 3498)) - // Standard Error: 30 - .saturating_add(Weight::from_parts(1_437, 0).saturating_mul(b.into())) - // Standard Error: 314 - .saturating_add(Weight::from_parts(20_646, 0).saturating_mul(m.into())) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_392, 0).saturating_mul(b.into())) + // Standard Error: 256 + .saturating_add(Weight::from_parts(22_422, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -129,15 +131,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `322 + m * (32 ±0) + p * (36 ±0)` // Estimated: `3714 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 22_643_000 picoseconds. - Weight::from_parts(22_731_439, 0) + // Minimum execution time: 19_091_000 picoseconds. + Weight::from_parts(16_654_566, 0) .saturating_add(Weight::from_parts(0, 3714)) - // Standard Error: 92 - .saturating_add(Weight::from_parts(2_784, 0).saturating_mul(b.into())) - // Standard Error: 963 - .saturating_add(Weight::from_parts(24_383, 0).saturating_mul(m.into())) - // Standard Error: 951 - .saturating_add(Weight::from_parts(190_955, 0).saturating_mul(p.into())) + // Standard Error: 104 + .saturating_add(Weight::from_parts(4_051, 0).saturating_mul(b.into())) + // Standard Error: 1_093 + .saturating_add(Weight::from_parts(32_997, 0).saturating_mul(m.into())) + // Standard Error: 1_079 + .saturating_add(Weight::from_parts(203_907, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) @@ -152,11 +154,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `771 + m * (64 ±0)` // Estimated: `4235 + m * (64 ±0)` - // Minimum execution time: 24_579_000 picoseconds. - Weight::from_parts(25_427_099, 0) + // Minimum execution time: 22_498_000 picoseconds. + Weight::from_parts(23_225_054, 0) .saturating_add(Weight::from_parts(0, 4235)) - // Standard Error: 597 - .saturating_add(Weight::from_parts(38_590, 0).saturating_mul(m.into())) + // Standard Error: 1_155 + .saturating_add(Weight::from_parts(53_991, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -175,13 +177,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `360 + m * (64 ±0) + p * (36 ±0)` // Estimated: `3805 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 26_360_000 picoseconds. - Weight::from_parts(26_247_397, 0) + // Minimum execution time: 22_480_000 picoseconds. + Weight::from_parts(21_819_723, 0) .saturating_add(Weight::from_parts(0, 3805)) - // Standard Error: 702 - .saturating_add(Weight::from_parts(24_725, 0).saturating_mul(m.into())) - // Standard Error: 685 - .saturating_add(Weight::from_parts(177_045, 0).saturating_mul(p.into())) + // Standard Error: 1_041 + .saturating_add(Weight::from_parts(31_522, 0).saturating_mul(m.into())) + // Standard Error: 1_015 + .saturating_add(Weight::from_parts(181_811, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) @@ -202,15 +204,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `662 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` // Estimated: `3979 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 37_541_000 picoseconds. - Weight::from_parts(36_862_256, 0) + // Minimum execution time: 32_639_000 picoseconds. + Weight::from_parts(32_679_792, 0) .saturating_add(Weight::from_parts(0, 3979)) - // Standard Error: 120 - .saturating_add(Weight::from_parts(2_409, 0).saturating_mul(b.into())) - // Standard Error: 1_268 - .saturating_add(Weight::from_parts(21_299, 0).saturating_mul(m.into())) - // Standard Error: 1_236 - .saturating_add(Weight::from_parts(211_996, 0).saturating_mul(p.into())) + // Standard Error: 145 + .saturating_add(Weight::from_parts(2_400, 0).saturating_mul(b.into())) + // Standard Error: 1_541 + .saturating_add(Weight::from_parts(16_301, 0).saturating_mul(m.into())) + // Standard Error: 1_502 + .saturating_add(Weight::from_parts(210_880, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -233,13 +235,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `458 + m * (48 ±0) + p * (36 ±0)` // Estimated: `3898 + m * (49 ±0) + p * (36 ±0)` - // Minimum execution time: 28_074_000 picoseconds. - Weight::from_parts(27_429_040, 0) + // Minimum execution time: 23_296_000 picoseconds. + Weight::from_parts(23_740_827, 0) .saturating_add(Weight::from_parts(0, 3898)) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(30_135, 0).saturating_mul(m.into())) - // Standard Error: 975 - .saturating_add(Weight::from_parts(188_599, 0).saturating_mul(p.into())) + // Standard Error: 1_032 + .saturating_add(Weight::from_parts(21_513, 0).saturating_mul(m.into())) + // Standard Error: 1_006 + .saturating_add(Weight::from_parts(190_760, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 49).saturating_mul(m.into())) @@ -262,15 +264,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `682 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` // Estimated: `3999 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 39_890_000 picoseconds. - Weight::from_parts(39_324_725, 0) + // Minimum execution time: 34_250_000 picoseconds. + Weight::from_parts(31_157_074, 0) .saturating_add(Weight::from_parts(0, 3999)) - // Standard Error: 120 - .saturating_add(Weight::from_parts(2_243, 0).saturating_mul(b.into())) - // Standard Error: 1_277 - .saturating_add(Weight::from_parts(24_652, 0).saturating_mul(m.into())) - // Standard Error: 1_244 - .saturating_add(Weight::from_parts(214_876, 0).saturating_mul(p.into())) + // Standard Error: 136 + .saturating_add(Weight::from_parts(3_855, 0).saturating_mul(b.into())) + // Standard Error: 1_444 + .saturating_add(Weight::from_parts(31_008, 0).saturating_mul(m.into())) + // Standard Error: 1_407 + .saturating_add(Weight::from_parts(226_544, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -288,11 +290,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `189 + p * (32 ±0)` // Estimated: `1674 + p * (32 ±0)` - // Minimum execution time: 13_292_000 picoseconds. - Weight::from_parts(14_257_699, 0) + // Minimum execution time: 11_498_000 picoseconds. + Weight::from_parts(12_293_352, 0) .saturating_add(Weight::from_parts(0, 1674)) - // Standard Error: 656 - .saturating_add(Weight::from_parts(154_225, 0).saturating_mul(p.into())) + // Standard Error: 532 + .saturating_add(Weight::from_parts(162_448, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_core_fellowship.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_core_fellowship.rs index 0f3235fe97..89e80446ee 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_core_fellowship.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_core_fellowship.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_core_fellowship` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_core_fellowship -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_633_000 picoseconds. - Weight::from_parts(7_952_000, 0) + // Minimum execution time: 5_713_000 picoseconds. + Weight::from_parts(6_123_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -72,8 +74,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `66111` // Estimated: `69046` - // Minimum execution time: 121_613_000 picoseconds. - Weight::from_parts(123_698_000, 0) + // Minimum execution time: 117_768_000 picoseconds. + Weight::from_parts(119_729_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -94,8 +96,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `66221` // Estimated: `69046` - // Minimum execution time: 126_705_000 picoseconds. - Weight::from_parts(129_211_000, 0) + // Minimum execution time: 121_741_000 picoseconds. + Weight::from_parts(124_073_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -108,8 +110,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `460` // Estimated: `3514` - // Minimum execution time: 17_723_000 picoseconds. - Weight::from_parts(18_088_000, 0) + // Minimum execution time: 16_038_000 picoseconds. + Weight::from_parts(16_521_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -128,8 +130,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `218` // Estimated: `3514` - // Minimum execution time: 26_995_000 picoseconds. - Weight::from_parts(27_987_000, 0) + // Minimum execution time: 24_393_000 picoseconds. + Weight::from_parts(25_210_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -152,8 +154,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `66089` // Estimated: `69046` - // Minimum execution time: 121_835_000 picoseconds. - Weight::from_parts(124_275_000, 0) + // Minimum execution time: 117_743_000 picoseconds. + Weight::from_parts(120_083_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) @@ -168,8 +170,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `431` // Estimated: `3514` - // Minimum execution time: 18_716_000 picoseconds. - Weight::from_parts(19_512_000, 0) + // Minimum execution time: 16_957_000 picoseconds. + Weight::from_parts(17_554_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -182,8 +184,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `385` // Estimated: `3514` - // Minimum execution time: 16_836_000 picoseconds. - Weight::from_parts(17_432_000, 0) + // Minimum execution time: 14_942_000 picoseconds. + Weight::from_parts(15_213_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -198,8 +200,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `66067` // Estimated: `69046` - // Minimum execution time: 109_089_000 picoseconds. - Weight::from_parts(112_253_000, 0) + // Minimum execution time: 105_255_000 picoseconds. + Weight::from_parts(107_742_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -212,8 +214,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `151` // Estimated: `69046` - // Minimum execution time: 90_477_000 picoseconds. - Weight::from_parts(94_379_000, 0) + // Minimum execution time: 89_506_000 picoseconds. + Weight::from_parts(91_022_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_multisig.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_multisig.rs index 4215ec1661..4f778a6e8b 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_multisig.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_multisig.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_multisig -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_704_000 picoseconds. - Weight::from_parts(13_421_123, 0) + // Minimum execution time: 12_887_000 picoseconds. + Weight::from_parts(13_479_654, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 4 - .saturating_add(Weight::from_parts(510, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(569, 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`) @@ -62,15 +64,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `328 + s * (2 ±0)` + // Measured: `329 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 41_798_000 picoseconds. - Weight::from_parts(30_802_404, 0) + // Minimum execution time: 38_559_000 picoseconds. + Weight::from_parts(27_129_749, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 862 - .saturating_add(Weight::from_parts(120_213, 0).saturating_mul(s.into())) + // Standard Error: 843 + .saturating_add(Weight::from_parts(124_005, 0).saturating_mul(s.into())) // Standard Error: 8 - .saturating_add(Weight::from_parts(1_513, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_540, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `6811` - // Minimum execution time: 27_570_000 picoseconds. - Weight::from_parts(18_394_275, 0) + // Minimum execution time: 26_424_000 picoseconds. + Weight::from_parts(16_749_297, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 653 - .saturating_add(Weight::from_parts(106_317, 0).saturating_mul(s.into())) + // Standard Error: 622 + .saturating_add(Weight::from_parts(109_811, 0).saturating_mul(s.into())) // Standard Error: 6 - .saturating_add(Weight::from_parts(1_445, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_453, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,15 +102,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `451 + s * (33 ±0)` + // Measured: `454 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 47_198_000 picoseconds. - Weight::from_parts(34_618_700, 0) + // Minimum execution time: 44_862_000 picoseconds. + Weight::from_parts(30_821_976, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 988 - .saturating_add(Weight::from_parts(147_095, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_506, 0).saturating_mul(z.into())) + // Standard Error: 1_361 + .saturating_add(Weight::from_parts(158_092, 0).saturating_mul(s.into())) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_614, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `329 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 29_183_000 picoseconds. - Weight::from_parts(30_398_232, 0) + // Minimum execution time: 26_349_000 picoseconds. + Weight::from_parts(27_224_738, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 748 - .saturating_add(Weight::from_parts(119_708, 0).saturating_mul(s.into())) + // Standard Error: 798 + .saturating_add(Weight::from_parts(118_342, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -134,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `6811` - // Minimum execution time: 16_660_000 picoseconds. - Weight::from_parts(17_390_280, 0) + // Minimum execution time: 15_136_000 picoseconds. + Weight::from_parts(15_789_471, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 474 - .saturating_add(Weight::from_parts(101_252, 0).saturating_mul(s.into())) + // Standard Error: 560 + .saturating_add(Weight::from_parts(104_939, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `520 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 30_254_000 picoseconds. - Weight::from_parts(31_634_467, 0) + // Minimum execution time: 28_449_000 picoseconds. + Weight::from_parts(29_021_812, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 739 - .saturating_add(Weight::from_parts(115_338, 0).saturating_mul(s.into())) + // Standard Error: 820 + .saturating_add(Weight::from_parts(122_899, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs index 0e50acf71b..73f803b709 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_preimage -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,25 +47,31 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `177` + // Measured: `76` // Estimated: `3556` - // Minimum execution time: 27_248_000 picoseconds. - Weight::from_parts(27_613_000, 0) + // Minimum execution time: 43_214_000 picoseconds. + Weight::from_parts(43_710_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_274, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_444, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. @@ -71,16 +79,18 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 14_492_000 picoseconds. - Weight::from_parts(14_751_000, 0) + // Minimum execution time: 15_453_000 picoseconds. + Weight::from_parts(15_603_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_286, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_455, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. @@ -88,147 +98,168 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 13_835_000 picoseconds. - Weight::from_parts(165_415_993, 0) + // Minimum execution time: 13_909_000 picoseconds. + Weight::from_parts(14_235_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(2_032, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_455, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `323` + // Measured: `277` // Estimated: `3556` - // Minimum execution time: 39_925_000 picoseconds. - Weight::from_parts(43_216_000, 0) + // Minimum execution time: 54_876_000 picoseconds. + Weight::from_parts(61_794_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 24_156_000 picoseconds. - Weight::from_parts(26_922_000, 0) + // Minimum execution time: 35_478_000 picoseconds. + Weight::from_parts(38_430_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3556` - // Minimum execution time: 23_242_000 picoseconds. - Weight::from_parts(24_708_000, 0) + // Minimum execution time: 30_895_000 picoseconds. + Weight::from_parts(35_053_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 13_106_000 picoseconds. - Weight::from_parts(13_702_000, 0) + // Minimum execution time: 16_519_000 picoseconds. + Weight::from_parts(22_095_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3556` - // Minimum execution time: 14_780_000 picoseconds. - Weight::from_parts(16_256_000, 0) + // Minimum execution time: 18_684_000 picoseconds. + Weight::from_parts(24_865_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 8_060_000 picoseconds. - Weight::from_parts(8_275_000, 0) + // Minimum execution time: 10_091_000 picoseconds. + Weight::from_parts(12_251_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `Preimage::PreimageFor` (r:0 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 21_829_000 picoseconds. - Weight::from_parts(24_130_000, 0) + // Minimum execution time: 25_064_000 picoseconds. + Weight::from_parts(31_827_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 8_001_000 picoseconds. - Weight::from_parts(8_253_000, 0) + // Minimum execution time: 11_377_000 picoseconds. + Weight::from_parts(12_477_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 7_979_000 picoseconds. - Weight::from_parts(8_297_000, 0) + // Minimum execution time: 11_256_000 picoseconds. + Weight::from_parts(12_252_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Preimage::StatusFor` (r:1024 w:1024) + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:1023 w:1023) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Preimage::RequestStatusFor` (r:0 w:1024) - /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 1024]`. + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. fn ensure_updated(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `193 + n * (91 ±0)` - // Estimated: `3593 + n * (2566 ±0)` - // Minimum execution time: 2_452_000 picoseconds. - Weight::from_parts(2_641_000, 3593) - // Standard Error: 19_797 - .saturating_add(Weight::from_parts(15_620_946, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into())) + // Measured: `0 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 49_289_000 picoseconds. + Weight::from_parts(49_778_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 56_947 + .saturating_add(Weight::from_parts(51_339_750, 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/system-parachains/collectives/collectives-polkadot/src/weights/pallet_proxy.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_proxy.rs index d7f3f87294..069c6500d8 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_proxy.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_proxy.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_proxy -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +54,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 14_630_000 picoseconds. - Weight::from_parts(15_118_485, 0) + // Minimum execution time: 12_982_000 picoseconds. + Weight::from_parts(13_620_619, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 921 - .saturating_add(Weight::from_parts(37_232, 0).saturating_mul(p.into())) + // Standard Error: 892 + .saturating_add(Weight::from_parts(34_000, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -71,13 +73,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 34_517_000 picoseconds. - Weight::from_parts(34_816_219, 0) + // Minimum execution time: 31_960_000 picoseconds. + Weight::from_parts(31_819_263, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_506 - .saturating_add(Weight::from_parts(106_036, 0).saturating_mul(a.into())) - // Standard Error: 2_590 - .saturating_add(Weight::from_parts(41_866, 0).saturating_mul(p.into())) + // Standard Error: 3_692 + .saturating_add(Weight::from_parts(145_818, 0).saturating_mul(a.into())) + // Standard Error: 3_814 + .saturating_add(Weight::from_parts(45_228, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,13 +93,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 22_502_000 picoseconds. - Weight::from_parts(23_084_876, 0) + // Minimum execution time: 21_560_000 picoseconds. + Weight::from_parts(21_987_021, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_298 - .saturating_add(Weight::from_parts(100_171, 0).saturating_mul(a.into())) - // Standard Error: 1_342 - .saturating_add(Weight::from_parts(12_886, 0).saturating_mul(p.into())) + // Standard Error: 1_605 + .saturating_add(Weight::from_parts(132_279, 0).saturating_mul(a.into())) + // Standard Error: 1_659 + .saturating_add(Weight::from_parts(9_574, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -111,13 +113,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 22_400_000 picoseconds. - Weight::from_parts(22_734_274, 0) + // Minimum execution time: 21_391_000 picoseconds. + Weight::from_parts(22_213_793, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_608 - .saturating_add(Weight::from_parts(109_640, 0).saturating_mul(a.into())) - // Standard Error: 1_662 - .saturating_add(Weight::from_parts(17_597, 0).saturating_mul(p.into())) + // Standard Error: 1_264 + .saturating_add(Weight::from_parts(124_417, 0).saturating_mul(a.into())) + // Standard Error: 1_306 + .saturating_add(Weight::from_parts(8_471, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -133,13 +135,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `386 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 31_444_000 picoseconds. - Weight::from_parts(31_647_483, 0) + // Minimum execution time: 29_336_000 picoseconds. + Weight::from_parts(29_591_544, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_610 - .saturating_add(Weight::from_parts(101_484, 0).saturating_mul(a.into())) - // Standard Error: 1_664 - .saturating_add(Weight::from_parts(39_575, 0).saturating_mul(p.into())) + // Standard Error: 1_479 + .saturating_add(Weight::from_parts(128_144, 0).saturating_mul(a.into())) + // Standard Error: 1_528 + .saturating_add(Weight::from_parts(28_663, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -150,11 +152,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 23_288_000 picoseconds. - Weight::from_parts(23_980_841, 0) + // Minimum execution time: 21_046_000 picoseconds. + Weight::from_parts(21_735_935, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(40_655, 0).saturating_mul(p.into())) + // Standard Error: 989 + .saturating_add(Weight::from_parts(43_907, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -165,11 +167,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 23_172_000 picoseconds. - Weight::from_parts(24_035_959, 0) + // Minimum execution time: 21_035_000 picoseconds. + Weight::from_parts(21_732_356, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_690 - .saturating_add(Weight::from_parts(41_273, 0).saturating_mul(p.into())) + // Standard Error: 2_214 + .saturating_add(Weight::from_parts(49_384, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,11 +182,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 20_636_000 picoseconds. - Weight::from_parts(21_328_202, 0) + // Minimum execution time: 19_580_000 picoseconds. + Weight::from_parts(20_292_930, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_111 - .saturating_add(Weight::from_parts(36_051, 0).saturating_mul(p.into())) + // Standard Error: 960 + .saturating_add(Weight::from_parts(27_681, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -195,11 +197,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 24_717_000 picoseconds. - Weight::from_parts(25_497_207, 0) + // Minimum execution time: 22_022_000 picoseconds. + Weight::from_parts(22_774_595, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_090 - .saturating_add(Weight::from_parts(1_646, 0).saturating_mul(p.into())) + // Standard Error: 1_199 + .saturating_add(Weight::from_parts(13_226, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -210,11 +212,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 21_118_000 picoseconds. - Weight::from_parts(22_058_659, 0) + // Minimum execution time: 20_282_000 picoseconds. + Weight::from_parts(21_156_547, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_409 - .saturating_add(Weight::from_parts(29_926, 0).saturating_mul(p.into())) + // Standard Error: 2_288 + .saturating_add(Weight::from_parts(30_661, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs index a6db0da4ee..1d6c10b05c 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_ranked_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_ranked_collective -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +59,8 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `142` // Estimated: `3507` - // Minimum execution time: 14_798_000 picoseconds. - Weight::from_parts(15_249_000, 0) + // Minimum execution time: 13_531_000 picoseconds. + Weight::from_parts(14_033_000, 0) .saturating_add(Weight::from_parts(0, 3507)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -76,11 +78,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `617 + r * (281 ±0)` // Estimated: `3519 + r * (2529 ±0)` - // Minimum execution time: 26_635_000 picoseconds. - Weight::from_parts(29_004_020, 0) + // Minimum execution time: 25_700_000 picoseconds. + Weight::from_parts(27_468_337, 0) .saturating_add(Weight::from_parts(0, 3519)) - // Standard Error: 23_781 - .saturating_add(Weight::from_parts(12_355_962, 0).saturating_mul(r.into())) + // Standard Error: 24_947 + .saturating_add(Weight::from_parts(12_738_783, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -100,11 +102,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `314 + r * (17 ±0)` // Estimated: `3507` - // Minimum execution time: 18_667_000 picoseconds. - Weight::from_parts(19_353_316, 0) + // Minimum execution time: 17_256_000 picoseconds. + Weight::from_parts(18_172_177, 0) .saturating_add(Weight::from_parts(0, 3507)) - // Standard Error: 4_267 - .saturating_add(Weight::from_parts(366_919, 0).saturating_mul(r.into())) + // Standard Error: 4_359 + .saturating_add(Weight::from_parts(332_156, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -121,11 +123,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `632 + r * (72 ±0)` // Estimated: `3519` - // Minimum execution time: 27_165_000 picoseconds. - Weight::from_parts(29_552_262, 0) + // Minimum execution time: 25_302_000 picoseconds. + Weight::from_parts(27_524_429, 0) .saturating_add(Weight::from_parts(0, 3519)) - // Standard Error: 16_427 - .saturating_add(Weight::from_parts(597_520, 0).saturating_mul(r.into())) + // Standard Error: 14_804 + .saturating_add(Weight::from_parts(595_014, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -141,8 +143,8 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `666` // Estimated: `317568` - // Minimum execution time: 45_315_000 picoseconds. - Weight::from_parts(46_311_000, 0) + // Minimum execution time: 39_548_000 picoseconds. + Weight::from_parts(40_340_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -158,11 +160,11 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `500 + n * (50 ±0)` // Estimated: `4365 + n * (2540 ±0)` - // Minimum execution time: 14_635_000 picoseconds. - Weight::from_parts(17_770_637, 0) + // Minimum execution time: 14_234_000 picoseconds. + Weight::from_parts(17_323_539, 0) .saturating_add(Weight::from_parts(0, 4365)) - // Standard Error: 2_134 - .saturating_add(Weight::from_parts(1_213_582, 0).saturating_mul(n.into())) + // Standard Error: 2_128 + .saturating_add(Weight::from_parts(1_139_336, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_referenda.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_referenda.rs index 3cfd1f69ba..4e2432415e 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_referenda.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_referenda.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_referenda -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +59,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `355` // Estimated: `159279` - // Minimum execution time: 27_586_000 picoseconds. - Weight::from_parts(28_816_000, 0) + // Minimum execution time: 23_089_000 picoseconds. + Weight::from_parts(24_037_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -71,8 +73,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `366` // Estimated: `317568` - // Minimum execution time: 49_242_000 picoseconds. - Weight::from_parts(50_473_000, 0) + // Minimum execution time: 43_814_000 picoseconds. + Weight::from_parts(44_913_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -89,8 +91,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2004` // Estimated: `159279` - // Minimum execution time: 100_408_000 picoseconds. - Weight::from_parts(105_688_000, 0) + // Minimum execution time: 100_135_000 picoseconds. + Weight::from_parts(105_333_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -107,8 +109,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2045` // Estimated: `159279` - // Minimum execution time: 102_472_000 picoseconds. - Weight::from_parts(108_264_000, 0) + // Minimum execution time: 97_668_000 picoseconds. + Weight::from_parts(102_862_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -125,8 +127,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `802` // Estimated: `317568` - // Minimum execution time: 154_541_000 picoseconds. - Weight::from_parts(190_710_000, 0) + // Minimum execution time: 168_820_000 picoseconds. + Weight::from_parts(178_524_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -143,8 +145,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `701` // Estimated: `317568` - // Minimum execution time: 62_005_000 picoseconds. - Weight::from_parts(63_073_000, 0) + // Minimum execution time: 55_337_000 picoseconds. + Weight::from_parts(57_091_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -155,8 +157,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `317` // Estimated: `4365` - // Minimum execution time: 28_900_000 picoseconds. - Weight::from_parts(29_729_000, 0) + // Minimum execution time: 26_607_000 picoseconds. + Weight::from_parts(27_369_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -167,8 +169,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `167` // Estimated: `4365` - // Minimum execution time: 14_624_000 picoseconds. - Weight::from_parts(15_271_000, 0) + // Minimum execution time: 13_308_000 picoseconds. + Weight::from_parts(13_759_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -181,8 +183,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `311` // Estimated: `317568` - // Minimum execution time: 35_905_000 picoseconds. - Weight::from_parts(36_860_000, 0) + // Minimum execution time: 31_278_000 picoseconds. + Weight::from_parts(32_103_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -195,27 +197,25 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `FellowshipReferenda::MetadataOf` (r:1 w:0) /// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn kill() -> Weight { // Proof Size summary in bytes: - // Measured: `517` + // Measured: `569` // Estimated: `317568` - // Minimum execution time: 148_386_000 picoseconds. - Weight::from_parts(153_623_000, 0) + // Minimum execution time: 130_351_000 picoseconds. + Weight::from_parts(134_019_000, 0) .saturating_add(Weight::from_parts(0, 317568)) - .saturating_add(T::DbWeight::get().reads(11)) - .saturating_add(T::DbWeight::get().writes(6)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:0) /// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`) @@ -225,8 +225,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `4277` - // Minimum execution time: 10_102_000 picoseconds. - Weight::from_parts(10_482_000, 0) + // Minimum execution time: 10_215_000 picoseconds. + Weight::from_parts(10_723_000, 0) .saturating_add(Weight::from_parts(0, 4277)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -243,8 +243,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2418` // Estimated: `159279` - // Minimum execution time: 90_510_000 picoseconds. - Weight::from_parts(94_189_000, 0) + // Minimum execution time: 86_205_000 picoseconds. + Weight::from_parts(93_510_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -261,8 +261,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2418` // Estimated: `159279` - // Minimum execution time: 93_086_000 picoseconds. - Weight::from_parts(98_597_000, 0) + // Minimum execution time: 85_580_000 picoseconds. + Weight::from_parts(95_833_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -275,8 +275,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1807` // Estimated: `4365` - // Minimum execution time: 47_440_000 picoseconds. - Weight::from_parts(49_976_000, 0) + // Minimum execution time: 44_739_000 picoseconds. + Weight::from_parts(47_384_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -289,8 +289,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1774` // Estimated: `4365` - // Minimum execution time: 47_507_000 picoseconds. - Weight::from_parts(50_019_000, 0) + // Minimum execution time: 44_788_000 picoseconds. + Weight::from_parts(51_555_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -305,8 +305,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1790` // Estimated: `4365` - // Minimum execution time: 55_361_000 picoseconds. - Weight::from_parts(57_870_000, 0) + // Minimum execution time: 52_208_000 picoseconds. + Weight::from_parts(54_591_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -321,8 +321,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1831` // Estimated: `4365` - // Minimum execution time: 53_908_000 picoseconds. - Weight::from_parts(56_869_000, 0) + // Minimum execution time: 52_828_000 picoseconds. + Weight::from_parts(57_429_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -335,8 +335,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263` // Estimated: `159279` - // Minimum execution time: 23_576_000 picoseconds. - Weight::from_parts(24_115_000, 0) + // Minimum execution time: 21_324_000 picoseconds. + Weight::from_parts(21_786_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -349,8 +349,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `311` // Estimated: `159279` - // Minimum execution time: 23_848_000 picoseconds. - Weight::from_parts(24_636_000, 0) + // Minimum execution time: 21_708_000 picoseconds. + Weight::from_parts(22_271_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -361,8 +361,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `208` // Estimated: `4365` - // Minimum execution time: 16_442_000 picoseconds. - Weight::from_parts(17_040_000, 0) + // Minimum execution time: 14_662_000 picoseconds. + Weight::from_parts(15_059_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -379,8 +379,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `646` // Estimated: `159279` - // Minimum execution time: 35_110_000 picoseconds. - Weight::from_parts(36_527_000, 0) + // Minimum execution time: 31_947_000 picoseconds. + Weight::from_parts(32_466_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -397,8 +397,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `747` // Estimated: `159279` - // Minimum execution time: 87_984_000 picoseconds. - Weight::from_parts(91_326_000, 0) + // Minimum execution time: 82_107_000 picoseconds. + Weight::from_parts(89_206_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -413,8 +413,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `800` // Estimated: `159279` - // Minimum execution time: 133_866_000 picoseconds. - Weight::from_parts(143_318_000, 0) + // Minimum execution time: 133_206_000 picoseconds. + Weight::from_parts(142_390_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -429,8 +429,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `783` // Estimated: `159279` - // Minimum execution time: 116_149_000 picoseconds. - Weight::from_parts(144_340_000, 0) + // Minimum execution time: 125_274_000 picoseconds. + Weight::from_parts(143_262_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -445,8 +445,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `800` // Estimated: `159279` - // Minimum execution time: 128_811_000 picoseconds. - Weight::from_parts(137_503_000, 0) + // Minimum execution time: 129_421_000 picoseconds. + Weight::from_parts(139_819_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -461,8 +461,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `804` // Estimated: `159279` - // Minimum execution time: 72_641_000 picoseconds. - Weight::from_parts(78_413_000, 0) + // Minimum execution time: 69_460_000 picoseconds. + Weight::from_parts(74_804_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -479,8 +479,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `804` // Estimated: `317568` - // Minimum execution time: 152_637_000 picoseconds. - Weight::from_parts(162_601_000, 0) + // Minimum execution time: 148_027_000 picoseconds. + Weight::from_parts(167_204_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -495,8 +495,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `800` // Estimated: `159279` - // Minimum execution time: 142_391_000 picoseconds. - Weight::from_parts(146_534_000, 0) + // Minimum execution time: 146_680_000 picoseconds. + Weight::from_parts(160_076_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -505,16 +505,18 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// Storage: `FellowshipReferenda::MetadataOf` (r:0 w:1) /// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn set_some_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `386` // Estimated: `4365` - // Minimum execution time: 20_314_000 picoseconds. - Weight::from_parts(21_013_000, 0) + // Minimum execution time: 20_099_000 picoseconds. + Weight::from_parts(21_021_000, 0) .saturating_add(Weight::from_parts(0, 4365)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0) @@ -525,8 +527,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `285` // Estimated: `4365` - // Minimum execution time: 18_118_000 picoseconds. - Weight::from_parts(18_665_000, 0) + // Minimum execution time: 15_921_000 picoseconds. + Weight::from_parts(16_761_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_salary.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_salary.rs index 854fdac7c3..efc9235618 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_salary.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_salary.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_salary` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_salary -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1541` - // Minimum execution time: 9_957_000 picoseconds. - Weight::from_parts(10_384_000, 0) + // Minimum execution time: 6_935_000 picoseconds. + Weight::from_parts(7_418_000, 0) .saturating_add(Weight::from_parts(0, 1541)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `224` // Estimated: `1541` - // Minimum execution time: 12_334_000 picoseconds. - Weight::from_parts(12_726_000, 0) + // Minimum execution time: 9_209_000 picoseconds. + Weight::from_parts(9_590_000, 0) .saturating_add(Weight::from_parts(0, 1541)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,8 +81,8 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `395` // Estimated: `3551` - // Minimum execution time: 17_691_000 picoseconds. - Weight::from_parts(18_143_000, 0) + // Minimum execution time: 15_884_000 picoseconds. + Weight::from_parts(16_295_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -95,8 +97,8 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `462` // Estimated: `3551` - // Minimum execution time: 21_095_000 picoseconds. - Weight::from_parts(21_629_000, 0) + // Minimum execution time: 18_416_000 picoseconds. + Weight::from_parts(18_932_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -111,6 +113,8 @@ impl pallet_salary::WeightInfo for WeightInfo { /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -129,10 +133,10 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `703` // Estimated: `4168` - // Minimum execution time: 54_727_000 picoseconds. - Weight::from_parts(56_599_000, 0) + // Minimum execution time: 52_478_000 picoseconds. + Weight::from_parts(57_577_000, 0) .saturating_add(Weight::from_parts(0, 4168)) - .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(7)) } /// Storage: `FellowshipSalary::Status` (r:1 w:1) @@ -145,6 +149,8 @@ impl pallet_salary::WeightInfo for WeightInfo { /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -163,10 +169,10 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `703` // Estimated: `4168` - // Minimum execution time: 55_220_000 picoseconds. - Weight::from_parts(56_412_000, 0) + // Minimum execution time: 51_505_000 picoseconds. + Weight::from_parts(53_432_000, 0) .saturating_add(Weight::from_parts(0, 4168)) - .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(7)) } /// Storage: `FellowshipSalary::Status` (r:1 w:1) @@ -179,8 +185,8 @@ impl pallet_salary::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3943` - // Minimum execution time: 22_575_000 picoseconds. - Weight::from_parts(23_061_000, 0) + // Minimum execution time: 20_399_000 picoseconds. + Weight::from_parts(21_354_000, 0) .saturating_add(Weight::from_parts(0, 3943)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs index 4cf9f869d4..f3bdcdeea9 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_scheduler -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,8 +53,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `31` // Estimated: `1489` - // Minimum execution time: 3_223_000 picoseconds. - Weight::from_parts(3_384_000, 0) + // Minimum execution time: 2_513_000 picoseconds. + Weight::from_parts(2_646_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,11 +66,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `77 + s * (177 ±0)` // Estimated: `159279` - // Minimum execution time: 2_744_000 picoseconds. - Weight::from_parts(2_820_000, 0) + // Minimum execution time: 2_990_000 picoseconds. + Weight::from_parts(3_062_000, 0) .saturating_add(Weight::from_parts(0, 159279)) - // Standard Error: 2_751 - .saturating_add(Weight::from_parts(867_687, 0).saturating_mul(s.into())) + // Standard Error: 2_826 + .saturating_add(Weight::from_parts(878_596, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -76,25 +78,27 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_037_000 picoseconds. - Weight::from_parts(5_228_000, 0) + // Minimum execution time: 3_486_000 picoseconds. + Weight::from_parts(3_620_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:0) /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `213 + s * (1 ±0)` // Estimated: `3678 + s * (1 ±0)` - // Minimum execution time: 18_974_000 picoseconds. - Weight::from_parts(19_216_000, 0) + // Minimum execution time: 17_528_000 picoseconds. + Weight::from_parts(17_900_000, 0) .saturating_add(Weight::from_parts(0, 3678)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_192, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_265, 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())) } @@ -104,8 +108,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_208_000 picoseconds. - Weight::from_parts(6_503_000, 0) + // Minimum execution time: 4_743_000 picoseconds. + Weight::from_parts(4_938_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,24 +117,24 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_967_000 picoseconds. - Weight::from_parts(5_176_000, 0) + // Minimum execution time: 3_468_000 picoseconds. + Weight::from_parts(3_612_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_166_000 picoseconds. - Weight::from_parts(2_294_000, 0) + // Minimum execution time: 2_260_000 picoseconds. + Weight::from_parts(2_318_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_163_000 picoseconds. - Weight::from_parts(2_247_000, 0) + // Minimum execution time: 2_222_000 picoseconds. + Weight::from_parts(2_331_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -140,11 +144,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `77 + s * (177 ±0)` // Estimated: `159279` - // Minimum execution time: 10_983_000 picoseconds. - Weight::from_parts(8_138_900, 0) + // Minimum execution time: 9_378_000 picoseconds. + Weight::from_parts(6_010_948, 0) .saturating_add(Weight::from_parts(0, 159279)) - // Standard Error: 5_480 - .saturating_add(Weight::from_parts(923_471, 0).saturating_mul(s.into())) + // Standard Error: 5_992 + .saturating_add(Weight::from_parts(946_555, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -157,11 +161,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `77 + s * (177 ±0)` // Estimated: `159279` - // Minimum execution time: 15_755_000 picoseconds. - Weight::from_parts(6_677_192, 0) + // Minimum execution time: 14_624_000 picoseconds. + Weight::from_parts(5_909_642, 0) .saturating_add(Weight::from_parts(0, 159279)) - // Standard Error: 6_517 - .saturating_add(Weight::from_parts(1_638_687, 0).saturating_mul(s.into())) + // Standard Error: 8_087 + .saturating_add(Weight::from_parts(1_666_499, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -174,11 +178,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `468 + s * (179 ±0)` // Estimated: `159279` - // Minimum execution time: 13_934_000 picoseconds. - Weight::from_parts(12_572_824, 0) + // Minimum execution time: 12_346_000 picoseconds. + Weight::from_parts(10_423_364, 0) .saturating_add(Weight::from_parts(0, 159279)) - // Standard Error: 5_564 - .saturating_add(Weight::from_parts(947_861, 0).saturating_mul(s.into())) + // Standard Error: 7_383 + .saturating_add(Weight::from_parts(980_195, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -191,11 +195,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `509 + s * (179 ±0)` // Estimated: `159279` - // Minimum execution time: 17_883_000 picoseconds. - Weight::from_parts(9_961_091, 0) + // Minimum execution time: 16_852_000 picoseconds. + Weight::from_parts(9_107_513, 0) .saturating_add(Weight::from_parts(0, 159279)) - // Standard Error: 6_672 - .saturating_add(Weight::from_parts(1_647_830, 0).saturating_mul(s.into())) + // Standard Error: 8_187 + .saturating_add(Weight::from_parts(1_687_912, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_session.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_session.rs index 079b38b01c..fd13ad26c4 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_session.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_session.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_session -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,11 +53,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `270` - // Estimated: `3735` - // Minimum execution time: 15_560_000 picoseconds. - Weight::from_parts(15_878_000, 0) - .saturating_add(Weight::from_parts(0, 3735)) + // Measured: `297` + // Estimated: `3762` + // Minimum execution time: 15_753_000 picoseconds. + Weight::from_parts(16_485_000, 0) + .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -65,11 +67,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `242` - // Estimated: `3707` - // Minimum execution time: 11_110_000 picoseconds. - Weight::from_parts(11_556_000, 0) - .saturating_add(Weight::from_parts(0, 3707)) + // Measured: `279` + // Estimated: `3744` + // Minimum execution time: 11_622_000 picoseconds. + Weight::from_parts(11_920_000, 0) + .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs index e7825dec7d..a98f07c8d0 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_timestamp -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `49` // Estimated: `1493` - // Minimum execution time: 7_279_000 picoseconds. - Weight::from_parts(7_533_000, 0) + // Minimum execution time: 5_594_000 picoseconds. + Weight::from_parts(5_794_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -63,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 3_140_000 picoseconds. - Weight::from_parts(3_350_000, 0) + // Minimum execution time: 2_852_000 picoseconds. + Weight::from_parts(3_002_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_utility.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_utility.rs index d8bf22378b..d4ccdd7ca6 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_utility.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_utility.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_utility -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_008_000 picoseconds. - Weight::from_parts(7_429_838, 0) + // Minimum execution time: 4_605_000 picoseconds. + Weight::from_parts(4_691_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_924 - .saturating_add(Weight::from_parts(4_845_434, 0).saturating_mul(c.into())) + // Standard Error: 1_522 + .saturating_add(Weight::from_parts(3_389_789, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_087_000 picoseconds. - Weight::from_parts(4_329_000, 0) + // Minimum execution time: 4_483_000 picoseconds. + Weight::from_parts(4_644_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -69,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_973_000 picoseconds. - Weight::from_parts(12_444_001, 0) + // Minimum execution time: 4_636_000 picoseconds. + Weight::from_parts(8_779_111, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_674 - .saturating_add(Weight::from_parts(5_012_131, 0).saturating_mul(c.into())) + // Standard Error: 3_766 + .saturating_add(Weight::from_parts(3_621_629, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_990_000 picoseconds. - Weight::from_parts(8_282_000, 0) + // Minimum execution time: 6_684_000 picoseconds. + Weight::from_parts(7_129_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -88,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_160_000 picoseconds. - Weight::from_parts(14_461_853, 0) + // Minimum execution time: 4_600_000 picoseconds. + Weight::from_parts(4_460_762, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_655 - .saturating_add(Weight::from_parts(4_805_940, 0).saturating_mul(c.into())) + // Standard Error: 2_150 + .saturating_add(Weight::from_parts(3_435_678, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index dbea44c02f..12083d380a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-collectives-polkadot.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../collectives-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-collectives-polkadot.json +// --chain=../collectives-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm -// --extrinsic= -// --output=/builds/runtimes/system-parachains/collectives/collectives-polkadot/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./collectives-polkadot-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,6 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -59,10 +63,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `111` // Estimated: `3576` - // Minimum execution time: 28_573_000 picoseconds. - Weight::from_parts(29_364_000, 0) + // Minimum execution time: 25_325_000 picoseconds. + Weight::from_parts(25_981_000, 0) .saturating_add(Weight::from_parts(0, 3576)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -71,8 +75,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `1489` - // Minimum execution time: 22_500_000 picoseconds. - Weight::from_parts(23_040_000, 0) + // Minimum execution time: 21_748_000 picoseconds. + Weight::from_parts(22_263_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -102,8 +106,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_295_000 picoseconds. - Weight::from_parts(8_594_000, 0) + // Minimum execution time: 7_081_000 picoseconds. + Weight::from_parts(7_278_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,8 +117,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_340_000 picoseconds. - Weight::from_parts(2_504_000, 0) + // Minimum execution time: 2_248_000 picoseconds. + Weight::from_parts(2_462_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -122,6 +126,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -138,14 +144,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `111` // Estimated: `3576` - // Minimum execution time: 32_746_000 picoseconds. - Weight::from_parts(33_054_000, 0) + // Minimum execution time: 29_143_000 picoseconds. + Weight::from_parts(29_762_000, 0) .saturating_add(Weight::from_parts(0, 3576)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -162,10 +170,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `329` // Estimated: `3794` - // Minimum execution time: 34_434_000 picoseconds. - Weight::from_parts(35_368_000, 0) + // Minimum execution time: 30_988_000 picoseconds. + Weight::from_parts(32_344_000, 0) .saturating_add(Weight::from_parts(0, 3794)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) @@ -174,8 +182,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_505_000 picoseconds. - Weight::from_parts(2_630_000, 0) + // Minimum execution time: 2_165_000 picoseconds. + Weight::from_parts(2_334_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -185,8 +193,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `129` // Estimated: `11019` - // Minimum execution time: 15_289_000 picoseconds. - Weight::from_parts(15_779_000, 0) + // Minimum execution time: 16_277_000 picoseconds. + Weight::from_parts(16_648_000, 0) .saturating_add(Weight::from_parts(0, 11019)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -197,8 +205,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `133` // Estimated: `11023` - // Minimum execution time: 15_684_000 picoseconds. - Weight::from_parts(16_159_000, 0) + // Minimum execution time: 15_923_000 picoseconds. + Weight::from_parts(16_443_000, 0) .saturating_add(Weight::from_parts(0, 11023)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -209,13 +217,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `13505` - // Minimum execution time: 17_338_000 picoseconds. - Weight::from_parts(17_795_000, 0) + // Minimum execution time: 17_553_000 picoseconds. + Weight::from_parts(17_998_000, 0) .saturating_add(Weight::from_parts(0, 13505)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -230,10 +240,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `178` // Estimated: `6118` - // Minimum execution time: 30_743_000 picoseconds. - Weight::from_parts(31_910_000, 0) + // Minimum execution time: 27_471_000 picoseconds. + Weight::from_parts(28_611_000, 0) .saturating_add(Weight::from_parts(0, 6118)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0) @@ -242,8 +252,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `8587` - // Minimum execution time: 9_001_000 picoseconds. - Weight::from_parts(9_379_000, 0) + // Minimum execution time: 9_128_000 picoseconds. + Weight::from_parts(9_396_000, 0) .saturating_add(Weight::from_parts(0, 8587)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -253,14 +263,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `11030` - // Minimum execution time: 16_079_000 picoseconds. - Weight::from_parts(16_709_000, 0) + // Minimum execution time: 16_498_000 picoseconds. + Weight::from_parts(17_145_000, 0) .saturating_add(Weight::from_parts(0, 11030)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -275,10 +287,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `182` // Estimated: `11072` - // Minimum execution time: 37_582_000 picoseconds. - Weight::from_parts(38_331_000, 0) + // Minimum execution time: 34_699_000 picoseconds. + Weight::from_parts(35_634_000, 0) .saturating_add(Weight::from_parts(0, 11072)) - .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } } From 85e37e0a753aa0f7c632287d761b5d3f3b5c64a5 Mon Sep 17 00:00:00 2001 From: Muharem Date: Mon, 8 Jan 2024 08:16:49 +0800 Subject: [PATCH 19/27] Fellowship Salary Budget & Period (#121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fellowship Salary Budget & Period In alignment with the Fellowship Salary [RFC](https://github.com/polkadot-fellows/RFCs/pull/50), the projected total monthly budget stands at 240,833 USDt. With this PR, I invite the Fellowship members to refine the following constant parameters: - RegistrationPeriod - # of blocks within a cycle which accounts have to register their intent to claim. - PayoutPeriod - # of blocks within a cycle which accounts have to claim the payout. - Budget - the total budget per cycle. Please be aware that the pallet does not have a visibility into the actual balance of the account holding the salary budget. If this account lacks sufficient assets, subsequent salary claims will encounter failures. --------- Co-authored-by: Bastian Köcher Co-authored-by: Oliver Tale-Yazdi --- CHANGELOG.md | 1 + .../collectives/collectives-polkadot/src/fellowship/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7824f1e3e8..29bbe8c280 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Election provider: use a geometric deposit base calculation for EPM signed submissions in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661 - Whitelist `force_default_xcm_version` in XCM call filter ([polkadot-fellows/runtimes#45](https://github.com/polkadot-fellows/runtimes/pull/45)) +- Update the fellowship salary budget amount in alignment with the Fellowship Salary [RFC](https://github.com/polkadot-fellows/RFCs/pull/50) ([polkadot-fellows/runtimes#121](https://github.com/polkadot-fellows/runtimes/pull/121)) - Set up an account ID for the local root location on Polkadot Collectives ([polkadot-fellows/runtimes#125](https://github.com/polkadot-fellows/runtimes/pull/125)) - Increase confirmation period for treasury spend tracks on Polkadot & Kusama ([polkadot-fellows/runtimes#119](https://github.com/polkadot-fellows/runtimes/pull/119)) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index fe7ade4a12..fb2c340a88 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -249,7 +249,7 @@ impl pallet_salary::Config for Runtime { // 15 days to claim the salary payment. type PayoutPeriod = ConstU32<{ 15 * DAYS }>; // Total monthly salary budget. - type Budget = ConstU128<{ 100_000 * USDT_UNITS }>; + type Budget = ConstU128<{ 250_000 * USDT_UNITS }>; } parameter_types! { From 98872cb5cdcc65369a0d48c6b2bab95d1be5d286 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Mon, 8 Jan 2024 19:22:02 +0300 Subject: [PATCH 20/27] Added Polkadot <> Kusama bridge configuration (#108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds bridge configuration to allow exchanging assets between Polkadot and Kusama Asset Hubs. So far we only support sending KSM from Kusama Asset Hub to Polkadot Asset Hub as wKSM + DOT from Polkadot Asset Hub to Kusama Asset Hub as wDOT. Other assets may be added later. The opposite direction is also supported, though it'll need dependencies upgrade to >= v1.4. --- Similar Rococo <> Westend bridge is also active on live chains. You may read docs on how to play with it here: https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/README.md For Polkadot <> Kusama bridge we have a dedicated branch for local zombienet tests: https://github.com/svyatonik/runtimes/tree/sv-pk-bridge-with-zombienet-tests. You may run autotests (exchanging assets) there - see https://github.com/svyatonik/runtimes/blob/sv-pk-bridge-with-zombienet-tests/system-parachains/bridge-hubs/zombienet/README.md for details. You may do manual tests by spawning local chains using those scripts and use https://github.com/svyatonik/runtimes/blob/sv-pk-bridge-with-zombienet-tests/system-parachains/bridge-hubs/zombienet/scripts/bridges_kusama_polkadot.sh script to run various commands - i.e. send assets manually. Polkadot js apps is also supported. --------- Co-authored-by: Branislav Kontur Co-authored-by: Bastian Köcher --- CHANGELOG.md | 1 + Cargo.lock | 215 +++++- Cargo.toml | 4 + .../src/tests/reserve_transfer.rs | 2 +- .../src/tests/reserve_transfer.rs | 2 +- .../emulated/common/src/impls.rs | 8 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 24 +- .../asset-hub-kusama/primitives/Cargo.toml | 33 + .../asset-hub-kusama/primitives/src/lib.rs | 68 ++ .../asset-hubs/asset-hub-kusama/src/lib.rs | 72 +- .../asset-hub-kusama/src/weights/mod.rs | 1 + .../weights/pallet_xcm_bridge_hub_router.rs | 110 +++ .../asset-hub-kusama/src/weights/xcm/mod.rs | 2 +- .../xcm/pallet_xcm_benchmarks_fungible.rs | 14 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 225 ++++--- .../asset-hub-kusama/src/xcm_config.rs | 213 +++++- .../asset-hub-kusama/tests/tests.rs | 626 +++++++++++++++++- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 28 +- .../asset-hub-polkadot/primitives/Cargo.toml | 33 + .../asset-hub-polkadot/primitives/src/lib.rs | 68 ++ .../asset-hubs/asset-hub-polkadot/src/lib.rs | 72 +- .../asset-hub-polkadot/src/weights/mod.rs | 1 + .../weights/pallet_xcm_bridge_hub_router.rs | 110 +++ .../asset-hub-polkadot/src/weights/xcm/mod.rs | 2 +- .../xcm/pallet_xcm_benchmarks_fungible.rs | 14 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 221 ++++--- .../asset-hub-polkadot/src/xcm_config.rs | 209 +++++- .../asset-hub-polkadot/tests/tests.rs | 625 ++++++++++++++++- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 55 +- .../bridge-hub-kusama/primitives/Cargo.toml | 39 ++ .../bridge-hub-kusama/primitives/src/lib.rs | 153 +++++ .../src/bridge_to_polkadot_config.rs | 404 +++++++++++ .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 186 +++++- .../bridge-hub-kusama/src/weights/mod.rs | 31 + .../src/weights/pallet_bridge_grandpa.rs | 63 ++ .../src/weights/pallet_bridge_messages.rs | 226 +++++++ .../src/weights/pallet_bridge_parachains.rs | 98 +++ .../src/weights/pallet_bridge_relayers.rs | 107 +++ .../bridge-hub-kusama/src/weights/xcm/mod.rs | 6 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 233 ++++--- .../bridge-hub-kusama/src/xcm_config.rs | 38 +- .../bridge-hub-kusama/tests/tests.rs | 266 +++++++- .../bridge-hub-polkadot/Cargo.toml | 54 +- .../bridge-hub-polkadot/primitives/Cargo.toml | 39 ++ .../bridge-hub-polkadot/primitives/src/lib.rs | 146 ++++ .../src/bridge_to_kusama_config.rs | 400 +++++++++++ .../bridge-hub-polkadot/src/lib.rs | 186 +++++- .../bridge-hub-polkadot/src/weights/mod.rs | 31 + .../src/weights/pallet_bridge_grandpa.rs | 63 ++ .../src/weights/pallet_bridge_messages.rs | 226 +++++++ .../src/weights/pallet_bridge_parachains.rs | 96 +++ .../src/weights/pallet_bridge_relayers.rs | 107 +++ .../src/weights/xcm/mod.rs | 6 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 233 ++++--- .../bridge-hub-polkadot/src/xcm_config.rs | 38 +- .../bridge-hub-polkadot/tests/tests.rs | 266 +++++++- 56 files changed, 6228 insertions(+), 571 deletions(-) create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_parachains.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_parachains.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 29bbe8c280..141c966da4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Treasury is able to spend various asset kinds ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)) - Add BEEFY to Polkadot ([polkadot-fellows/runtimes#65](https://github.com/polkadot-fellows/runtimes/pull/65)) - Fellowship Treasury pallet on Polkadot Collectives ([polkadot-fellows/runtimes#109](https://github.com/polkadot-fellows/runtimes/pull/109)) +- Added Polkadot <> Kusama bridge to support asset transfers between Asset Hubs ([polkadot-fellows/runtimes#108](https://github.com/polkadot-fellows/runtimes/pull/108)) ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 046fe1d689..9069eaf411 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -553,6 +553,10 @@ version = "1.0.0" dependencies = [ "asset-test-utils", "assets-common", + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -592,11 +596,14 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub-router", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", + "polkadot-runtime-constants", "primitive-types", "scale-info", "smallvec", @@ -606,6 +613,7 @@ dependencies = [ "sp-core", "sp-genesis-builder", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -649,6 +657,10 @@ version = "1.0.0" dependencies = [ "asset-test-utils", "assets-common", + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -665,6 +677,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", + "kusama-runtime-constants", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -684,7 +697,9 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub-router", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -698,6 +713,7 @@ dependencies = [ "sp-core", "sp-genesis-builder", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -1120,6 +1136,30 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bp-asset-hub-kusama" +version = "1.0.0" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "bp-asset-hub-polkadot" +version = "1.0.0" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-std", + "staging-xcm", +] + [[package]] name = "bp-bridge-hub-cumulus" version = "0.4.0" @@ -1136,6 +1176,36 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-bridge-hub-kusama" +version = "1.0.0" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "kusama-runtime-constants", + "polkadot-runtime-constants", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-bridge-hub-polkadot" +version = "1.0.0" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "kusama-runtime-constants", + "polkadot-runtime-constants", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "bp-bridge-hub-rococo" version = "0.4.0" @@ -1184,6 +1254,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-kusama" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69f61df356df3dbedf2dfbfec65ce673ff80121ad7eb319b84a093ebc24aaf9" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std", +] + [[package]] name = "bp-messages" version = "0.4.0" @@ -1218,6 +1302,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-polkadot" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2643dd8c1c9f82517cb0f438bb66533e8f0b54d8c4b063d24f835aa620e4034" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std", +] + [[package]] name = "bp-polkadot-core" version = "0.4.0" @@ -1313,7 +1411,20 @@ dependencies = [ name = "bridge-hub-kusama-runtime" version = "1.0.0" dependencies = [ + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", + "bp-header-chain", + "bp-kusama", + "bp-messages", + "bp-parachains", + "bp-polkadot", + "bp-polkadot-core", + "bp-relayers", + "bp-runtime", "bridge-hub-test-utils", + "bridge-runtime-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -1335,6 +1446,10 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", + "pallet-bridge-grandpa", + "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-bridge-relayers", "pallet-collator-selection", "pallet-multisig", "pallet-session", @@ -1359,6 +1474,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-keyring", "sp-offchain", "sp-runtime", "sp-session", @@ -1370,6 +1486,7 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "static_assertions", "substrate-wasm-builder", "system-parachains-constants", ] @@ -1378,7 +1495,20 @@ dependencies = [ name = "bridge-hub-polkadot-runtime" version = "1.0.0" dependencies = [ + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", + "bp-header-chain", + "bp-kusama", + "bp-messages", + "bp-parachains", + "bp-polkadot", + "bp-polkadot-core", + "bp-relayers", + "bp-runtime", "bridge-hub-test-utils", + "bridge-runtime-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -1399,6 +1529,10 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", + "pallet-bridge-grandpa", + "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-bridge-relayers", "pallet-collator-selection", "pallet-multisig", "pallet-session", @@ -1424,6 +1558,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-keyring", "sp-offchain", "sp-runtime", "sp-session", @@ -1435,6 +1570,7 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "static_assertions", "substrate-wasm-builder", "system-parachains-constants", ] @@ -1521,6 +1657,7 @@ dependencies = [ "sp-trie", "staging-xcm", "staging-xcm-builder", + "static_assertions", ] [[package]] @@ -2411,7 +2548,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84baea20d10325b2501b6fa06d4a7902a43d6a6c62c71b5309e75c3ad8ae1441" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -3324,7 +3461,7 @@ checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", "indexmap 1.9.3", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3504,7 +3641,7 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -3649,7 +3786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -4746,7 +4883,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5851,7 +5988,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -6194,7 +6331,7 @@ dependencies = [ "indexmap 2.0.0", "itertools 0.11.0", "petgraph", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -7349,7 +7486,7 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df8878e29f3d001ac1b1b714621f462e41a9d1fa8f385657f955e8a1ec0684d7" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -7720,9 +7857,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -7735,11 +7872,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -8638,7 +8775,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.14", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.2", ] [[package]] @@ -8684,9 +8830,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -9533,7 +9679,7 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25158f791eb48715da9322375598b541cadd1f193674e8a4d77c79ffa3d95d" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -10187,7 +10333,7 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c4ae9e4f957d7274ac6b59d667b66262caf6482dbb1b63f1c370528626b1272" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -10273,7 +10419,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -10471,18 +10617,18 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", @@ -10672,9 +10818,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snap" @@ -10767,7 +10913,7 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -11286,7 +11432,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -12309,7 +12455,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.14", ] [[package]] @@ -12334,6 +12480,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -12439,7 +12596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35756d8c1a227ec525853a1080bf890d03d939deb2bc50d4d43c96516c795d0d" dependencies = [ "expander 2.0.0", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", diff --git a/Cargo.toml b/Cargo.toml index 8baf12752c..60818e781e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,13 @@ members = [ "relay/polkadot", "relay/polkadot/constants", "system-parachains/asset-hubs/asset-hub-kusama", + "system-parachains/asset-hubs/asset-hub-kusama/primitives", "system-parachains/asset-hubs/asset-hub-polkadot", + "system-parachains/asset-hubs/asset-hub-polkadot/primitives", "system-parachains/bridge-hubs/bridge-hub-kusama", + "system-parachains/bridge-hubs/bridge-hub-kusama/primitives", "system-parachains/bridge-hubs/bridge-hub-polkadot", + "system-parachains/bridge-hubs/bridge-hub-polkadot/primitives", "system-parachains/collectives/collectives-polkadot", "system-parachains/constants", "system-parachains/gluttons/glutton-kusama", diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index 8792a14f6c..cc2e7a66b3 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -36,7 +36,7 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) { } fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubKusama::assert_dmp_queue_incomplete(Some(Error::WeightNotComputable)); + AssetHubKusama::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); } fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index 5fe9d6b1f0..96c4358abd 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -36,7 +36,7 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) { } fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubPolkadot::assert_dmp_queue_incomplete(Some(Error::WeightNotComputable)); + AssetHubPolkadot::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); } fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs index e55f1bbe9c..5969b8ac84 100644 --- a/integration-tests/emulated/common/src/impls.rs +++ b/integration-tests/emulated/common/src/impls.rs @@ -474,14 +474,20 @@ macro_rules! impl_assert_events_helpers_for_parachain { /// Asserts a XCM from Relay Chain is incompletely executed pub fn assert_dmp_queue_incomplete( + expected_weight: Option<$crate::impls::Weight>, expected_error: Option<$crate::impls::Error>, ) { $crate::impls::assert_expected_events!( Self, vec![ [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: $crate::impls::Outcome::Error(error), .. + outcome: $crate::impls::Outcome::Incomplete(weight, error), .. }) => { + weight: $crate::impls::weight_within_threshold( + ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), + expected_weight.unwrap_or(*weight), + *weight + ), error: *error == expected_error.unwrap_or(*error), }, ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index b5e514e71f..bd3da40fe6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -15,6 +15,14 @@ log = { version = "0.4.20", default-features = false } scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } smallvec = "1.11.0" +# Local +bp-asset-hub-kusama = { path = "./primitives", default-features = false} +bp-asset-hub-polkadot = { path = "../asset-hub-polkadot/primitives", default-features = false} +bp-bridge-hub-kusama = { path = "../../bridge-hubs/bridge-hub-kusama/primitives", default-features = false} +bp-bridge-hub-polkadot = { path = "../../bridge-hubs/bridge-hub-polkadot/primitives", default-features = false} +kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} + # Substrate frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } frame-executive = { default-features = false, version = "25.0.0" } @@ -59,7 +67,6 @@ sp-weights = { default-features = false, version = "24.0.0" } primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} pallet-xcm = { default-features = false, version = "4.0.0" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } polkadot-core-primitives = { default-features = false, version = "4.0.0" } @@ -75,7 +82,7 @@ cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } cumulus-primitives-core = { default-features = false , version = "0.4.0" } cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } @@ -84,8 +91,13 @@ parachains-common = { default-features = false , version = "4.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } assets-common = { default-features = false , version = "0.4.0" } +# Bridges +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } + [dev-dependencies] asset-test-utils = { version = "4.0.0" } +parachains-runtimes-test-utils = { version = "4.0.0" } +sp-io = { version = "27.0.0" } [build-dependencies] substrate-wasm-builder = { optional = true , version = "14.0.0" } @@ -123,6 +135,7 @@ runtime-benchmarks = [ "pallet-uniques/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub-router/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", @@ -157,6 +170,7 @@ try-runtime = [ "pallet-transaction-payment/try-runtime", "pallet-uniques/try-runtime", "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub-router/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", @@ -164,6 +178,10 @@ try-runtime = [ ] std = [ "assets-common/std", + "bp-asset-hub-kusama/std", + "bp-bridge-hub-kusama/std", + "bp-asset-hub-polkadot/std", + "bp-bridge-hub-polkadot/std", "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", @@ -202,12 +220,14 @@ std = [ "pallet-uniques/std", "pallet-utility/std", "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub-router/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", "polkadot-core-primitives/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", + "polkadot-runtime-constants/std", "scale-info/std", "sp-api/std", "sp-block-builder/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml new file mode 100644 index 0000000000..b8eab108b7 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "bp-asset-hub-kusama" +description = "Primitives of AssetHubKusama parachain runtime." +repository.workspace = true +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } + +# Bridge Dependencies +bp-xcm-bridge-hub-router = { default-features = false , version = "0.3.0" } + +# Substrate Based Dependencies +frame-support = { default-features = false, version = "25.0.0" } +sp-std = { default-features = false, version = "12.0.0" } + +# Polkadot +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } + +[features] +default = [ "std" ] +std = [ + "bp-xcm-bridge-hub-router/std", + "codec/std", + "frame-support/std", + "scale-info/std", + "sp-std/std", + "xcm/std" +] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs new file mode 100644 index 0000000000..18f8efbf6f --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs @@ -0,0 +1,68 @@ +// 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 . + +//! Module with configuration which reflects AssetHubKusama runtime setup. + +#![cfg_attr(not(feature = "std"), no_std)] + +use codec::{Decode, Encode}; +use frame_support::weights::Weight; +use scale_info::TypeInfo; +use xcm::prelude::*; + +pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; + +/// `AssetHubKusama` Runtime `Call` enum. +/// +/// The enum represents a subset of possible `Call`s we can send to `AssetHubKusama` chain. +/// Ideally this code would be auto-generated from metadata, because we want to +/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. +/// +/// All entries here (like pretty much in the entire file) must be kept in sync with +/// `AssetHubKusama` `construct_runtime`, so that we maintain SCALE-compatibility. +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum Call { + /// `ToPolkadotXcmRouter` bridge pallet. + #[codec(index = 34)] + ToPolkadotXcmRouter(XcmBridgeHubRouterCall), +} + +frame_support::parameter_types! { + /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. + pub const XcmBridgeHubRouterTransactCallMaxWeight: Weight = Weight::from_parts(200_000_000, 6144); + + /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes congested. + pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); + /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes uncongested. + pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); +} + +fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { + sp_std::vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Xcm, + require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), + call: Call::ToPolkadotXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested, + }) + .encode() + .into(), + } + ] +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 5c93017890..92ba0a9641 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -56,7 +56,7 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, - InstanceFilter, + Equals, InstanceFilter, }, weights::{ConstantMultiplier, Weight}, BoundedVec, PalletId, @@ -836,6 +836,37 @@ impl pallet_nfts::Config for Runtime { type Helper = (); } +/// XCM router instance to BridgeHub with bridging capabilities for `Polkadot` global +/// consensus with dynamic fees and back-pressure. +pub type ToPolkadotXcmRouterInstance = pallet_xcm_bridge_hub_router::Instance1; +impl pallet_xcm_bridge_hub_router::Config for Runtime { + type WeightInfo = weights::pallet_xcm_bridge_hub_router::WeightInfo; + + type UniversalLocation = xcm_config::UniversalLocation; + type BridgedNetworkId = xcm_config::bridging::to_polkadot::PolkadotNetwork; + type Bridges = xcm_config::bridging::NetworkExportTable; + + #[cfg(not(feature = "runtime-benchmarks"))] + type BridgeHubOrigin = EnsureXcm>; + #[cfg(feature = "runtime-benchmarks")] + type BridgeHubOrigin = frame_support::traits::EitherOfDiverse< + // for running benchmarks + EnsureRoot, + // for running tests with `--feature runtime-benchmarks` + EnsureXcm>, + >; + + type ToBridgeHubSender = XcmpQueue; + type WithBridgeHubChannel = + cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider< + xcm_config::bridging::SiblingBridgeHubParaId, + Runtime, + >; + + type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; + type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -866,6 +897,7 @@ construct_runtime!( PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + ToPolkadotXcmRouter: pallet_xcm_bridge_hub_router::::{Pallet, Storage, Call} = 34, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -947,6 +979,8 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM [pallet_xcm, PolkadotXcm] + // Bridges + [pallet_xcm_bridge_hub_router, ToPolkadot] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -1194,6 +1228,7 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; // This is defined once again in dispatch_benchmark, because list_benchmarks! // and add_benchmarks! are macros exported by define_benchmarks! macros and those types @@ -1209,6 +1244,8 @@ impl_runtime_apis! { type Foreign = pallet_assets::Pallet::; type Pool = pallet_assets::Pallet::; + type ToPolkadot = XcmBridgeHubRouterBench; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -1292,7 +1329,13 @@ impl_runtime_apis! { MultiAsset { fun: Fungible(UNITS), id: Concrete(KsmLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + // AssetHubKusama trusts AssetHubPolkadot as reserve for DOTs + pub TrustedReserve: Option<(MultiLocation, MultiAsset)> = Some( + ( + xcm_config::bridging::to_polkadot::AssetHubPolkadot::get(), + MultiAsset::from((xcm_config::bridging::to_polkadot::DotLocation::get(), 1000000000000 as u128)) + ) + ); } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -1323,7 +1366,8 @@ impl_runtime_apis! { } fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { - Err(BenchmarkError::Skip) + xcm_config::bridging::BridgingBenchmarksHelper::prepare_universal_alias() + .ok_or(BenchmarkError::Skip) } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { @@ -1355,6 +1399,26 @@ impl_runtime_apis! { } } + use pallet_xcm_bridge_hub_router::benchmarking::{ + Pallet as XcmBridgeHubRouterBench, + Config as XcmBridgeHubRouterConfig, + }; + + impl XcmBridgeHubRouterConfig for Runtime { + fn make_congested() { + cumulus_pallet_xcmp_queue::bridging::suspend_channel_for_benchmarks::( + xcm_config::bridging::SiblingBridgeHubParaId::get().into() + ); + } + + fn ensure_bridged_target_destination() -> MultiLocation { + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + xcm_config::bridging::SiblingBridgeHubParaId::get().into() + ); + xcm_config::bridging::to_polkadot::AssetHubPolkadot::get() + } + } + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; @@ -1362,6 +1426,8 @@ impl_runtime_apis! { type Foreign = pallet_assets::Pallet::; type Pool = pallet_assets::Pallet::; + type ToPolkadot = XcmBridgeHubRouterBench; + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs index 9d92330275..0295549956 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs @@ -33,6 +33,7 @@ pub mod pallet_timestamp; pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_xcm; +pub mod pallet_xcm_bridge_hub_router; pub mod paritydb_weights; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs new file mode 100644 index 0000000000..714722f94a --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs @@ -0,0 +1,110 @@ + +//! Autogenerated weights for `pallet_xcm_bridge_hub_router` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("ah-kusama-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// ah-kusama-local-raw.json +// --pallet +// pallet-xcm-bridge-hub-router +// --extrinsic +// * +// --output=system-parachains/asset-hubs/asset-hub-kusama/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_xcm_bridge_hub_router`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm_bridge_hub_router::WeightInfo for WeightInfo { + /// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + fn on_initialize_when_non_congested() -> Weight { + // Proof Size summary in bytes: + // Measured: `159` + // Estimated: `1644` + // Minimum execution time: 10_642_000 picoseconds. + Weight::from_parts(11_071_000, 0) + .saturating_add(Weight::from_parts(0, 1644)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn on_initialize_when_congested() -> Weight { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 5_037_000 picoseconds. + Weight::from_parts(5_209_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(2)) + } + /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + fn report_bridge_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `83` + // Estimated: `1502` + // Minimum execution time: 13_006_000 picoseconds. + Weight::from_parts(13_656_000, 0) + .saturating_add(Weight::from_parts(0, 1502)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) + /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn send_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `392` + // Estimated: `3857` + // Minimum execution time: 63_791_000 picoseconds. + Weight::from_parts(68_199_000, 0) + .saturating_add(Weight::from_parts(0, 3857)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs index ce6e920651..ffae9fb6c3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs @@ -209,7 +209,7 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { XcmGeneric::::clear_transact_status() } fn universal_origin(_: &Junction) -> Weight { - Weight::MAX + XcmGeneric::::universal_origin() } fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index d8344feeb2..f7bf0a5808 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -97,15 +97,15 @@ impl WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) } - /// 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 { + // Storage: `ParachainInfo::ParachainId` (r:1 w:0) + // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + pub fn reserve_asset_deposited() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. - Weight::from_parts(18_446_744_073_709_551_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Estimated: `1489` + // Minimum execution time: 7_855_000 picoseconds. + Weight::from_parts(8_015_000, 1489) + .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 625549ecfc..a5603c41c9 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -1,44 +1,26 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus 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. - -// Cumulus 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 Cumulus. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: Compiled, CHAIN: Some("ah-kusama-local-raw.json"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=asset-hub-kusama-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::generic -// --no-storage-info +// --chain +// ah-kusama-local-raw.json +// --pallet +// pallet-xcm-benchmarks::generic +// --extrinsic +// report_holding,buy_execution,query_response,transact,refund_surplus,set_error_handler,set_appendix,clear_error,descend_origin,clear_origin,report_error,claim_asset,trap,subscribe_version,unsubscribe_version,burn_asset,expect_asset,expect_origin,expect_error,expect_transact_status,query_pallet,report_transact_status,clear_transact_status,set_topic,clear_topic,export_message,set_fees_mode,unpaid_execution,universal_origin +// --template=../polkadot-sdk/cumulus/templates/xcm-bench-template.hbs +// --output=system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm // --no-median-slopes // --no-min-squares -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json -// --header=./file_header.txt -// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,31 +34,35 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 432_196_000 picoseconds. - Weight::from_parts(438_017_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `246` + // Estimated: `6196` + // Minimum execution time: 491_370_000 picoseconds. + Weight::from_parts(499_900_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_223_000 picoseconds. - Weight::from_parts(4_412_000, 0) + // Minimum execution time: 3_604_000 picoseconds. + Weight::from_parts(3_809_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -84,79 +70,83 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3568` - // Minimum execution time: 11_582_000 picoseconds. - Weight::from_parts(11_830_000, 3568) + // Minimum execution time: 11_038_000 picoseconds. + Weight::from_parts(11_599_000, 3568) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_955_000 picoseconds. - Weight::from_parts(14_320_000, 0) + // Minimum execution time: 12_310_000 picoseconds. + Weight::from_parts(12_701_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_423_000 picoseconds. - Weight::from_parts(4_709_000, 0) + // Minimum execution time: 3_835_000 picoseconds. + Weight::from_parts(4_027_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_028_000 picoseconds. - Weight::from_parts(3_151_000, 0) + // Minimum execution time: 2_374_000 picoseconds. + Weight::from_parts(2_462_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_966_000 picoseconds. - Weight::from_parts(3_076_000, 0) + // Minimum execution time: 2_338_000 picoseconds. + Weight::from_parts(2_426_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_971_000 picoseconds. - Weight::from_parts(3_119_000, 0) + // Minimum execution time: 2_334_000 picoseconds. + Weight::from_parts(2_430_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_772_000 picoseconds. - Weight::from_parts(3_853_000, 0) + // Minimum execution time: 3_333_000 picoseconds. + Weight::from_parts(3_403_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_940_000 picoseconds. - Weight::from_parts(3_050_000, 0) + // Minimum execution time: 2_330_000 picoseconds. + Weight::from_parts(2_401_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 27_734_000 picoseconds. - Weight::from_parts(28_351_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `246` + // Estimated: `6196` + // Minimum execution time: 67_780_000 picoseconds. + Weight::from_parts(69_179_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) // Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -164,8 +154,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `160` // Estimated: `3625` - // Minimum execution time: 16_456_000 picoseconds. - Weight::from_parts(16_846_000, 3625) + // Minimum execution time: 15_239_000 picoseconds. + Weight::from_parts(15_551_000, 3625) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,11 +163,13 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_974_000 picoseconds. - Weight::from_parts(3_108_000, 0) + // Minimum execution time: 2_407_000 picoseconds. + Weight::from_parts(2_476_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -190,11 +182,11 @@ impl WeightInfo { // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 29_823_000 picoseconds. - Weight::from_parts(30_776_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 30_637_000 picoseconds. + Weight::from_parts(31_296_000, 3610) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) @@ -203,127 +195,140 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_966_000 picoseconds. - Weight::from_parts(5_157_000, 0) + // Minimum execution time: 4_863_000 picoseconds. + Weight::from_parts(5_051_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: 141_875_000 picoseconds. - Weight::from_parts(144_925_000, 0) + // Minimum execution time: 145_285_000 picoseconds. + Weight::from_parts(145_935_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_147_000 picoseconds. - Weight::from_parts(13_420_000, 0) + // Minimum execution time: 14_934_000 picoseconds. + Weight::from_parts(15_299_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_050_000 picoseconds. - Weight::from_parts(3_161_000, 0) + // Minimum execution time: 2_482_000 picoseconds. + Weight::from_parts(2_556_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_930_000 picoseconds. - Weight::from_parts(3_077_000, 0) + // Minimum execution time: 2_374_000 picoseconds. + Weight::from_parts(2_442_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_188_000 picoseconds. - Weight::from_parts(3_299_000, 0) + // Minimum execution time: 2_660_000 picoseconds. + Weight::from_parts(2_762_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 31_678_000 picoseconds. - Weight::from_parts(32_462_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - pub fn expect_pallet() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_638_000 picoseconds. - Weight::from_parts(5_756_000, 0) + // Measured: `246` + // Estimated: `6196` + // Minimum execution time: 72_570_000 picoseconds. + Weight::from_parts(74_250_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 27_556_000 picoseconds. - Weight::from_parts(28_240_000, 3574) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `246` + // Estimated: `6196` + // Minimum execution time: 67_731_000 picoseconds. + Weight::from_parts(68_921_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_932_000 picoseconds. - Weight::from_parts(3_097_000, 0) + // Minimum execution time: 2_417_000 picoseconds. + Weight::from_parts(2_480_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_860_000 picoseconds. - Weight::from_parts(2_957_000, 0) + // Minimum execution time: 2_331_000 picoseconds. + Weight::from_parts(2_439_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_886_000 picoseconds. - Weight::from_parts(3_015_000, 0) + // Minimum execution time: 2_336_000 picoseconds. + Weight::from_parts(2_402_000, 0) + } + // Storage: `ParachainInfo::ParachainId` (r:1 w:0) + // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + pub fn universal_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1489` + // Minimum execution time: 4_903_000 picoseconds. + Weight::from_parts(5_042_000, 1489) + .saturating_add(T::DbWeight::get().reads(1)) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_874_000 picoseconds. - Weight::from_parts(3_060_000, 0) + // Minimum execution time: 2_338_000 picoseconds. + Weight::from_parts(2_436_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_029_000 picoseconds. - Weight::from_parts(3_158_000, 0) + // Minimum execution time: 2_545_000 picoseconds. + Weight::from_parts(2_605_000, 0) } } + +impl WeightInfo { pub fn expect_pallet() -> Weight { Weight::from_parts(5_756_000, 0) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 1f9eb0acad..489e38458a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -16,9 +16,10 @@ use super::{ AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, PoolAssets, PriceForParentDelivery, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + RuntimeEvent, RuntimeOrigin, ToPolkadotXcmRouter, TransactionByteFee, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; -use crate::ForeignAssets; +use crate::{ForeignAssets, ForeignAssetsInstance}; use assets_common::{ local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, matching::{FromSiblingParachain, IsForeignConcreteAsset}, @@ -45,12 +46,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, + WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -89,6 +90,9 @@ pub type LocationToAccountId = ( AccountId32Aliases, // Foreign locations alias into accounts according to a hash of their standard description. HashedDescription>, + // Different global consensus parachain sovereign account. + // (Used for over-bridge transfers and reserve processing) + GlobalConsensusParachainConvertsFor, ); /// Means for transacting the native currency on this chain. @@ -258,6 +262,17 @@ impl Contains for SafeCallFilter { } } + // Allow to change dedicated storage items (called by governance-like) + match call { + RuntimeCall::System(frame_system::Call::set_storage { items }) + if items.iter().all(|(k, _)| { + k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) || + k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) + }) => + return true, + _ => (), + }; + matches!( call, RuntimeCall::PolkadotXcm( @@ -444,6 +459,8 @@ impl Contains for SafeCallFilter { pallet_uniques::Call::set_collection_max_supply { .. } | pallet_uniques::Call::set_price { .. } | pallet_uniques::Call::buy_item { .. } + ) | RuntimeCall::ToPolkadotXcmRouter( + pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. } ) ) } @@ -462,11 +479,12 @@ pub type Barrier = TrailingSetTopicAsId< // If the message is one that immediately attempts to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, - // Parent, its pluralities (i.e. governance bodies) and parent's treasury - // pallet get free execution. + // Parent, its pluralities (i.e. governance bodies), parent's treasury and + // sibling bridge hub get free execution. AllowExplicitUnpaidExecutionFrom<( ParentOrParentsPlurality, Equals, + Equals, )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, @@ -512,16 +530,26 @@ pub type TrustedTeleporters = ( IsForeignConcreteAsset>>, ); +/// Multiplier used for dedicated `TakeFirstAssetTrader` with `ForeignAssets` instance. +pub type ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger = + AssetFeeAsExistentialDepositMultiplier< + Runtime, + WeightToFee, + pallet_assets::BalanceToAssetBalance, + ForeignAssetsInstance, + >; + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; - // Asset Hub Kusama does not recognize a reserve location for any asset. This does not prevent - // Asset Hub acting _as_ a reserve location for KSM and assets created under `pallet-assets`. - // For KSM, users must use teleport where allowed (e.g. with the Relay Chain). - type IsReserve = (); + // Asset Hub trusts only particular, pre-configured bridged locations from a different consensus + // as reserve locations (we trust the Bridge Hub to relay the message that a reserve is being + // held). Asset Hub may _act_ as a reserve location for KSM and assets created + // under `pallet-assets`. Users must use teleport where allowed (e.g. KSM with the Relay Chain). + type IsReserve = (bridging::to_polkadot::IsTrustedBridgedReserveLocationForConcreteAsset,); type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; @@ -532,6 +560,8 @@ impl xcm_executor::Config for XcmConfig { >; type Trader = ( UsingComponents>, + // This trader allows to pay with `is_sufficient=true` "Trust Backed" assets from dedicated + // `pallet_assets` instance - `Assets`. cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, @@ -543,6 +573,19 @@ impl xcm_executor::Config for XcmConfig { XcmAssetFeesReceiver, >, >, + // This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated + // `pallet_assets` instance - `ForeignAssets`. + cumulus_primitives_utility::TakeFirstAssetTrader< + AccountId, + ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger, + ForeignAssetsConvertedConcreteId, + ForeignAssets, + cumulus_primitives_utility::XcmFeesTo32ByteAccount< + ForeignFungiblesTransactor, + AccountId, + XcmAssetFeesReceiver, + >, + >, ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -554,7 +597,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeesToAccount; type MessageExporter = (); - type UniversalAliases = Nothing; + type UniversalAliases = bridging::to_polkadot::UniversalAliases; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; @@ -564,13 +607,23 @@ impl xcm_executor::Config for XcmConfig { /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; -/// The means for routing XCM messages which are not for local execution into the right message -/// queues. -pub type XcmRouter = WithUniqueTopic<( +/// For routing XCM messages which do not cross local consensus boundary. +type LocalXcmRouter = ( // Two routers - use UMP to communicate with the relay chain: cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, +); + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = WithUniqueTopic<( + // The means for routing XCM messages which are not for local execution into the right message + // queues. + LocalXcmRouter, + // Router which wraps and sends xcm to BridgeHub to be delivered to the Polkadot + // GlobalConsensus + ToPolkadotXcmRouter, )>; #[cfg(feature = "runtime-benchmarks")] @@ -660,3 +713,127 @@ where sp_std::boxed::Box::new(Self::asset_id(asset_id)) } } + +/// All configuration related to bridging +pub mod bridging { + use super::*; + use assets_common::matching; + use sp_std::collections::btree_set::BTreeSet; + use xcm_builder::NetworkExportTableItem; + + parameter_types! { + /// Base price of every Kusama -> Polkadot message. Can be adjusted via + /// governance `set_storage` call. + pub storage XcmBridgeHubRouterBaseFee: Balance = bp_bridge_hub_kusama::estimate_kusama_to_polkadot_message_fee( + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots::get() + ); + /// Price of every byte of the Kusama -> Polkadot message. Can be adjusted via + /// governance `set_storage` call. + pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get(); + + pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID; + pub SiblingBridgeHub: MultiLocation = MultiLocation::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); + /// Router expects payment with this `AssetId`. + /// (`AssetId` has to be aligned with `BridgeTable`) + pub XcmBridgeHubRouterFeeAssetId: AssetId = KsmLocation::get().into(); + + pub BridgeTable: sp_std::vec::Vec = + sp_std::vec::Vec::new().into_iter() + .chain(to_polkadot::BridgeTable::get()) + .collect(); + } + + pub type NetworkExportTable = xcm_builder::NetworkExportTable; + + pub mod to_polkadot { + use super::*; + + parameter_types! { + pub SiblingBridgeHubWithBridgeHubPolkadotInstance: MultiLocation = MultiLocation::new( + 1, + X2( + Parachain(SiblingBridgeHubParaId::get()), + PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX), + ) + ); + + pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot; + pub AssetHubPolkadot: MultiLocation = MultiLocation::new( + 2, + X2( + GlobalConsensus(PolkadotNetwork::get()), + Parachain(polkadot_runtime_constants::system_parachain::ASSET_HUB_ID), + ), + ); + pub DotLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(PolkadotNetwork::get()))); + + pub DotFromAssetHubPolkadot: (MultiAssetFilter, MultiLocation) = ( + Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) }), + AssetHubPolkadot::get() + ); + + /// Set up exporters configuration. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. + pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ + NetworkExportTableItem::new( + PolkadotNetwork::get(), + Some(sp_std::vec![ + AssetHubPolkadot::get().interior.split_global().expect("invalid configuration for AssetHubKusama").1, + ]), + SiblingBridgeHub::get(), + // base delivery fee to local `BridgeHub` + Some(( + XcmBridgeHubRouterFeeAssetId::get(), + XcmBridgeHubRouterBaseFee::get(), + ).into()) + ) + ]; + + /// Universal aliases + pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + sp_std::vec![ + (SiblingBridgeHubWithBridgeHubPolkadotInstance::get(), GlobalConsensus(PolkadotNetwork::get())) + ] + ); + } + + impl Contains<(MultiLocation, Junction)> for UniversalAliases { + fn contains(alias: &(MultiLocation, Junction)) -> bool { + UniversalAliases::get().contains(alias) + } + } + + /// Reserve locations filter for `xcm_executor::Config::IsReserve`. + /// Locations from which the runtime accepts reserved assets. + pub type IsTrustedBridgedReserveLocationForConcreteAsset = + matching::IsTrustedBridgedReserveLocationForConcreteAsset< + UniversalLocation, + ( + // allow receive DOT from AssetHubPolkadot + xcm_builder::Case, + // and nothing else + ), + >; + } + + /// Benchmarks helper for bridging configuration. + #[cfg(feature = "runtime-benchmarks")] + pub struct BridgingBenchmarksHelper; + + #[cfg(feature = "runtime-benchmarks")] + impl BridgingBenchmarksHelper { + pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> { + let alias = to_polkadot::UniversalAliases::get().into_iter().find_map( + |(location, junction)| { + match to_polkadot::SiblingBridgeHubWithBridgeHubPolkadotInstance::get() + .eq(&location) + { + true => Some((location, junction)), + false => None, + } + }, + ); + Some(alias.expect("we expect here BridgeHubKusama to Polkadot mapping at least")) + } + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index f207fb83de..a70901b5b4 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -17,16 +17,21 @@ //! Tests for the Kusama Asset Hub (previously known as Statemine) chain. -use asset_hub_kusama_runtime::xcm_config::{ - AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation, -}; -pub use asset_hub_kusama_runtime::{ - xcm_config::{CheckingAccount, ForeignCreatorsSovereignAccountOf, XcmConfig}, +use asset_hub_kusama_runtime::{ + xcm_config::{ + bridging::{self, XcmBridgeHubRouterFeeAssetId}, + AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, + ForeignCreatorsSovereignAccountOf, KsmLocation, LocationToAccountId, TreasuryAccount, + TrustBackedAssetsPalletLocation, XcmConfig, + }, AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, System, TrustBackedAssetsInstance, + RuntimeCall, RuntimeEvent, SessionKeys, ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, + XcmpQueue, +}; +use asset_test_utils::{ + test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, }; -use asset_test_utils::{CollatorSessionKeys, ExtBuilder}; use codec::{Decode, Encode}; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ @@ -48,6 +53,14 @@ type AssetIdForTrustBackedAssetsConvert = type RuntimeHelper = asset_test_utils::RuntimeHelper; +fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey { + CollatorSessionKey::new( + AccountId::from(account), + AccountId::from(account), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(account)) }, + ) +} + fn collator_session_keys() -> CollatorSessionKeys { CollatorSessionKeys::new( AccountId::from(ALICE), @@ -631,3 +644,602 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p assert_eq!(ForeignAssets::asset_ids().collect::>().len(), 1); }) ); + +fn bridging_to_asset_hub_polkadot() -> TestBridgingConfig { + TestBridgingConfig { + bridged_network: bridging::to_polkadot::PolkadotNetwork::get(), + local_bridge_hub_para_id: bridging::SiblingBridgeHubParaId::get(), + local_bridge_hub_location: bridging::SiblingBridgeHub::get(), + bridged_target_location: bridging::to_polkadot::AssetHubPolkadot::get(), + } +} + +#[test] +fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works() { + missing_asset_test_utils_test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + XcmpQueue, + LocationToAccountId, + >( + collator_session_keys(), + ExistentialDeposit::get(), + AccountId::from(ALICE), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + bridging_to_asset_hub_polkadot, + WeightLimit::Unlimited, + Some(XcmBridgeHubRouterFeeAssetId::get()), + TreasuryAccount::get(), + ) +} + +#[test] +fn receive_reserve_asset_deposited_roc_from_asset_hub_polkadot_works() { + const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; + asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + ForeignAssetsInstance, + >( + collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), + ExistentialDeposit::get(), + AccountId::from([73; 32]), + AccountId::from(BLOCK_AUTHOR_ACCOUNT), + // receiving ROCs + (MultiLocation { parents: 2, interior: X1(GlobalConsensus(Polkadot)) }, 1000000000000, 1_000_000_000), + bridging_to_asset_hub_polkadot, + ( + X1(PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX)), + GlobalConsensus(Polkadot), + X1(Parachain(1000)) + ) + ) +} + +#[test] +fn report_bridge_status_from_xcm_bridge_router_for_polkadot_works() { + missing_asset_test_utils_test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + ToPolkadotXcmRouterInstance, + >( + collator_session_keys(), + bridging_to_asset_hub_polkadot, + || Decode::decode(&mut &bp_asset_hub_kusama::CongestedMessage::get().encode()[..]).unwrap(), + || { + Decode::decode(&mut &bp_asset_hub_kusama::UncongestedMessage::get().encode()[..]) + .unwrap() + }, + ) +} + +#[test] +fn test_report_bridge_status_call_compatibility() { + // if this test fails, make sure `bp_asset_hub_polkadot` has valid encoding + assert_eq!( + RuntimeCall::ToPolkadotXcmRouter( + pallet_xcm_bridge_hub_router::Call::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + } + ) + .encode(), + bp_asset_hub_kusama::Call::ToPolkadotXcmRouter( + bp_asset_hub_kusama::XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + } + ) + .encode() + ) +} + +#[test] +fn check_sane_weight_report_bridge_status() { + use pallet_xcm_bridge_hub_router::WeightInfo; + let actual = >::WeightInfo::report_bridge_status(); + let max_weight = bp_asset_hub_kusama::XcmBridgeHubRouterTransactCallMaxWeight::get(); + assert!( + actual.all_lte(max_weight), + "max_weight: {:?} should be adjusted to actual {:?}", + max_weight, + actual + ); +} + +#[test] +fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::XcmBridgeHubRouterByteFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + ( + bridging::XcmBridgeHubRouterByteFee::key().to_vec(), + bridging::XcmBridgeHubRouterByteFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + +// missing stuff from asset_test_utils::test_cases_over_bridge +// TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 +mod missing_asset_test_utils_test_cases_over_bridge { + use asset_test_utils::test_cases_over_bridge::TestBridgingConfig; + use codec::Encode; + use cumulus_primitives_core::XcmpMessageSource; + use frame_support::{ + assert_ok, + traits::{Currency, Get, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError}, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use parachains_common::{AccountId, Balance}; + use parachains_runtimes_test_utils::{ + mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, + RuntimeHelper, ValidatorIdOf, XcmReceivedFrom, + }; + use sp_runtime::{traits::StaticLookup, Saturating}; + use xcm::{latest::prelude::*, VersionedMultiAssets}; + use xcm_builder::{CreateMatcher, MatchXcm}; + use xcm_executor::{ + traits::{ConvertLocation, TransactAsset}, + XcmExecutor, + }; + + /// Helper function to verify `xcm` contains all relevant instructions expected on destination + /// chain as part of a reserve-asset-transfer. + fn assert_matches_reserve_asset_deposited_instructions( + xcm: &mut Xcm, + expected_reserve_assets_deposited: &MultiAssets, + expected_beneficiary: &MultiLocation, + ) { + let _ = xcm + .0 + .matcher() + .skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..))) + .expect("no instruction ReserveAssetDeposited?") + .match_next_inst(|instr| match instr { + ReserveAssetDeposited(reserve_assets) => { + assert_eq!(reserve_assets, expected_reserve_assets_deposited); + Ok(()) + }, + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction ReserveAssetDeposited") + .match_next_inst(|instr| match instr { + ClearOrigin => Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction ClearOrigin") + .match_next_inst(|instr| match instr { + BuyExecution { .. } => Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction BuyExecution") + .match_next_inst(|instr| match instr { + DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => + Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction DepositAsset"); + } + + pub fn limited_reserve_transfer_assets_for_native_asset_works< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + HrmpChannelOpener, + HrmpChannelSource, + LocationToAccountId, + >( + collator_session_keys: CollatorSessionKeys, + existential_deposit: BalanceOf, + alice_account: AccountIdOf, + unwrap_pallet_xcm_event: Box) -> Option>>, + unwrap_xcmp_queue_event: Box< + dyn Fn(Vec) -> Option>, + >, + prepare_configuration: fn() -> TestBridgingConfig, + weight_limit: WeightLimit, + maybe_paid_export_message: Option, + delivery_fees_account: Option>, + ) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + cumulus_pallet_xcmp_queue::Config, + AllPalletsWithoutSystem: + OnInitialize> + OnFinalize>, + AccountIdOf: Into<[u8; 32]>, + ValidatorIdOf: From>, + BalanceOf: From, + ::Balance: From + Into, + XcmConfig: xcm_executor::Config, + LocationToAccountId: ConvertLocation>, + ::AccountId: + Into<<::RuntimeOrigin as OriginTrait>::AccountId>, + <::Lookup as StaticLookup>::Source: + From<::AccountId>, + ::AccountId: From, + HrmpChannelOpener: frame_support::inherent::ProvideInherent< + Call = cumulus_pallet_parachain_system::Call, + >, + HrmpChannelSource: XcmpMessageSource, + { + let runtime_para_id = 1000; + ExtBuilder::::default() + .with_collators(collator_session_keys.collators()) + .with_session_keys(collator_session_keys.session_keys()) + .with_tracing() + .with_safe_xcm_version(3) + .with_para_id(runtime_para_id.into()) + .build() + .execute_with(|| { + let mut alice = [0u8; 32]; + alice[0] = 1; + let included_head = RuntimeHelper::::run_to_block( + 2, + AccountId::from(alice).into(), + ); + + // prepare bridge config + let TestBridgingConfig { + bridged_network, + local_bridge_hub_para_id, + bridged_target_location: target_location_from_different_consensus, + .. + } = prepare_configuration(); + + let reserve_account = LocationToAccountId::convert_location( + &target_location_from_different_consensus, + ) + .expect("Sovereign account for reserves"); + let balance_to_transfer = 1_000_000_000_000_u128; + let native_asset = MultiLocation::parent(); + + // open HRMP to bridge hub + mock_open_hrmp_channel::( + runtime_para_id.into(), + local_bridge_hub_para_id.into(), + included_head, + &alice, + ); + + // drip ED to account + let alice_account_init_balance = existential_deposit + balance_to_transfer.into(); + let _ = >::deposit_creating( + &alice_account, + alice_account_init_balance, + ); + // SA of target location needs to have at least ED, otherwise making reserve fails + let _ = >::deposit_creating( + &reserve_account, + existential_deposit, + ); + + // we just check here, that user retains enough balance after withdrawal + // and also we check if `balance_to_transfer` is more than `existential_deposit`, + assert!( + (>::free_balance(&alice_account) - + balance_to_transfer.into()) >= + existential_deposit + ); + // SA has just ED + assert_eq!( + >::free_balance(&reserve_account), + existential_deposit + ); + + let delivery_fees_account_balance_before = delivery_fees_account + .as_ref() + .map(|dfa| >::free_balance(dfa)) + .unwrap_or(0.into()); + + // local native asset (pallet_balances) + let asset_to_transfer = MultiAsset { + fun: Fungible(balance_to_transfer.into()), + id: Concrete(native_asset), + }; + + // destination is (some) account relative to the destination different consensus + let target_destination_account = MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: Some(bridged_network), + id: sp_runtime::AccountId32::new([3; 32]).into(), + }), + }; + + let assets_to_transfer = MultiAssets::from(asset_to_transfer); + let mut expected_assets = assets_to_transfer.clone(); + let context = XcmConfig::UniversalLocation::get(); + expected_assets + .reanchor(&target_location_from_different_consensus, context) + .unwrap(); + + let expected_beneficiary = target_destination_account; + + // Make sure sender has enough funds for paying delivery fees + let handling_delivery_fees = { + // Probable XCM with `ReserveAssetDeposited`. + let mut expected_reserve_asset_deposited_message = Xcm(vec![ + ReserveAssetDeposited(MultiAssets::from(expected_assets.clone())), + ClearOrigin, + BuyExecution { + fees: MultiAsset { + id: Concrete(Default::default()), + fun: Fungible(balance_to_transfer), + }, + weight_limit: Unlimited, + }, + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: expected_beneficiary, + }, + SetTopic([ + 220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, + 112, 140, 247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, + 237, 173, + ]), + ]); + assert_matches_reserve_asset_deposited_instructions( + &mut expected_reserve_asset_deposited_message, + &expected_assets, + &expected_beneficiary, + ); + + // Call `SendXcm::validate` to get delivery fees. + let (_, delivery_fees): (_, MultiAssets) = XcmConfig::XcmSender::validate( + &mut Some(target_location_from_different_consensus), + &mut Some(expected_reserve_asset_deposited_message), + ) + .expect("validate passes"); + // Drip delivery fee to Alice account. + let mut delivery_fees_added = false; + for delivery_fee in delivery_fees.inner() { + assert_ok!(::deposit_asset( + &delivery_fee, + &MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: None, + id: alice_account.clone().into(), + }), + }, + None, + )); + delivery_fees_added = true; + } + delivery_fees_added + }; + + // do pallet_xcm call reserve transfer + assert_ok!(>::limited_reserve_transfer_assets( + RuntimeHelper::::origin_of( + alice_account.clone() + ), + Box::new(target_location_from_different_consensus.into_versioned()), + Box::new(target_destination_account.into_versioned()), + Box::new(VersionedMultiAssets::from(assets_to_transfer)), + 0, + weight_limit, + )); + + // check events + // check pallet_xcm attempted + RuntimeHelper::::assert_pallet_xcm_event_outcome( + &unwrap_pallet_xcm_event, + |outcome| { + assert_ok!(outcome.ensure_complete()); + }, + ); + + // check that xcm was sent + let xcm_sent_message_hash = >::events() + .into_iter() + .filter_map(|e| unwrap_xcmp_queue_event(e.event.encode())) + .find_map(|e| match e { + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => + Some(message_hash), + _ => None, + }); + + // read xcm + let xcm_sent = + RuntimeHelper::::take_xcm( + local_bridge_hub_para_id.into(), + ) + .unwrap(); + assert_eq!( + xcm_sent_message_hash, + Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256)) + ); + let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm"); + + // check sent XCM ExportMessage to BridgeHub + + // 1. check paid or unpaid + if let Some(expected_fee_asset_id) = maybe_paid_export_message { + xcm_sent + .0 + .matcher() + .match_next_inst(|instr| match instr { + WithdrawAsset(_) => Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains WithdrawAsset") + .match_next_inst(|instr| match instr { + BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => + Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains BuyExecution") + } else { + xcm_sent + .0 + .matcher() + .match_next_inst(|instr| match instr { + // first instruction could be UnpaidExecution (because we could have + // explicit unpaid execution on BridgeHub) + UnpaidExecution { weight_limit, check_origin } + if weight_limit == &Unlimited && check_origin.is_none() => + Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains UnpaidExecution") + } + // 2. check ExportMessage + .match_next_inst(|instr| match instr { + // next instruction is ExportMessage + ExportMessage { network, destination, xcm: inner_xcm } => { + assert_eq!(network, &bridged_network); + let (_, target_location_junctions_without_global_consensus) = + target_location_from_different_consensus + .interior + .split_global() + .expect("split works"); + assert_eq!( + destination, + &target_location_junctions_without_global_consensus + ); + assert_matches_reserve_asset_deposited_instructions( + inner_xcm, + &expected_assets, + &expected_beneficiary, + ); + Ok(()) + }, + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains ExportMessage"); + + // check alice account decreased by balance_to_transfer + assert_eq!( + >::free_balance(&alice_account), + alice_account_init_balance + .saturating_sub(existential_deposit) + .saturating_sub(balance_to_transfer.into()) + ); + + // check reserve account increased by balance_to_transfer + assert_eq!( + >::free_balance(&reserve_account), + existential_deposit + balance_to_transfer.into() + ); + + // check dedicated account increased by delivery fees (if configured) + if handling_delivery_fees { + if let Some(delivery_fees_account) = delivery_fees_account { + let delivery_fees_account_balance_after = + >::free_balance( + &delivery_fees_account, + ); + assert!( + delivery_fees_account_balance_after > + delivery_fees_account_balance_before + ); + } + } + }) + } + + pub fn report_bridge_status_from_xcm_bridge_router_works< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + XcmBridgeHubRouterInstance, + >( + collator_session_keys: CollatorSessionKeys, + prepare_configuration: fn() -> TestBridgingConfig, + congested_message: fn() -> Xcm, + uncongested_message: fn() -> Xcm, + ) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + cumulus_pallet_xcmp_queue::Config + + pallet_xcm_bridge_hub_router::Config, + AllPalletsWithoutSystem: + OnInitialize> + OnFinalize>, + AccountIdOf: Into<[u8; 32]>, + ValidatorIdOf: From>, + BalanceOf: From, + ::Balance: From + Into, + XcmConfig: xcm_executor::Config, + LocationToAccountId: ConvertLocation>, + ::AccountId: + Into<<::RuntimeOrigin as OriginTrait>::AccountId>, + <::Lookup as StaticLookup>::Source: + From<::AccountId>, + ::AccountId: From, + XcmBridgeHubRouterInstance: 'static, + { + ExtBuilder::::default() + .with_collators(collator_session_keys.collators()) + .with_session_keys(collator_session_keys.session_keys()) + .with_tracing() + .build() + .execute_with(|| { + let report_bridge_status = |is_congested: bool| { + // prepare bridge config + let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration(); + + // Call received XCM execution + let xcm = if is_congested { congested_message() } else { uncongested_message() }; + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + + // execute xcm as XcmpQueue would do + let outcome = XcmExecutor::::execute_xcm( + local_bridge_hub_location, + xcm, + hash, + RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), + ); + assert_eq!(outcome.ensure_complete(), Ok(())); + assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::::bridge().is_congested); + }; + + report_bridge_status(true); + report_bridge_status(false); + }) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 0b626126ed..649e1f6513 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -12,8 +12,16 @@ version.workspace = true codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1", optional = true } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -smallvec = "1.11.0" +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.1" + +# Local +bp-asset-hub-kusama = { path = "../asset-hub-kusama/primitives", default-features = false} +bp-asset-hub-polkadot = { path = "./primitives", default-features = false} +bp-bridge-hub-kusama = { path = "../../bridge-hubs/bridge-hub-kusama/primitives", default-features = false} +bp-bridge-hub-polkadot = { path = "../../bridge-hubs/bridge-hub-polkadot/primitives", default-features = false} +kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } @@ -59,7 +67,6 @@ pallet-xcm-benchmarks = { default-features = false, optional = true , version = polkadot-core-primitives = { default-features = false, version = "4.0.0" } polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } polkadot-runtime-common = { default-features = false, version = "4.0.0" } -polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } @@ -70,7 +77,7 @@ cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } cumulus-primitives-core = { default-features = false , version = "0.4.0" } cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } @@ -79,9 +86,14 @@ parachains-common = { default-features = false , version = "4.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } assets-common = { default-features = false , version = "0.4.0" } +# Bridges +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } + [dev-dependencies] hex-literal = "0.4.1" asset-test-utils = { version = "4.0.0" } +parachains-runtimes-test-utils = { version = "4.0.0" } +sp-io = { version = "27.0.0" } [build-dependencies] substrate-wasm-builder = { optional = true , version = "14.0.0" } @@ -110,6 +122,7 @@ runtime-benchmarks = [ "pallet-uniques/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub-router/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", @@ -141,6 +154,7 @@ try-runtime = [ "pallet-transaction-payment/try-runtime", "pallet-uniques/try-runtime", "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub-router/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", @@ -148,6 +162,10 @@ try-runtime = [ ] std = [ "assets-common/std", + "bp-asset-hub-kusama/std", + "bp-asset-hub-polkadot/std", + "bp-bridge-hub-kusama/std", + "bp-bridge-hub-polkadot/std", "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", @@ -164,6 +182,7 @@ std = [ "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime?/std", + "kusama-runtime-constants/std", "log/std", "pallet-asset-tx-payment/std", "pallet-assets/std", @@ -182,6 +201,7 @@ std = [ "pallet-uniques/std", "pallet-utility/std", "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub-router/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml new file mode 100644 index 0000000000..939fb36e34 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "bp-asset-hub-polkadot" +description = "Primitives of AssetHubPolkadot parachain runtime." +repository.workspace = true +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } + +# Bridge Dependencies +bp-xcm-bridge-hub-router = { default-features = false , version = "0.3.0" } + +# Substrate Based Dependencies +frame-support = { default-features = false, version = "25.0.0" } +sp-std = { default-features = false, version = "12.0.0" } + +# Polkadot +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } + +[features] +default = [ "std" ] +std = [ + "bp-xcm-bridge-hub-router/std", + "codec/std", + "frame-support/std", + "scale-info/std", + "sp-std/std", + "xcm/std" +] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs new file mode 100644 index 0000000000..c16da851dd --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs @@ -0,0 +1,68 @@ +// 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 . + +//! Module with configuration which reflects AssetHubPolkadot runtime setup. + +#![cfg_attr(not(feature = "std"), no_std)] + +use codec::{Decode, Encode}; +use frame_support::weights::Weight; +use scale_info::TypeInfo; +use xcm::prelude::*; + +pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; + +/// `AssetHubPolkadot` Runtime `Call` enum. +/// +/// The enum represents a subset of possible `Call`s we can send to `AssetHubPolkadot` chain. +/// Ideally this code would be auto-generated from metadata, because we want to +/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. +/// +/// All entries here (like pretty much in the entire file) must be kept in sync with +/// `AssetHubPolkadot` `construct_runtime`, so that we maintain SCALE-compatibility. +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum Call { + /// `ToKusamaXcmRouter` bridge pallet. + #[codec(index = 34)] + ToKusamaXcmRouter(XcmBridgeHubRouterCall), +} + +frame_support::parameter_types! { + /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. + pub const XcmBridgeHubRouterTransactCallMaxWeight: Weight = Weight::from_parts(200_000_000, 6144); + + /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes congested. + pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); + /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes uncongested. + pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); +} + +fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { + sp_std::vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Xcm, + require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), + call: Call::ToKusamaXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested, + }) + .encode() + .into(), + } + ] +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 7bdffa19bb..87ec19b53b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -87,7 +87,7 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, OnRuntimeUpgrade, }, weights::{ConstantMultiplier, Weight}, @@ -752,6 +752,37 @@ impl pallet_nfts::Config for Runtime { type Helper = (); } +/// XCM router instance to BridgeHub with bridging capabilities for `Kusama` global +/// consensus with dynamic fees and back-pressure. +pub type ToKusamaXcmRouterInstance = pallet_xcm_bridge_hub_router::Instance1; +impl pallet_xcm_bridge_hub_router::Config for Runtime { + type WeightInfo = weights::pallet_xcm_bridge_hub_router::WeightInfo; + + type UniversalLocation = xcm_config::UniversalLocation; + type BridgedNetworkId = xcm_config::bridging::to_kusama::KusamaNetwork; + type Bridges = xcm_config::bridging::NetworkExportTable; + + #[cfg(not(feature = "runtime-benchmarks"))] + type BridgeHubOrigin = EnsureXcm>; + #[cfg(feature = "runtime-benchmarks")] + type BridgeHubOrigin = frame_support::traits::EitherOfDiverse< + // for running benchmarks + EnsureRoot, + // for running tests with `--feature runtime-benchmarks` + EnsureXcm>, + >; + + type ToBridgeHubSender = XcmpQueue; + type WithBridgeHubChannel = + cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider< + xcm_config::bridging::SiblingBridgeHubParaId, + Runtime, + >; + + type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; + type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -782,6 +813,7 @@ construct_runtime!( PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + ToKusamaXcmRouter: pallet_xcm_bridge_hub_router::::{Pallet, Storage, Call} = 34, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -863,6 +895,8 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM [pallet_xcm, PolkadotXcm] + // Bridges + [pallet_xcm_bridge_hub_router, ToKusama] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -1086,6 +1120,7 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; // This is defined once again in dispatch_benchmark, because list_benchmarks! // and add_benchmarks! are macros exported by define_benchmarks! macros and those types @@ -1100,6 +1135,8 @@ impl_runtime_apis! { type Local = pallet_assets::Pallet::; type Foreign = pallet_assets::Pallet::; + type ToKusama = XcmBridgeHubRouterBench; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -1183,7 +1220,13 @@ impl_runtime_apis! { MultiAsset { fun: Fungible(UNITS), id: Concrete(DotLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + // AssetHubPolkadot trusts AssetHubKusama as reserve for KSMs + pub TrustedReserve: Option<(MultiLocation, MultiAsset)> = Some( + ( + xcm_config::bridging::to_kusama::AssetHubKusama::get(), + MultiAsset::from((xcm_config::bridging::to_kusama::KsmLocation::get(), 1000000000000 as u128)) + ) + ); } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -1214,7 +1257,8 @@ impl_runtime_apis! { } fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { - Err(BenchmarkError::Skip) + xcm_config::bridging::BridgingBenchmarksHelper::prepare_universal_alias() + .ok_or(BenchmarkError::Skip) } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { @@ -1246,12 +1290,34 @@ impl_runtime_apis! { } } + use pallet_xcm_bridge_hub_router::benchmarking::{ + Pallet as XcmBridgeHubRouterBench, + Config as XcmBridgeHubRouterConfig, + }; + + impl XcmBridgeHubRouterConfig for Runtime { + fn make_congested() { + cumulus_pallet_xcmp_queue::bridging::suspend_channel_for_benchmarks::( + xcm_config::bridging::SiblingBridgeHubParaId::get().into() + ); + } + + fn ensure_bridged_target_destination() -> MultiLocation { + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + xcm_config::bridging::SiblingBridgeHubParaId::get().into() + ); + xcm_config::bridging::to_kusama::AssetHubKusama::get() + } + } + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; type Local = pallet_assets::Pallet::; type Foreign = pallet_assets::Pallet::; + type ToKusama = XcmBridgeHubRouterBench; + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs index d3408c738d..ae08c4f1f4 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs @@ -30,6 +30,7 @@ pub mod pallet_timestamp; pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_xcm; +pub mod pallet_xcm_bridge_hub_router; pub mod paritydb_weights; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs new file mode 100644 index 0000000000..744a6a3111 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs @@ -0,0 +1,110 @@ + +//! Autogenerated weights for `pallet_xcm_bridge_hub_router` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("ah-polkadot-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// ah-polkadot-local-raw.json +// --pallet +// pallet-xcm-bridge-hub-router +// --extrinsic +// * +// --output=system-parachains/asset-hubs/asset-hub-polkadot/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_xcm_bridge_hub_router`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm_bridge_hub_router::WeightInfo for WeightInfo { + /// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + fn on_initialize_when_non_congested() -> Weight { + // Proof Size summary in bytes: + // Measured: `193` + // Estimated: `1678` + // Minimum execution time: 10_726_000 picoseconds. + Weight::from_parts(11_346_000, 0) + .saturating_add(Weight::from_parts(0, 1678)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn on_initialize_when_congested() -> Weight { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_975_000 picoseconds. + Weight::from_parts(5_197_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(2)) + } + /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + fn report_bridge_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `117` + // Estimated: `1502` + // Minimum execution time: 13_131_000 picoseconds. + Weight::from_parts(13_897_000, 0) + .saturating_add(Weight::from_parts(0, 1502)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) + /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn send_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `355` + // Estimated: `3820` + // Minimum execution time: 66_293_000 picoseconds. + Weight::from_parts(68_872_000, 0) + .saturating_add(Weight::from_parts(0, 3820)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs index eb140c4bf3..b34f4ed16c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs @@ -209,7 +209,7 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { XcmGeneric::::clear_transact_status() } fn universal_origin(_: &Junction) -> Weight { - Weight::MAX + XcmGeneric::::universal_origin() } fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 2120b3ddcf..82eed68ead 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -97,15 +97,15 @@ impl WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .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 { + // Storage: `ParachainInfo::ParachainId` (r:1 w:0) + // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + pub fn reserve_asset_deposited() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. - Weight::from_parts(18_446_744_073_709_551_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Estimated: `1489` + // Minimum execution time: 9_365_000 picoseconds. + Weight::from_parts(9_576_000, 1489) + .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 061992691a..cfb68a99d2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -1,44 +1,26 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus 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. - -// Cumulus 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 Cumulus. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024 +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: Compiled, CHAIN: Some("ah-polkadot-local-raw.json"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=asset-hub-polkadot-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::generic -// --no-storage-info +// --chain +// ah-polkadot-local-raw.json +// --pallet +// pallet-xcm-benchmarks::generic +// --extrinsic +// report_holding,buy_execution,query_response,transact,refund_surplus,set_error_handler,set_appendix,clear_error,descend_origin,clear_origin,report_error,claim_asset,trap,subscribe_version,unsubscribe_version,burn_asset,expect_asset,expect_origin,expect_error,expect_transact_status,query_pallet,report_transact_status,clear_transact_status,set_topic,clear_topic,export_message,set_fees_mode,unpaid_execution,universal_origin +// --template=../polkadot-sdk/cumulus/templates/xcm-bench-template.hbs +// --output=system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm // --no-median-slopes // --no-min-squares -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json -// --header=./file_header.txt -// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,31 +34,35 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 425_235_000 picoseconds. - Weight::from_parts(432_935_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `176` + // Estimated: `6196` + // Minimum execution time: 611_886_000 picoseconds. + Weight::from_parts(620_695_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_070_000 picoseconds. - Weight::from_parts(4_329_000, 0) + // Minimum execution time: 4_383_000 picoseconds. + Weight::from_parts(4_500_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -84,79 +70,83 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `3534` - // Minimum execution time: 11_464_000 picoseconds. - Weight::from_parts(11_829_000, 3534) + // Minimum execution time: 12_188_000 picoseconds. + Weight::from_parts(12_476_000, 3534) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_574_000 picoseconds. - Weight::from_parts(14_021_000, 0) + // Minimum execution time: 14_331_000 picoseconds. + Weight::from_parts(14_711_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_276_000 picoseconds. - Weight::from_parts(4_479_000, 0) + // Minimum execution time: 4_530_000 picoseconds. + Weight::from_parts(4_631_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_833_000 picoseconds. - Weight::from_parts(2_939_000, 0) + // Minimum execution time: 2_991_000 picoseconds. + Weight::from_parts(3_066_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_797_000 picoseconds. - Weight::from_parts(2_901_000, 0) + // Minimum execution time: 2_973_000 picoseconds. + Weight::from_parts(3_078_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_855_000 picoseconds. - Weight::from_parts(2_961_000, 0) + // Minimum execution time: 2_949_000 picoseconds. + Weight::from_parts(3_045_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_589_000 picoseconds. - Weight::from_parts(3_720_000, 0) + // Minimum execution time: 4_213_000 picoseconds. + Weight::from_parts(4_293_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_786_000 picoseconds. - Weight::from_parts(2_889_000, 0) + // Minimum execution time: 2_955_000 picoseconds. + Weight::from_parts(3_007_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 25_740_000 picoseconds. - Weight::from_parts(26_355_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `176` + // Estimated: `6196` + // Minimum execution time: 57_532_000 picoseconds. + Weight::from_parts(58_060_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) // Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -164,8 +154,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `126` // Estimated: `3591` - // Minimum execution time: 16_206_000 picoseconds. - Weight::from_parts(16_651_000, 3591) + // Minimum execution time: 16_409_000 picoseconds. + Weight::from_parts(16_751_000, 3591) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,11 +163,13 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_819_000 picoseconds. - Weight::from_parts(2_944_000, 0) + // Minimum execution time: 2_957_000 picoseconds. + Weight::from_parts(3_020_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -192,9 +184,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 28_216_000 picoseconds. - Weight::from_parts(28_878_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) + // Minimum execution time: 31_366_000 picoseconds. + Weight::from_parts(32_271_000, 3540) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) @@ -203,127 +195,140 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_795_000 picoseconds. - Weight::from_parts(5_008_000, 0) + // Minimum execution time: 5_330_000 picoseconds. + Weight::from_parts(5_528_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: 135_205_000 picoseconds. - Weight::from_parts(140_623_000, 0) + // Minimum execution time: 201_668_000 picoseconds. + Weight::from_parts(202_392_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_791_000 picoseconds. - Weight::from_parts(13_114_000, 0) + // Minimum execution time: 17_274_000 picoseconds. + Weight::from_parts(17_475_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_091_000, 0) + // Minimum execution time: 3_156_000 picoseconds. + Weight::from_parts(3_215_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_828_000 picoseconds. - Weight::from_parts(2_947_000, 0) + // Minimum execution time: 2_975_000 picoseconds. + Weight::from_parts(3_048_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_980_000 picoseconds. - Weight::from_parts(3_123_000, 0) + // Minimum execution time: 3_194_000 picoseconds. + Weight::from_parts(3_274_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 29_672_000 picoseconds. - Weight::from_parts(30_318_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - pub fn expect_pallet() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_421_000 picoseconds. - Weight::from_parts(5_614_000, 0) + // Measured: `176` + // Estimated: `6196` + // Minimum execution time: 62_377_000 picoseconds. + Weight::from_parts(63_285_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 25_621_000 picoseconds. - Weight::from_parts(26_486_000, 3540) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `176` + // Estimated: `6196` + // Minimum execution time: 57_515_000 picoseconds. + Weight::from_parts(58_410_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .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_873_000 picoseconds. - Weight::from_parts(2_973_000, 0) + // Minimum execution time: 3_026_000 picoseconds. + Weight::from_parts(3_100_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_861_000 picoseconds. - Weight::from_parts(2_923_000, 0) + // Minimum execution time: 2_991_000 picoseconds. + Weight::from_parts(3_057_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_845_000 picoseconds. - Weight::from_parts(2_970_000, 0) + // Minimum execution time: 2_895_000 picoseconds. + Weight::from_parts(3_036_000, 0) + } + // Storage: `ParachainInfo::ParachainId` (r:1 w:0) + // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + pub fn universal_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1489` + // Minimum execution time: 5_985_000 picoseconds. + Weight::from_parts(6_133_000, 1489) + .saturating_add(T::DbWeight::get().reads(1)) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_773_000 picoseconds. - Weight::from_parts(2_922_000, 0) + // Minimum execution time: 2_940_000 picoseconds. + Weight::from_parts(3_043_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_980_000 picoseconds. - Weight::from_parts(3_095_000, 0) + // Minimum execution time: 3_194_000 picoseconds. + Weight::from_parts(3_245_000, 0) } } + +impl WeightInfo { pub fn expect_pallet() -> Weight { Weight::from_parts(5_756_000, 0) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 8d5b6339b7..4f6393a35f 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -16,8 +16,10 @@ use super::{ AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ForeignAssets, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + RuntimeEvent, RuntimeOrigin, ToKusamaXcmRouter, TransactionByteFee, TrustBackedAssetsInstance, + WeightToFee, XcmpQueue, }; +use crate::ForeignAssetsInstance; use assets_common::matching::{FromSiblingParachain, IsForeignConcreteAsset}; use frame_support::{ match_types, parameter_types, @@ -41,12 +43,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, + WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -78,6 +80,9 @@ pub type LocationToAccountId = ( AccountId32Aliases, // Foreign locations alias into accounts according to a hash of their standard description. HashedDescription>, + // Different global consensus parachain sovereign account. + // (Used for over-bridge transfers and reserve processing) + GlobalConsensusParachainConvertsFor, ); /// Means for transacting the native currency on this chain. @@ -215,6 +220,17 @@ impl Contains for SafeCallFilter { } } + // Allow to change dedicated storage items (called by governance-like) + match call { + RuntimeCall::System(frame_system::Call::set_storage { items }) + if items.iter().all(|(k, _)| { + k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) || + k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) + }) => + return true, + _ => (), + }; + matches!( call, RuntimeCall::PolkadotXcm( @@ -360,6 +376,8 @@ impl Contains for SafeCallFilter { pallet_uniques::Call::set_collection_max_supply { .. } | pallet_uniques::Call::set_price { .. } | pallet_uniques::Call::buy_item { .. } + ) | RuntimeCall::ToKusamaXcmRouter( + pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. } ) ) } @@ -379,10 +397,13 @@ pub type Barrier = TrailingSetTopicAsId< // allow it. AllowTopLevelPaidExecutionFrom, // The locations listed below get free execution. + // Parent, its pluralities (i.e. governance bodies), the Fellows plurality and + // sibling bridge hub get free execution. AllowExplicitUnpaidExecutionFrom<( ParentOrParentsPlurality, FellowshipEntities, Equals, + Equals, )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, @@ -431,16 +452,26 @@ pub type TrustedTeleporters = ( IsForeignConcreteAsset>>, ); +/// Multiplier used for dedicated `TakeFirstAssetTrader` with `ForeignAssets` instance. +pub type ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger = + AssetFeeAsExistentialDepositMultiplier< + Runtime, + WeightToFee, + pallet_assets::BalanceToAssetBalance, + ForeignAssetsInstance, + >; + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; - // Asset Hub Polkadot does not recognize a reserve location for any asset. This does not prevent - // Asset Hub acting _as_ a reserve location for DOT and assets created under `pallet-assets`. - // For DOT, users must use teleport where allowed (e.g. with the Relay Chain). - type IsReserve = (); + // Asset Hub trusts only particular, pre-configured bridged locations from a different consensus + // as reserve locations (we trust the Bridge Hub to relay the message that a reserve is being + // held). Asset Hub may _act_ as a reserve location for DOT and assets created + // under `pallet-assets`. Users must use teleport where allowed (e.g. DOT with the Relay Chain). + type IsReserve = (bridging::to_kusama::IsTrustedBridgedReserveLocationForConcreteAsset,); type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; @@ -451,6 +482,8 @@ impl xcm_executor::Config for XcmConfig { >; type Trader = ( UsingComponents>, + // This trader allows to pay with `is_sufficient=true` "Trust Backed" assets from dedicated + // `pallet_assets` instance - `Assets`. cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, @@ -462,6 +495,19 @@ impl xcm_executor::Config for XcmConfig { XcmAssetFeesReceiver, >, >, + // This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated + // `pallet_assets` instance - `ForeignAssets`. + cumulus_primitives_utility::TakeFirstAssetTrader< + AccountId, + ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger, + ForeignAssetsConvertedConcreteId, + ForeignAssets, + cumulus_primitives_utility::XcmFeesTo32ByteAccount< + ForeignFungiblesTransactor, + AccountId, + XcmAssetFeesReceiver, + >, + >, ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -473,7 +519,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeesToAccount; type MessageExporter = (); - type UniversalAliases = Nothing; + type UniversalAliases = bridging::to_kusama::UniversalAliases; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; @@ -483,13 +529,23 @@ impl xcm_executor::Config for XcmConfig { /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; -/// The means for routing XCM messages which are not for local execution into the right message -/// queues. -pub type XcmRouter = WithUniqueTopic<( +/// For routing XCM messages which do not cross local consensus boundary. +type LocalXcmRouter = ( // Two routers - use UMP to communicate with the relay chain: cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, +); + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = WithUniqueTopic<( + // The means for routing XCM messages which are not for local execution into the right message + // queues. + LocalXcmRouter, + // Router which wraps and sends xcm to BridgeHub to be delivered to the Kusama + // GlobalConsensus + ToKusamaXcmRouter, )>; #[cfg(feature = "runtime-benchmarks")] @@ -553,6 +609,129 @@ impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { } } +/// All configuration related to bridging +pub mod bridging { + use super::*; + use assets_common::matching; + use sp_std::collections::btree_set::BTreeSet; + use xcm_builder::NetworkExportTableItem; + + parameter_types! { + /// Base price of every Polkadot -> Kusama message. Can be adjusted via + /// governance `set_storage` call. + pub storage XcmBridgeHubRouterBaseFee: Balance = bp_bridge_hub_polkadot::estimate_polkadot_to_kusama_message_fee( + bp_bridge_hub_kusama::BridgeHubKusamaBaseDeliveryFeeInKsms::get() + ); + /// Price of every byte of the Polkadot -> Kusama message. Can be adjusted via + /// governance `set_storage` call. + pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get(); + + pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID; + pub SiblingBridgeHub: MultiLocation = MultiLocation::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); + /// Router expects payment with this `AssetId`. + /// (`AssetId` has to be aligned with `BridgeTable`) + pub XcmBridgeHubRouterFeeAssetId: AssetId = DotLocation::get().into(); + + pub BridgeTable: sp_std::vec::Vec = + sp_std::vec::Vec::new().into_iter() + .chain(to_kusama::BridgeTable::get()) + .collect(); + } + + pub type NetworkExportTable = xcm_builder::NetworkExportTable; + + pub mod to_kusama { + use super::*; + + parameter_types! { + pub SiblingBridgeHubWithBridgeHubKusamaInstance: MultiLocation = MultiLocation::new( + 1, + X2( + Parachain(SiblingBridgeHubParaId::get()), + PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX), + ) + ); + + pub const KusamaNetwork: NetworkId = NetworkId::Kusama; + pub AssetHubKusama: MultiLocation = MultiLocation::new( + 2, + X2( + GlobalConsensus(KusamaNetwork::get()), + Parachain(kusama_runtime_constants::system_parachain::ASSET_HUB_ID), + ), + ); + pub KsmLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(KusamaNetwork::get()))); + + pub KsmFromAssetHubKusama: (MultiAssetFilter, MultiLocation) = ( + Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }), + AssetHubKusama::get() + ); + + /// Set up exporters configuration. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. + pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ + NetworkExportTableItem::new( + KusamaNetwork::get(), + Some(sp_std::vec![ + AssetHubKusama::get().interior.split_global().expect("invalid configuration for AssetHubPolkadot").1, + ]), + SiblingBridgeHub::get(), + // base delivery fee to local `BridgeHub` + Some(( + XcmBridgeHubRouterFeeAssetId::get(), + XcmBridgeHubRouterBaseFee::get(), + ).into()) + ) + ]; + + /// Universal aliases + pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + sp_std::vec![ + (SiblingBridgeHubWithBridgeHubKusamaInstance::get(), GlobalConsensus(KusamaNetwork::get())) + ] + ); + } + + impl Contains<(MultiLocation, Junction)> for UniversalAliases { + fn contains(alias: &(MultiLocation, Junction)) -> bool { + UniversalAliases::get().contains(alias) + } + } + + /// Reserve locations filter for `xcm_executor::Config::IsReserve`. + /// Locations from which the runtime accepts reserved assets. + pub type IsTrustedBridgedReserveLocationForConcreteAsset = + matching::IsTrustedBridgedReserveLocationForConcreteAsset< + UniversalLocation, + ( + // allow receive KSM from AssetHubKusama + xcm_builder::Case, + // and nothing else + ), + >; + } + + /// Benchmarks helper for bridging configuration. + #[cfg(feature = "runtime-benchmarks")] + pub struct BridgingBenchmarksHelper; + + #[cfg(feature = "runtime-benchmarks")] + impl BridgingBenchmarksHelper { + pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> { + let alias = + to_kusama::UniversalAliases::get().into_iter().find_map(|(location, junction)| { + match to_kusama::SiblingBridgeHubWithBridgeHubKusamaInstance::get() + .eq(&location) + { + true => Some((location, junction)), + false => None, + } + }); + Some(alias.expect("we expect here BridgeHubPolkadot to Kusama mapping at least")) + } + } +} + #[test] fn foreign_pallet_has_correct_local_account() { use sp_core::crypto::{Ss58AddressFormat, Ss58Codec}; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index c56381e099..e5c53f39b2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -17,16 +17,21 @@ //! Tests for the Polkadot Asset Hub (previously known as Statemint) chain. -use asset_hub_polkadot_runtime::xcm_config::{ - AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation, - ForeignCreatorsSovereignAccountOf, TrustBackedAssetsPalletLocation, XcmConfig, -}; -pub use asset_hub_polkadot_runtime::{ +use asset_hub_polkadot_runtime::{ + xcm_config::{ + bridging::{self, XcmBridgeHubRouterFeeAssetId}, + AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation, + ForeignCreatorsSovereignAccountOf, LocationToAccountId, TreasuryAccount, + TrustBackedAssetsPalletLocation, XcmConfig, + }, AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, System, TrustBackedAssetsInstance, + RuntimeCall, RuntimeEvent, SessionKeys, ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, + XcmpQueue, +}; +use asset_test_utils::{ + test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, }; -use asset_test_utils::{CollatorSessionKeys, ExtBuilder}; use codec::{Decode, Encode}; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ @@ -50,6 +55,14 @@ type AssetIdForTrustBackedAssetsConvert = type RuntimeHelper = asset_test_utils::RuntimeHelper; +fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey { + CollatorSessionKey::new( + AccountId::from(account), + AccountId::from(account), + SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(account)) }, + ) +} + fn collator_session_keys() -> CollatorSessionKeys { CollatorSessionKeys::new( AccountId::from(ALICE), @@ -657,3 +670,601 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p assert_eq!(ForeignAssets::asset_ids().collect::>().len(), 1); }) ); + +fn bridging_to_asset_hub_kusama() -> TestBridgingConfig { + TestBridgingConfig { + bridged_network: bridging::to_kusama::KusamaNetwork::get(), + local_bridge_hub_para_id: bridging::SiblingBridgeHubParaId::get(), + local_bridge_hub_location: bridging::SiblingBridgeHub::get(), + bridged_target_location: bridging::to_kusama::AssetHubKusama::get(), + } +} + +#[test] +fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() { + missing_asset_test_utils_test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + XcmpQueue, + LocationToAccountId, + >( + collator_session_keys(), + ExistentialDeposit::get(), + AccountId::from(ALICE), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + bridging_to_asset_hub_kusama, + WeightLimit::Unlimited, + Some(XcmBridgeHubRouterFeeAssetId::get()), + TreasuryAccount::get(), + ) +} +#[test] +fn receive_reserve_asset_deposited_roc_from_asset_hub_kusama_works() { + const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; + asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + ForeignAssetsInstance, + >( + collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), + ExistentialDeposit::get(), + AccountId::from([73; 32]), + AccountId::from(BLOCK_AUTHOR_ACCOUNT), + // receiving ROCs + (MultiLocation { parents: 2, interior: X1(GlobalConsensus(Kusama)) }, 1000000000000, 1_000_000_000), + bridging_to_asset_hub_kusama, + ( + X1(PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX)), + GlobalConsensus(Kusama), + X1(Parachain(1000)) + ) + ) +} +#[test] +fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { + missing_asset_test_utils_test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + ToKusamaXcmRouterInstance, + >( + collator_session_keys(), + bridging_to_asset_hub_kusama, + || { + Decode::decode(&mut &bp_asset_hub_polkadot::CongestedMessage::get().encode()[..]) + .unwrap() + }, + || { + Decode::decode(&mut &bp_asset_hub_polkadot::UncongestedMessage::get().encode()[..]) + .unwrap() + }, + ) +} + +#[test] +fn test_report_bridge_status_call_compatibility() { + // if this test fails, make sure `bp_asset_hub_kusama` has valid encoding + assert_eq!( + RuntimeCall::ToKusamaXcmRouter(pallet_xcm_bridge_hub_router::Call::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + }) + .encode(), + bp_asset_hub_polkadot::Call::ToKusamaXcmRouter( + bp_asset_hub_polkadot::XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + } + ) + .encode() + ) +} + +#[test] +fn check_sane_weight_report_bridge_status() { + use pallet_xcm_bridge_hub_router::WeightInfo; + let actual = >::WeightInfo::report_bridge_status(); + let max_weight = bp_asset_hub_polkadot::XcmBridgeHubRouterTransactCallMaxWeight::get(); + assert!( + actual.all_lte(max_weight), + "max_weight: {:?} should be adjusted to actual {:?}", + max_weight, + actual + ); +} + +#[test] +fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::XcmBridgeHubRouterByteFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + ( + bridging::XcmBridgeHubRouterByteFee::key().to_vec(), + bridging::XcmBridgeHubRouterByteFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + +// missing stuff from asset_test_utils::test_cases_over_bridge +// TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 +mod missing_asset_test_utils_test_cases_over_bridge { + use asset_test_utils::test_cases_over_bridge::TestBridgingConfig; + use codec::Encode; + use cumulus_primitives_core::XcmpMessageSource; + use frame_support::{ + assert_ok, + traits::{Currency, Get, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError}, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use parachains_common::{AccountId, Balance}; + use parachains_runtimes_test_utils::{ + mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, + RuntimeHelper, ValidatorIdOf, XcmReceivedFrom, + }; + use sp_runtime::{traits::StaticLookup, Saturating}; + use xcm::{latest::prelude::*, VersionedMultiAssets}; + use xcm_builder::{CreateMatcher, MatchXcm}; + use xcm_executor::{ + traits::{ConvertLocation, TransactAsset}, + XcmExecutor, + }; + + /// Helper function to verify `xcm` contains all relevant instructions expected on destination + /// chain as part of a reserve-asset-transfer. + fn assert_matches_reserve_asset_deposited_instructions( + xcm: &mut Xcm, + expected_reserve_assets_deposited: &MultiAssets, + expected_beneficiary: &MultiLocation, + ) { + let _ = xcm + .0 + .matcher() + .skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..))) + .expect("no instruction ReserveAssetDeposited?") + .match_next_inst(|instr| match instr { + ReserveAssetDeposited(reserve_assets) => { + assert_eq!(reserve_assets, expected_reserve_assets_deposited); + Ok(()) + }, + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction ReserveAssetDeposited") + .match_next_inst(|instr| match instr { + ClearOrigin => Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction ClearOrigin") + .match_next_inst(|instr| match instr { + BuyExecution { .. } => Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction BuyExecution") + .match_next_inst(|instr| match instr { + DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => + Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("expected instruction DepositAsset"); + } + + pub fn limited_reserve_transfer_assets_for_native_asset_works< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + HrmpChannelOpener, + HrmpChannelSource, + LocationToAccountId, + >( + collator_session_keys: CollatorSessionKeys, + existential_deposit: BalanceOf, + alice_account: AccountIdOf, + unwrap_pallet_xcm_event: Box) -> Option>>, + unwrap_xcmp_queue_event: Box< + dyn Fn(Vec) -> Option>, + >, + prepare_configuration: fn() -> TestBridgingConfig, + weight_limit: WeightLimit, + maybe_paid_export_message: Option, + delivery_fees_account: Option>, + ) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + cumulus_pallet_xcmp_queue::Config, + AllPalletsWithoutSystem: + OnInitialize> + OnFinalize>, + AccountIdOf: Into<[u8; 32]>, + ValidatorIdOf: From>, + BalanceOf: From, + ::Balance: From + Into, + XcmConfig: xcm_executor::Config, + LocationToAccountId: ConvertLocation>, + ::AccountId: + Into<<::RuntimeOrigin as OriginTrait>::AccountId>, + <::Lookup as StaticLookup>::Source: + From<::AccountId>, + ::AccountId: From, + HrmpChannelOpener: frame_support::inherent::ProvideInherent< + Call = cumulus_pallet_parachain_system::Call, + >, + HrmpChannelSource: XcmpMessageSource, + { + let runtime_para_id = 1000; + ExtBuilder::::default() + .with_collators(collator_session_keys.collators()) + .with_session_keys(collator_session_keys.session_keys()) + .with_tracing() + .with_safe_xcm_version(3) + .with_para_id(runtime_para_id.into()) + .build() + .execute_with(|| { + let mut alice = [0u8; 32]; + alice[0] = 1; + let included_head = RuntimeHelper::::run_to_block( + 2, + AccountId::from(alice).into(), + ); + + // prepare bridge config + let TestBridgingConfig { + bridged_network, + local_bridge_hub_para_id, + bridged_target_location: target_location_from_different_consensus, + .. + } = prepare_configuration(); + + let reserve_account = LocationToAccountId::convert_location( + &target_location_from_different_consensus, + ) + .expect("Sovereign account for reserves"); + let balance_to_transfer = 1_000_000_000_000_u128; + let native_asset = MultiLocation::parent(); + + // open HRMP to bridge hub + mock_open_hrmp_channel::( + runtime_para_id.into(), + local_bridge_hub_para_id.into(), + included_head, + &alice, + ); + + // drip ED to account + let alice_account_init_balance = existential_deposit + balance_to_transfer.into(); + let _ = >::deposit_creating( + &alice_account, + alice_account_init_balance, + ); + // SA of target location needs to have at least ED, otherwise making reserve fails + let _ = >::deposit_creating( + &reserve_account, + existential_deposit, + ); + + // we just check here, that user retains enough balance after withdrawal + // and also we check if `balance_to_transfer` is more than `existential_deposit`, + assert!( + (>::free_balance(&alice_account) - + balance_to_transfer.into()) >= + existential_deposit + ); + // SA has just ED + assert_eq!( + >::free_balance(&reserve_account), + existential_deposit + ); + + let delivery_fees_account_balance_before = delivery_fees_account + .as_ref() + .map(|dfa| >::free_balance(dfa)) + .unwrap_or(0.into()); + + // local native asset (pallet_balances) + let asset_to_transfer = MultiAsset { + fun: Fungible(balance_to_transfer.into()), + id: Concrete(native_asset), + }; + + // destination is (some) account relative to the destination different consensus + let target_destination_account = MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: Some(bridged_network), + id: sp_runtime::AccountId32::new([3; 32]).into(), + }), + }; + + let assets_to_transfer = MultiAssets::from(asset_to_transfer); + let mut expected_assets = assets_to_transfer.clone(); + let context = XcmConfig::UniversalLocation::get(); + expected_assets + .reanchor(&target_location_from_different_consensus, context) + .unwrap(); + + let expected_beneficiary = target_destination_account; + + // Make sure sender has enough funds for paying delivery fees + let handling_delivery_fees = { + // Probable XCM with `ReserveAssetDeposited`. + let mut expected_reserve_asset_deposited_message = Xcm(vec![ + ReserveAssetDeposited(MultiAssets::from(expected_assets.clone())), + ClearOrigin, + BuyExecution { + fees: MultiAsset { + id: Concrete(Default::default()), + fun: Fungible(balance_to_transfer), + }, + weight_limit: Unlimited, + }, + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: expected_beneficiary, + }, + SetTopic([ + 220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, + 112, 140, 247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, + 237, 173, + ]), + ]); + assert_matches_reserve_asset_deposited_instructions( + &mut expected_reserve_asset_deposited_message, + &expected_assets, + &expected_beneficiary, + ); + + // Call `SendXcm::validate` to get delivery fees. + let (_, delivery_fees): (_, MultiAssets) = XcmConfig::XcmSender::validate( + &mut Some(target_location_from_different_consensus), + &mut Some(expected_reserve_asset_deposited_message), + ) + .expect("validate passes"); + // Drip delivery fee to Alice account. + let mut delivery_fees_added = false; + for delivery_fee in delivery_fees.inner() { + assert_ok!(::deposit_asset( + &delivery_fee, + &MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: None, + id: alice_account.clone().into(), + }), + }, + None, + )); + delivery_fees_added = true; + } + delivery_fees_added + }; + + // do pallet_xcm call reserve transfer + assert_ok!(>::limited_reserve_transfer_assets( + RuntimeHelper::::origin_of( + alice_account.clone() + ), + Box::new(target_location_from_different_consensus.into_versioned()), + Box::new(target_destination_account.into_versioned()), + Box::new(VersionedMultiAssets::from(assets_to_transfer)), + 0, + weight_limit, + )); + + // check events + // check pallet_xcm attempted + RuntimeHelper::::assert_pallet_xcm_event_outcome( + &unwrap_pallet_xcm_event, + |outcome| { + assert_ok!(outcome.ensure_complete()); + }, + ); + + // check that xcm was sent + let xcm_sent_message_hash = >::events() + .into_iter() + .filter_map(|e| unwrap_xcmp_queue_event(e.event.encode())) + .find_map(|e| match e { + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => + Some(message_hash), + _ => None, + }); + + // read xcm + let xcm_sent = + RuntimeHelper::::take_xcm( + local_bridge_hub_para_id.into(), + ) + .unwrap(); + assert_eq!( + xcm_sent_message_hash, + Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256)) + ); + let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm"); + + // check sent XCM ExportMessage to BridgeHub + + // 1. check paid or unpaid + if let Some(expected_fee_asset_id) = maybe_paid_export_message { + xcm_sent + .0 + .matcher() + .match_next_inst(|instr| match instr { + WithdrawAsset(_) => Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains WithdrawAsset") + .match_next_inst(|instr| match instr { + BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => + Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains BuyExecution") + } else { + xcm_sent + .0 + .matcher() + .match_next_inst(|instr| match instr { + // first instruction could be UnpaidExecution (because we could have + // explicit unpaid execution on BridgeHub) + UnpaidExecution { weight_limit, check_origin } + if weight_limit == &Unlimited && check_origin.is_none() => + Ok(()), + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains UnpaidExecution") + } + // 2. check ExportMessage + .match_next_inst(|instr| match instr { + // next instruction is ExportMessage + ExportMessage { network, destination, xcm: inner_xcm } => { + assert_eq!(network, &bridged_network); + let (_, target_location_junctions_without_global_consensus) = + target_location_from_different_consensus + .interior + .split_global() + .expect("split works"); + assert_eq!( + destination, + &target_location_junctions_without_global_consensus + ); + assert_matches_reserve_asset_deposited_instructions( + inner_xcm, + &expected_assets, + &expected_beneficiary, + ); + Ok(()) + }, + _ => Err(ProcessMessageError::BadFormat), + }) + .expect("contains ExportMessage"); + + // check alice account decreased by balance_to_transfer + assert_eq!( + >::free_balance(&alice_account), + alice_account_init_balance + .saturating_sub(existential_deposit) + .saturating_sub(balance_to_transfer.into()) + ); + + // check reserve account increased by balance_to_transfer + assert_eq!( + >::free_balance(&reserve_account), + existential_deposit + balance_to_transfer.into() + ); + + // check dedicated account increased by delivery fees (if configured) + if handling_delivery_fees { + if let Some(delivery_fees_account) = delivery_fees_account { + let delivery_fees_account_balance_after = + >::free_balance( + &delivery_fees_account, + ); + assert!( + delivery_fees_account_balance_after > + delivery_fees_account_balance_before + ); + } + } + }) + } + + pub fn report_bridge_status_from_xcm_bridge_router_works< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + XcmBridgeHubRouterInstance, + >( + collator_session_keys: CollatorSessionKeys, + prepare_configuration: fn() -> TestBridgingConfig, + congested_message: fn() -> Xcm, + uncongested_message: fn() -> Xcm, + ) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + cumulus_pallet_xcmp_queue::Config + + pallet_xcm_bridge_hub_router::Config, + AllPalletsWithoutSystem: + OnInitialize> + OnFinalize>, + AccountIdOf: Into<[u8; 32]>, + ValidatorIdOf: From>, + BalanceOf: From, + ::Balance: From + Into, + XcmConfig: xcm_executor::Config, + LocationToAccountId: ConvertLocation>, + ::AccountId: + Into<<::RuntimeOrigin as OriginTrait>::AccountId>, + <::Lookup as StaticLookup>::Source: + From<::AccountId>, + ::AccountId: From, + XcmBridgeHubRouterInstance: 'static, + { + ExtBuilder::::default() + .with_collators(collator_session_keys.collators()) + .with_session_keys(collator_session_keys.session_keys()) + .with_tracing() + .build() + .execute_with(|| { + let report_bridge_status = |is_congested: bool| { + // prepare bridge config + let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration(); + + // Call received XCM execution + let xcm = if is_congested { congested_message() } else { uncongested_message() }; + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + + // execute xcm as XcmpQueue would do + let outcome = XcmExecutor::::execute_xcm( + local_bridge_hub_location, + xcm, + hash, + RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), + ); + assert_eq!(outcome.ensure_complete(), Ok(())); + assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::::bridge().is_congested); + }; + + report_bridge_status(true); + report_bridge_status(false); + }) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index cecd47bb88..2825bb4e11 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -19,6 +19,13 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive" serde = { version = "1.0.188", optional = true, features = ["derive"] } smallvec = "1.11.0" +# Local +bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} +bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives", default-features = false} +bp-bridge-hub-kusama = { path = "./primitives", default-features = false} +bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} +kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} + # Substrate frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } frame-executive = { default-features = false, version = "25.0.0" } @@ -52,7 +59,6 @@ sp-transaction-pool = { default-features = false, version = "23.0.0" } sp-version = { default-features = false, version = "26.0.0" } # Polkadot -kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} pallet-xcm = { default-features = false, version = "4.0.0" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } polkadot-core-primitives = { default-features = false, version = "4.0.0" } @@ -68,7 +74,7 @@ cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } cumulus-primitives-core = { default-features = false , version = "0.4.0" } cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } @@ -76,12 +82,43 @@ parachain-info = { package = "staging-parachain-info", default-features = false parachains-common = { default-features = false , version = "4.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } +# Bridges +bp-header-chain = { default-features = false , version = "0.4.0" } +bp-messages = { default-features = false , version = "0.4.0" } +bp-parachains = { default-features = false , version = "0.4.0" } +bp-polkadot-core = { default-features = false , version = "0.4.0" } +bp-relayers = { default-features = false , version = "0.4.0" } +bp-runtime = { default-features = false , version = "0.4.0" } +bp-kusama = { default-features = false , version = "0.2.0" } +bp-polkadot = { default-features = false , version = "0.2.0" } +bridge-runtime-common = { default-features = false , version = "0.4.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } +pallet-bridge-messages = { default-features = false , version = "0.4.0" } +pallet-bridge-parachains = { default-features = false , version = "0.4.0" } +pallet-bridge-relayers = { default-features = false , version = "0.4.0" } + [dev-dependencies] bridge-hub-test-utils = { version = "0.4.0" } +bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } +sp-keyring = { version = "28.0.0" } +static_assertions = { version = "1.1.0" } [features] default = [ "std" ] std = [ + "bp-asset-hub-kusama/std", + "bp-asset-hub-polkadot/std", + "bp-bridge-hub-kusama/std", + "bp-bridge-hub-polkadot/std", + "bp-header-chain/std", + "bp-messages/std", + "bp-parachains/std", + "bp-polkadot-core/std", + "bp-relayers/std", + "bp-runtime/std", + "bp-kusama/std", + "bp-polkadot/std", + "bridge-runtime-common/std", "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", @@ -103,6 +140,10 @@ std = [ "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", + "pallet-bridge-grandpa/std", + "pallet-bridge-messages/std", + "pallet-bridge-parachains/std", + "pallet-bridge-relayers/std", "pallet-collator-selection/std", "pallet-multisig/std", "pallet-session/std", @@ -141,6 +182,7 @@ std = [ ] runtime-benchmarks = [ + "bridge-runtime-common/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -150,12 +192,17 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-bridge-grandpa/runtime-benchmarks", + "pallet-bridge-messages/runtime-benchmarks", + "pallet-bridge-parachains/runtime-benchmarks", + "pallet-bridge-relayers/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -176,6 +223,10 @@ try-runtime = [ "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-bridge-grandpa/try-runtime", + "pallet-bridge-messages/try-runtime", + "pallet-bridge-parachains/try-runtime", + "pallet-bridge-relayers/try-runtime", "pallet-collator-selection/try-runtime", "pallet-multisig/try-runtime", "pallet-session/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml new file mode 100644 index 0000000000..3f53e6c7f0 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "bp-bridge-hub-kusama" +description = "Primitives of BridgeHubKusama parachain runtime." +repository.workspace = true +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] + +# Local +kusama-runtime-constants = { path = "../../../../relay/kusama/constants", default-features = false} +polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} + +# Bridge Dependencies +bp-bridge-hub-cumulus = { default-features = false , version = "0.4.0" } +bp-runtime = { default-features = false , version = "0.4.0" } +bp-messages = { default-features = false , version = "0.4.0" } + +# Substrate Based Dependencies +frame-support = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-std = { default-features = false , version = "12.0.0" } + +[features] +default = [ "std" ] +std = [ + "bp-bridge-hub-cumulus/std", + "bp-messages/std", + "bp-runtime/std", + "frame-support/std", + "kusama-runtime-constants/std", + "polkadot-runtime-constants/std", + "sp-api/std", + "sp-runtime/std", + "sp-std/std", +] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs new file mode 100644 index 0000000000..a746c2e022 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -0,0 +1,153 @@ +// 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 . + +//! Module with configuration which reflects BridgeHubKusama runtime setup (AccountId, Headers, +//! Hashes...) + +#![cfg_attr(not(feature = "std"), no_std)] + +pub use bp_bridge_hub_cumulus::*; +use bp_messages::*; +use bp_runtime::{ + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, +}; +use frame_support::{ + dispatch::DispatchClass, + sp_runtime::{MultiAddress, MultiSigner}, +}; +use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; + +/// BridgeHubKusama parachain. +#[derive(RuntimeDebug)] +pub struct BridgeHubKusama; + +impl Chain for BridgeHubKusama { + type BlockNumber = BlockNumber; + type Hash = Hash; + type Hasher = Hasher; + type Header = Header; + + type AccountId = AccountId; + type Balance = Balance; + type Nonce = Nonce; + type Signature = Signature; + + fn max_extrinsic_size() -> u32 { + *BlockLength::get().max.get(DispatchClass::Normal) + } + + fn max_extrinsic_weight() -> Weight { + BlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic + .unwrap_or(Weight::MAX) + } +} + +impl Parachain for BridgeHubKusama { + const PARACHAIN_ID: u32 = BRIDGE_HUB_KUSAMA_PARACHAIN_ID; +} + +/// Public key of the chain account that may be used to verify signatures. +pub type AccountSigner = MultiSigner; + +/// The address format for describing accounts. +pub type Address = MultiAddress; + +/// Identifier of BridgeHubKusama in the Kusama relay chain. +pub const BRIDGE_HUB_KUSAMA_PARACHAIN_ID: u32 = 1002; + +/// Name of the With-BridgeHubKusama messages pallet instance that is deployed at bridged chains. +pub const WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME: &str = "BridgeKusamaMessages"; + +/// Name of the With-BridgeHubKusama bridge-relayers pallet instance that is deployed at bridged +/// chains. +pub const WITH_BRIDGE_HUB_KUSAMA_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; + +/// Pallet index of `BridgePolkadotMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX: u8 = 53; + +decl_bridge_finality_runtime_apis!(bridge_hub_kusama); +decl_bridge_messages_runtime_apis!(bridge_hub_kusama); + +frame_support::parameter_types! { + /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Kusama + /// BridgeHub. + /// (initially was calculated by test `BridgeHubKusama::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 16_196_533_317; + + /// Transaction fee that is paid at the Kusama BridgeHub for delivering single inbound message. + /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) + pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 56_516_280_489; + + /// Transaction fee that is paid at the Kusama BridgeHub for delivering single outbound message confirmation. + /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) + pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 53_943_614_276; +} + +/// Compute the total estimated fee that needs to be paid in KSMs by the sender when sending +/// message from Kusama Bridge Hub to Polkadot Bridge Hub. +pub fn estimate_kusama_to_polkadot_message_fee( + bridge_hub_polkadot_base_delivery_fee_in_udots: Balance, +) -> Balance { + // Sender must pay: + // + // 1) an approximate cost of XCM execution (`ExportMessage` and surroundings) at Kusama bridge + // Hub; + // + // 2) the approximate cost of Kusama -> Polkadot message delivery transaction on Polkadot Bridge + // Hub, converted into KSMs using 1:5 conversion rate; + // + // 3) the approximate cost of Kusama -> Polkadot message confirmation transaction on Kusama + // Bridge Hub. + BridgeHubKusamaBaseXcmFeeInKsms::get() + .saturating_add(convert_from_udot_to_uksm(bridge_hub_polkadot_base_delivery_fee_in_udots)) + .saturating_add(BridgeHubKusamaBaseConfirmationFeeInKsms::get()) +} + +/// Convert from uDOTs to uKSMs. +fn convert_from_udot_to_uksm(price_in_udot: Balance) -> Balance { + // assuming exchange rate is 5 DOTs for 1 KSM + let ksm_to_dot_economic_rate = FixedU128::from_rational(1, 5); + // tokens have different nominals and we need to take that into account + let nominal_ratio = FixedU128::from_rational( + kusama_runtime_constants::currency::UNITS, + polkadot_runtime_constants::currency::UNITS, + ); + + ksm_to_dot_economic_rate + .saturating_mul(nominal_ratio) + .saturating_mul(FixedU128::saturating_from_integer(price_in_udot)) + .into_inner() / + FixedU128::DIV +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn convert_from_udot_to_uksm_works() { + let price_in_udot = 77 * polkadot_runtime_constants::currency::UNITS; + let same_price_in_uksm = convert_from_udot_to_uksm(price_in_udot); + + let price_in_dot = + FixedU128::from_rational(price_in_udot, polkadot_runtime_constants::currency::UNITS); + let price_in_ksm = + FixedU128::from_rational(same_price_in_uksm, kusama_runtime_constants::currency::UNITS); + assert_eq!(price_in_dot / FixedU128::saturating_from_integer(5), price_in_ksm); + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs new file mode 100644 index 0000000000..7379898b60 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -0,0 +1,404 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus 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. + +// Cumulus 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 Cumulus. If not, see . + +//! Bridge definitions used for bridging with Polkadot Bridge Hub. + +use crate::{ + weights, + xcm_config::{UniversalLocation, XcmRouter}, + AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, Runtime, RuntimeEvent, + RuntimeOrigin, +}; +use bp_messages::LaneId; +use bp_parachains::SingleParaStoredHeaderDataBuilder; +use bridge_runtime_common::{ + messages, + messages::{ + source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter}, + target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter}, + MessageBridge, ThisChainWithMessages, UnderlyingChainProvider, + }, + messages_xcm_extension::{ + SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, + XcmBlobMessageDispatch, + }, + refund_relayer_extension::{ + ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, + RefundableMessagesLane, RefundableParachain, + }, +}; +use cumulus_primitives_core::ParentThen; +use frame_support::{parameter_types, traits::PalletInfoAccess}; +use kusama_runtime_constants as constants; +use sp_runtime::{traits::ConstU32, RuntimeDebug}; +use xcm::{ + latest::prelude::*, + prelude::{InteriorMultiLocation, NetworkId}, +}; +use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter}; + +/// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. +pub const XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT: LaneId = LaneId([0, 0, 0, 1]); + +// Parameters that may be changed by the governance. +parameter_types! { + /// Reward that is paid (by the Kusama Asset Hub) to relayers for delivering a single + /// Kusama -> Polkadot bridge message. + /// + /// This payment is tracked by the `pallet_bridge_relayers` pallet at the Kusama + /// Bridge Hub. + pub storage DeliveryRewardInBalance: Balance = constants::currency::UNITS / 10_000; + + /// Registered relayer stake. + /// + /// Any relayer may reserve this amount on his account and get a priority boost for his + /// message delivery transactions. In exchange, he risks losing his stake if he would + /// submit an invalid transaction. The set of such (registered) relayers is tracked + /// by the `pallet_bridge_relayers` pallet at the Kusama Bridge Hub. + pub storage RequiredStakeForStakeAndSlash: Balance = 100 * constants::currency::UNITS; +} + +// Parameters, used by both XCM and bridge code. +parameter_types! { + /// Polkadot Network identifier. + pub PolkadotGlobalConsensusNetwork: NetworkId = NetworkId::Polkadot; + /// Interior location (relative to this runtime) of the with-Polkadot messages pallet. + pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorMultiLocation = X1( + PalletInstance(::index() as u8), + ); + + /// Identifier of the sibling Kusama Asset Hub parachain. + pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// A route (XCM location and bridge lane) that the Kusama Asset Hub -> Polkadot Asset Hub + /// message is following. + pub FromAssetHubKusamaToAssetHubPolkadotRoute: SenderAndLane = SenderAndLane::new( + ParentThen(X1(Parachain(AssetHubKusamaParaId::get().into()))).into(), + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + ); +} + +// Parameters, used by bridge transport code. +parameter_types! { + /// Number of Polkadot headers to keep in the runtime storage. + /// + /// Note that we are keeping only required header information, not the whole header itself. Roughly, it + /// is the 2 hours of real time (assuming that every header is submitted). + pub const RelayChainHeadersToKeep: u32 = 1_200; + /// Number of Polkadot Bridge Hub headers to keep in the runtime storage. + /// + /// Note that we are keeping only required header information, not the whole header itself. Roughly, it + /// is the 2 hours of real time (assuming that every header is submitted). + pub const ParachainHeadsToKeep: u32 = 600; + /// Maximal size of Polkadot Bridge Hub header **part** that we are storing in the runtime storage. + pub const MaxParaHeadDataSize: u32 = bp_polkadot::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; + + /// Bridge specific chain (network) identifier of the Polkadot Bridge Hub. + pub const BridgeHubPolkadotChainId: bp_runtime::ChainId = bp_runtime::BRIDGE_HUB_POLKADOT_CHAIN_ID; + /// Name of the `paras` pallet at Polkadot that tracks all parachain heads. + pub const ParachainPalletNameAtPolkadot: &'static str = bp_polkadot::PARAS_PALLET_NAME; + + /// Maximal number of entries in the unrewarded relayers vector at the Kusama Bridge Hub. It matches the + /// maximal number of unrewarded relayers that the single confirmation transaction at Polkadot Bridge + /// Hub may process. + pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = + bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + /// Maximal number of unconfirmed messages at the Kusama Bridge Hub. It matches the maximal number of + /// uncinfirmed messages that the single confirmation transaction at Polkadot Bridge Hub may process. + pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = + bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; + + /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. + pub const AssetHubKusamaToAssetHubPolkadotMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubPolkadot: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; + + /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. + pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; + /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. + pub const RelayerStakeLease: u32 = 300; + /// Priority boost that the registered relayer receives for every additional message in the message + /// delivery transaction. + /// + /// It is determined semi-automatically - see `FEE_BOOST_PER_MESSAGE` constant to get the + /// meaning of this value + pub PriorityBoostPerMessage: u64 = 182_044_444_444_444; +} + +/// Add GRANDPA bridge pallet to track Polkadot relay chain. +pub type BridgeGrandpaPolkadotInstance = pallet_bridge_grandpa::Instance1; +impl pallet_bridge_grandpa::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type BridgedChain = bp_polkadot::Polkadot; + type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; + type HeadersToKeep = RelayChainHeadersToKeep; + type WeightInfo = weights::pallet_bridge_grandpa::WeightInfo; +} + +/// Add parachain bridge pallet to track Polkadot BridgeHub parachain. +pub type BridgeParachainPolkadotInstance = pallet_bridge_parachains::Instance1; +impl pallet_bridge_parachains::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_bridge_parachains::WeightInfo; + type BridgesGrandpaPalletInstance = BridgeGrandpaPolkadotInstance; + type ParasPalletName = ParachainPalletNameAtPolkadot; + type ParaStoredHeaderDataBuilder = + SingleParaStoredHeaderDataBuilder; + type HeadsToKeep = ParachainHeadsToKeep; + type MaxParaHeadDataSize = MaxParaHeadDataSize; +} + +/// Allows collect and claim rewards for relayers. +impl pallet_bridge_relayers::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reward = Balance; + type PaymentProcedure = + bp_relayers::PayRewardFromAccount, AccountId>; + type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + RelayerStakeReserveId, + RequiredStakeForStakeAndSlash, + RelayerStakeLease, + >; + type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; +} + +/// Add XCM messages support for exchanging messages with BridgeHubPolkadot. +pub type WithBridgeHubPolkadotMessagesInstance = pallet_bridge_messages::Instance1; +impl pallet_bridge_messages::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_bridge_messages::WeightInfo; + type BridgedChainId = BridgeHubPolkadotChainId; + type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubPolkadot; + type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; + type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; + + type MaximalOutboundPayloadSize = ToBridgeHubPolkadotMaximalOutboundPayloadSize; + type OutboundPayload = XcmAsPlainPayload; + + type InboundPayload = XcmAsPlainPayload; + type InboundRelayer = AccountId; + type DeliveryPayments = (); + + type TargetHeaderChain = TargetHeaderChainAdapter; + type LaneMessageVerifier = ToBridgeHubPolkadotMessageVerifier; + type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< + Runtime, + WithBridgeHubPolkadotMessagesInstance, + DeliveryRewardInBalance, + >; + + type SourceHeaderChain = SourceHeaderChainAdapter; + type MessageDispatch = XcmBlobMessageDispatch< + FromPolkadotMessageBlobDispatcher, + Self::WeightInfo, + cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider< + AssetHubKusamaParaId, + Runtime, + >, + >; + type OnMessagesDelivered = OnMessagesDeliveredFromPolkadot; +} + +/// Proof of messages, coming from Polkadot. +pub type FromPolkadotBridgeHubMessagesProof = + FromBridgedChainMessagesProof; +/// Messages delivery proof for Kusama Bridge Hub -> Polkadot Bridge Hub messages. +pub type ToPolkadotBridgeHubMessagesDeliveryProof = + FromBridgedChainMessagesDeliveryProof; + +/// Dispatches received XCM messages from Polkadot BridgeHub. +type FromPolkadotMessageBlobDispatcher = BridgeBlobDispatcher< + XcmRouter, + UniversalLocation, + BridgeKusamaToPolkadotMessagesPalletInstance, +>; + +/// Export XCM messages to be relayed to the other side +pub type ToBridgeHubPolkadotHaulBlobExporter = HaulBlobExporter< + XcmBlobHaulerAdapter, + PolkadotGlobalConsensusNetwork, + (), +>; +pub struct ToBridgeHubPolkadotXcmBlobHauler; +impl XcmBlobHauler for ToBridgeHubPolkadotXcmBlobHauler { + type Runtime = Runtime; + type MessagesInstance = WithBridgeHubPolkadotMessagesInstance; + type SenderAndLane = FromAssetHubKusamaToAssetHubPolkadotRoute; + + type ToSourceChainSender = XcmRouter; + type CongestedMessage = bp_asset_hub_kusama::CongestedMessage; + type UncongestedMessage = bp_asset_hub_kusama::UncongestedMessage; +} + +/// On messages delivered callback. +type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; + +/// Messaging Bridge configuration for BridgeHubKusama -> BridgeHubPolkadot +pub struct WithBridgeHubPolkadotMessageBridge; +impl MessageBridge for WithBridgeHubPolkadotMessageBridge { + const BRIDGED_MESSAGES_PALLET_NAME: &'static str = + bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME; + type ThisChain = BridgeHubKusama; + type BridgedChain = BridgeHubPolkadot; + type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< + Runtime, + BridgeParachainPolkadotInstance, + bp_bridge_hub_polkadot::BridgeHubPolkadot, + >; +} + +/// Message verifier for BridgeHubPolkadot messages sent from BridgeHubKusama +pub type ToBridgeHubPolkadotMessageVerifier = + messages::source::FromThisChainMessageVerifier; + +/// Maximal outbound payload size of BridgeHubKusama -> BridgeHubPolkadot messages. +pub type ToBridgeHubPolkadotMaximalOutboundPayloadSize = + messages::source::FromThisChainMaximalOutboundPayloadSize; + +/// BridgeHubPolkadot chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct BridgeHubPolkadot; + +impl UnderlyingChainProvider for BridgeHubPolkadot { + type Chain = bp_bridge_hub_polkadot::BridgeHubPolkadot; +} + +impl messages::BridgedChainWithMessages for BridgeHubPolkadot {} + +/// BridgeHubKusama chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct BridgeHubKusama; + +impl UnderlyingChainProvider for BridgeHubKusama { + type Chain = bp_bridge_hub_kusama::BridgeHubKusama; +} + +impl ThisChainWithMessages for BridgeHubKusama { + type RuntimeOrigin = RuntimeOrigin; +} + +/// Signed extension that refunds relayers that are delivering messages from the Polkadot parachain. +pub type RefundBridgeHubPolkadotMessages = RefundSignedExtensionAdapter< + RefundBridgedParachainMessages< + Runtime, + RefundableParachain< + BridgeParachainPolkadotInstance, + bp_bridge_hub_polkadot::BridgeHubPolkadot, + >, + RefundableMessagesLane< + WithBridgeHubPolkadotMessagesInstance, + AssetHubKusamaToAssetHubPolkadotMessagesLane, + >, + ActualFeeRefund, + PriorityBoostPerMessage, + StrRefundBridgeHubPolkadotMessages, + >, +>; +bp_runtime::generate_static_str_provider!(RefundBridgeHubPolkadotMessages); + +#[cfg(test)] +mod tests { + use super::*; + use bridge_runtime_common::{ + assert_complete_bridge_types, + integrity::{ + assert_complete_bridge_constants, check_message_lane_weights, + AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants, + AssertCompleteBridgeConstants, + }, + }; + + /// Every additional message in the message delivery transaction boosts its priority. + /// So the priority of transaction with `N+1` messages is larger than priority of + /// transaction with `N` messages by the `PriorityBoostPerMessage`. + /// + /// Economically, it is an equivalent of adding tip to the transaction with `N` messages. + /// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip. + /// + /// We want this tip to be large enough (delivery transactions with more messages = less + /// operational costs and a faster bridge), so this value should be significant. + const FEE_BOOST_PER_MESSAGE: Balance = 2 * constants::currency::UNITS; + + #[test] + fn ensure_bridge_hub_kusama_message_lane_weights_are_correct() { + check_message_lane_weights::< + bp_bridge_hub_kusama::BridgeHubKusama, + Runtime, + WithBridgeHubPolkadotMessagesInstance, + >( + bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE, + bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + true, + ); + } + + #[test] + fn ensure_bridge_integrity() { + assert_complete_bridge_types!( + runtime: Runtime, + with_bridged_chain_grandpa_instance: BridgeGrandpaPolkadotInstance, + with_bridged_chain_messages_instance: WithBridgeHubPolkadotMessagesInstance, + bridge: WithBridgeHubPolkadotMessageBridge, + this_chain: bp_kusama::Kusama, + bridged_chain: bp_polkadot::Polkadot, + ); + + assert_complete_bridge_constants::< + Runtime, + BridgeGrandpaPolkadotInstance, + WithBridgeHubPolkadotMessagesInstance, + WithBridgeHubPolkadotMessageBridge, + >(AssertCompleteBridgeConstants { + this_chain_constants: AssertChainConstants { + block_length: bp_bridge_hub_kusama::BlockLength::get(), + block_weights: bp_bridge_hub_kusama::BlockWeights::get(), + }, + messages_pallet_constants: AssertBridgeMessagesPalletConstants { + max_unrewarded_relayers_in_bridged_confirmation_tx: + bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + max_unconfirmed_messages_in_bridged_confirmation_tx: + bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + bridged_chain_id: bp_runtime::BRIDGE_HUB_POLKADOT_CHAIN_ID, + }, + pallet_names: AssertBridgePalletNames { + with_this_chain_messages_pallet_name: + bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME, + with_bridged_chain_grandpa_pallet_name: + bp_polkadot::WITH_POLKADOT_GRANDPA_PALLET_NAME, + with_bridged_chain_messages_pallet_name: + bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME, + }, + }); + + bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::< + Runtime, + WithBridgeHubPolkadotMessagesInstance, + PriorityBoostPerMessage, + >(FEE_BOOST_PER_MESSAGE); + + assert_eq!( + BridgeKusamaToPolkadotMessagesPalletInstance::get(), + X1(PalletInstance( + bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX + )) + ); + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 5e5f7e9e0e..8aa92ce9ed 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -22,6 +22,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; @@ -101,8 +102,20 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + BridgeRejectObsoleteHeadersAndMessages, + bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, ); +bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { + RuntimeCall, AccountId, + // Grandpa + BridgePolkadotGrandpa, + // Parachains + BridgePolkadotParachains, + // Messages + BridgePolkadotMessages +} + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -454,6 +467,14 @@ construct_runtime!( // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, + + // Pallets that may be used by all bridges. + BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event} = 50, + + // Polkadot bridge pallets. + BridgePolkadotGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 51, + BridgePolkadotParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 52, + BridgePolkadotMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 53, } ); @@ -477,6 +498,12 @@ mod benches { // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] + // Shared bridge pallets + [pallet_bridge_relayers, BridgeRelayersBench::] + // Polkadot bridge pallets. + [pallet_bridge_grandpa, PolkadotFinality] + [pallet_bridge_parachains, PolkadotParachains] + [pallet_bridge_messages, PolkadotMessages] ); } @@ -634,6 +661,50 @@ impl_runtime_apis! { } } + impl bp_polkadot::PolkadotFinalityApi for Runtime { + fn best_finalized() -> Option> { + BridgePolkadotGrandpa::best_finalized() + } + + fn synced_headers_grandpa_info( + ) -> Vec> { + BridgePolkadotGrandpa::synced_headers_grandpa_info() + } + } + + impl bp_bridge_hub_polkadot::BridgeHubPolkadotFinalityApi for Runtime { + fn best_finalized() -> Option> { + BridgePolkadotParachains::best_parachain_head_id::< + bp_bridge_hub_polkadot::BridgeHubPolkadot + >().unwrap_or(None) + } + } + + impl bp_bridge_hub_polkadot::FromBridgeHubPolkadotInboundLaneApi for Runtime { + fn message_details( + lane: bp_messages::LaneId, + messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, + ) -> Vec { + bridge_runtime_common::messages_api::inbound_message_details::< + Runtime, + bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, + >(lane, messages) + } + } + + impl bp_bridge_hub_polkadot::ToBridgeHubPolkadotOutboundLaneApi for Runtime { + fn message_details( + lane: bp_messages::LaneId, + begin: bp_messages::MessageNonce, + end: bp_messages::MessageNonce, + ) -> Vec { + bridge_runtime_common::messages_api::outbound_message_details::< + Runtime, + bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, + >(lane, begin, end) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -670,6 +741,11 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench; + type PolkadotFinality = BridgePolkadotGrandpa; + type PolkadotParachains = pallet_bridge_parachains::benchmarking::Pallet::; + type PolkadotMessages = pallet_bridge_messages::benchmarking::Pallet::; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -792,7 +868,7 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - Err(BenchmarkError::Skip) + Ok((KsmRelayLocation::get(), NetworkId::Polkadot, X1(Parachain(1000)))) } fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { @@ -803,6 +879,114 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + type PolkadotFinality = BridgePolkadotGrandpa; + type PolkadotParachains = pallet_bridge_parachains::benchmarking::Pallet::; + type PolkadotMessages = pallet_bridge_messages::benchmarking::Pallet::; + + use pallet_bridge_relayers::benchmarking::{ + Pallet as BridgeRelayersBench, + Config as BridgeRelayersConfig, + }; + + impl BridgeRelayersConfig for Runtime { + fn prepare_rewards_account( + account_params: bp_relayers::RewardsAccountParams, + reward: Balance, + ) { + let rewards_account = bp_relayers::PayRewardFromAccount::< + Balances, + AccountId + >::rewards_account(account_params); + Self::deposit_account(rewards_account, reward); + } + + fn deposit_account(account: AccountId, balance: Balance) { + use frame_support::traits::fungible::Mutate; + Balances::mint_into(&account, balance.saturating_add(ExistentialDeposit::get())).unwrap(); + } + } + + use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof; + use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig; + + impl BridgeParachainsConfig for Runtime { + fn parachains() -> Vec { + use bp_runtime::Parachain; + vec![bp_polkadot_core::parachains::ParaId(bp_bridge_hub_polkadot::BridgeHubPolkadot::PARACHAIN_ID)] + } + + fn prepare_parachain_heads_proof( + parachains: &[bp_polkadot_core::parachains::ParaId], + parachain_head_size: u32, + proof_size: bp_runtime::StorageProofSize, + ) -> ( + pallet_bridge_parachains::RelayBlockNumber, + pallet_bridge_parachains::RelayBlockHash, + bp_polkadot_core::parachains::ParaHeadsProof, + Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>, + ) { + prepare_parachain_heads_proof::( + parachains, + parachain_head_size, + proof_size, + ) + } + } + + use bridge_runtime_common::messages_benchmarking::{ + prepare_message_delivery_proof_from_parachain, + prepare_message_proof_from_parachain, + generate_xcm_builder_bridge_message_sample, + }; + use pallet_bridge_messages::benchmarking::{ + Config as BridgeMessagesConfig, + MessageDeliveryProofParams, + MessageProofParams, + }; + + impl BridgeMessagesConfig for Runtime { + fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { + let bench_lane_id = >::bench_lane_id(); + let bridged_chain_id = bp_runtime::BRIDGE_HUB_POLKADOT_CHAIN_ID; + pallet_bridge_relayers::Pallet::::relayer_reward( + relayer, + bp_relayers::RewardsAccountParams::new( + bench_lane_id, + bridged_chain_id, + bp_relayers::RewardsAccountOwner::BridgedChain + ) + ).is_some() + } + + fn prepare_message_proof( + params: MessageProofParams, + ) -> (bridge_to_polkadot_config::FromPolkadotBridgeHubMessagesProof, Weight) { + use cumulus_primitives_core::XcmpMessageSource; + assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + prepare_message_proof_from_parachain::< + Runtime, + bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, + bridge_to_polkadot_config::WithBridgeHubPolkadotMessageBridge, + >(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Kusama), Parachain(42)))) + } + + fn prepare_message_delivery_proof( + params: MessageDeliveryProofParams, + ) -> bridge_to_polkadot_config::ToPolkadotBridgeHubMessagesDeliveryProof { + prepare_message_delivery_proof_from_parachain::< + Runtime, + bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, + bridge_to_polkadot_config::WithBridgeHubPolkadotMessageBridge, + >(params) + } + + fn is_message_successfully_dispatched(_nonce: bp_messages::MessageNonce) -> bool { + use cumulus_primitives_core::XcmpMessageSource; + !XcmpQueue::take_outbound_messages(usize::MAX).is_empty() + } + } + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index 60dfbea8db..a65be4f0d7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -17,11 +17,21 @@ //! Expose the auto generated weight files. +use crate::Runtime; +use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt; +use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt; +use ::pallet_bridge_relayers::WeightInfoExt as _; +use frame_support::weights::Weight; + pub mod block_weights; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; pub mod pallet_balances; +pub mod pallet_bridge_grandpa; +pub mod pallet_bridge_messages; +pub mod pallet_bridge_parachains; +pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; pub mod pallet_multisig; pub mod pallet_session; @@ -35,3 +45,24 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; pub use rocksdb_weights::constants::RocksDbWeight; + +impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo { + fn expected_extra_storage_proof_size() -> u32 { + bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE + } + + fn receive_messages_proof_overhead_from_runtime() -> Weight { + pallet_bridge_relayers::WeightInfo::::receive_messages_proof_overhead_from_runtime( + ) + } + + fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight { + pallet_bridge_relayers::WeightInfo::::receive_messages_delivery_proof_overhead_from_runtime() + } +} + +impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo { + fn expected_extra_storage_proof_size() -> u32 { + bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs new file mode 100644 index 0000000000..9998670c35 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs @@ -0,0 +1,63 @@ + +//! Autogenerated weights for `pallet_bridge_grandpa` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-kusama-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-kusama-local-raw.json +// --pallet +// pallet-bridge-grandpa +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-kusama/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_grandpa`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_grandpa::WeightInfo for WeightInfo { + /// Storage: `BridgePolkadotGrandpa::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::BestFinalized` (r:1 w:1) + /// Proof: `BridgePolkadotGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::CurrentAuthoritySet` (r:1 w:0) + /// Proof: `BridgePolkadotGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::ImportedHashesPointer` (r:1 w:1) + /// Proof: `BridgePolkadotGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::ImportedHashes` (r:1 w:1) + /// Proof: `BridgePolkadotGrandpa::ImportedHashes` (`max_values`: Some(1200), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::ImportedHeaders` (r:0 w:2) + /// Proof: `BridgePolkadotGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 838]`. + /// The range of component `v` is `[50, 100]`. + fn submit_finality_proof(p: u32, v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `231 + p * (60 ±0)` + // Estimated: `51735` + // Minimum execution time: 368_161_000 picoseconds. + Weight::from_parts(76_463_974, 0) + .saturating_add(Weight::from_parts(0, 51735)) + // Standard Error: 7_393 + .saturating_add(Weight::from_parts(61_698_143, 0).saturating_mul(p.into())) + // Standard Error: 123_310 + .saturating_add(Weight::from_parts(3_056_651, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs new file mode 100644 index 0000000000..799bc357c6 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs @@ -0,0 +1,226 @@ + +//! Autogenerated weights for `pallet_bridge_messages` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-kusama-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-kusama-local-raw.json +// --pallet +// pallet-bridge-messages +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-kusama/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_messages`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_messages::WeightInfo for WeightInfo { + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_single_message_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `470` + // Estimated: `52645` + // Minimum execution time: 73_258_000 picoseconds. + Weight::from_parts(75_198_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_two_messages_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `470` + // Estimated: `52645` + // Minimum execution time: 92_110_000 picoseconds. + Weight::from_parts(94_813_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_single_message_proof_with_outbound_lane_state() -> Weight { + // Proof Size summary in bytes: + // Measured: `470` + // Estimated: `52645` + // Minimum execution time: 81_696_000 picoseconds. + Weight::from_parts(84_047_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + fn receive_single_message_proof_1_kb() -> Weight { + // Proof Size summary in bytes: + // Measured: `438` + // Estimated: `52645` + // Minimum execution time: 71_530_000 picoseconds. + Weight::from_parts(73_127_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + fn receive_single_message_proof_16_kb() -> Weight { + // Proof Size summary in bytes: + // Measured: `438` + // Estimated: `52645` + // Minimum execution time: 112_482_000 picoseconds. + Weight::from_parts(115_496_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_single_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `343` + // Estimated: `3808` + // Minimum execution time: 40_730_000 picoseconds. + Weight::from_parts(41_879_000, 0) + .saturating_add(Weight::from_parts(0, 3808)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { + // Proof Size summary in bytes: + // Measured: `343` + // Estimated: `3808` + // Minimum execution time: 40_765_000 picoseconds. + Weight::from_parts(41_895_000, 0) + .saturating_add(Weight::from_parts(0, 3808)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { + // Proof Size summary in bytes: + // Measured: `343` + // Estimated: `6086` + // Minimum execution time: 44_120_000 picoseconds. + Weight::from_parts(44_844_000, 0) + .saturating_add(Weight::from_parts(0, 6086)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[128, 2048]`. + fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `601` + // Estimated: `52645` + // Minimum execution time: 86_315_000 picoseconds. + Weight::from_parts(87_602_840, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 123 + .saturating_add(Weight::from_parts(7_611, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_parachains.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_parachains.rs new file mode 100644 index 0000000000..6e1e10a097 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_parachains.rs @@ -0,0 +1,98 @@ + +//! Autogenerated weights for `pallet_bridge_parachains` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-kusama-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-kusama-local-raw.json +// --pallet +// pallet-bridge-parachains +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-kusama/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_parachains`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_parachains::WeightInfo for WeightInfo { + /// Storage: `BridgePolkadotParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgePolkadotGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgePolkadotParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgePolkadotParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 2]`. + fn submit_parachain_heads_with_n_parachains(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `293` + // Estimated: `2543` + // Minimum execution time: 41_740_000 picoseconds. + Weight::from_parts(43_231_089, 0) + .saturating_add(Weight::from_parts(0, 2543)) + // Standard Error: 174_898 + .saturating_add(Weight::from_parts(50_055, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgePolkadotParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgePolkadotGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgePolkadotParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgePolkadotParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + fn submit_parachain_heads_with_1kb_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `293` + // Estimated: `2543` + // Minimum execution time: 43_838_000 picoseconds. + Weight::from_parts(44_567_000, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgePolkadotParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgePolkadotParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgePolkadotGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgePolkadotParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgePolkadotParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + fn submit_parachain_heads_with_16kb_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `293` + // Estimated: `2543` + // Minimum execution time: 83_675_000 picoseconds. + Weight::from_parts(84_895_000, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs new file mode 100644 index 0000000000..a3e48207a9 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs @@ -0,0 +1,107 @@ + +//! Autogenerated weights for `pallet_bridge_relayers` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-11-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `MusXroom`, CPU: `13th Gen Intel(R) Core(TM) i7-13650HX` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-kusama-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/release/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-kusama-local-raw.json +// --pallet +// pallet-bridge-relayers +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-kusama/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_relayers`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_relayers::WeightInfo for WeightInfo { + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn claim_rewards() -> Weight { + // Proof Size summary in bytes: + // Measured: `207` + // Estimated: `3593` + // Minimum execution time: 37_502_000 picoseconds. + Weight::from_parts(38_049_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + fn register() -> Weight { + // Proof Size summary in bytes: + // Measured: `61` + // Estimated: `4714` + // Minimum execution time: 18_683_000 picoseconds. + Weight::from_parts(19_228_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + fn deregister() -> Weight { + // Proof Size summary in bytes: + // Measured: `160` + // Estimated: `4714` + // Minimum execution time: 20_191_000 picoseconds. + Weight::from_parts(20_529_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn slash_and_deregister() -> Weight { + // Proof Size summary in bytes: + // Measured: `263` + // Estimated: `4714` + // Minimum execution time: 22_360_000 picoseconds. + Weight::from_parts(22_935_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn register_relayer_reward() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3538` + // Minimum execution time: 2_303_000 picoseconds. + Weight::from_parts(2_411_000, 0) + .saturating_add(Weight::from_parts(0, 3538)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index ded5dc6702..dce4cc9c4a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs @@ -18,6 +18,7 @@ mod pallet_xcm_benchmarks_fungible; mod pallet_xcm_benchmarks_generic; use crate::{xcm_config::MaxAssetsIntoHolding, Runtime}; +use codec::Encode; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; @@ -211,8 +212,9 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn universal_origin(_: &Junction) -> Weight { Weight::MAX } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { - Weight::MAX + fn export_message(_: &NetworkId, _: &Junctions, inner: &Xcm<()>) -> Weight { + let inner_encoded_len = inner.encode().len() as u32; + XcmGeneric::::export_message(inner_encoded_len) } fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { Weight::MAX diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index b1e8107b30..c127fc7c0e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -1,44 +1,26 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus 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. - -// Cumulus 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 Cumulus. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: Compiled, CHAIN: Some("bh-kusama-local-raw.json"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=bridge-hub-kusama-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::generic -// --no-storage-info +// --chain +// bh-kusama-local-raw.json +// --pallet +// pallet-xcm-benchmarks::generic +// --extrinsic +// report_holding,buy_execution,query_response,transact,refund_surplus,set_error_handler,set_appendix,clear_error,descend_origin,clear_origin,report_error,claim_asset,trap,subscribe_version,unsubscribe_version,burn_asset,expect_asset,expect_origin,expect_error,expect_transact_status,query_pallet,report_transact_status,clear_transact_status,set_topic,clear_topic,export_message,set_fees_mode,unpaid_execution,universal_origin +// --template=../polkadot-sdk/cumulus/templates/xcm-bench-template.hbs +// --output=system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm // --no-median-slopes // --no-min-squares -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json -// --header=./file_header.txt -// --output=./parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,31 +34,35 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 33_141_000 picoseconds. - Weight::from_parts(34_380_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 80_031_000 picoseconds. + Weight::from_parts(82_416_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_803_000 picoseconds. - Weight::from_parts(2_904_000, 0) + // Minimum execution time: 2_768_000 picoseconds. + Weight::from_parts(2_842_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -84,79 +70,83 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `3497` - // Minimum execution time: 10_308_000 picoseconds. - Weight::from_parts(10_753_000, 3497) + // Minimum execution time: 10_522_000 picoseconds. + Weight::from_parts(10_768_000, 3497) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_499_000 picoseconds. - Weight::from_parts(11_786_000, 0) + // Minimum execution time: 11_838_000 picoseconds. + Weight::from_parts(12_192_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_102_000 picoseconds. - Weight::from_parts(3_161_000, 0) + // Minimum execution time: 3_038_000 picoseconds. + Weight::from_parts(3_121_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_678_000 picoseconds. - Weight::from_parts(2_795_000, 0) + // Minimum execution time: 2_599_000 picoseconds. + Weight::from_parts(2_695_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_685_000 picoseconds. - Weight::from_parts(2_758_000, 0) + // Minimum execution time: 2_663_000 picoseconds. + Weight::from_parts(2_719_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_590_000 picoseconds. - Weight::from_parts(2_754_000, 0) + // Minimum execution time: 2_627_000 picoseconds. + Weight::from_parts(2_688_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_297_000 picoseconds. - Weight::from_parts(3_419_000, 0) + // Minimum execution time: 3_017_000 picoseconds. + Weight::from_parts(3_257_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_606_000 picoseconds. - Weight::from_parts(2_717_000, 0) + // Minimum execution time: 2_215_000 picoseconds. + Weight::from_parts(2_367_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 26_242_000 picoseconds. - Weight::from_parts(29_220_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 66_737_000 picoseconds. + Weight::from_parts(67_960_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) // Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -164,8 +154,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `3555` - // Minimum execution time: 14_106_000 picoseconds. - Weight::from_parts(14_535_000, 3555) + // Minimum execution time: 13_230_000 picoseconds. + Weight::from_parts(13_672_000, 3555) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,11 +163,13 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_634_000 picoseconds. - Weight::from_parts(2_763_000, 0) + // Minimum execution time: 2_255_000 picoseconds. + Weight::from_parts(2_361_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -192,9 +184,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `38` // Estimated: `3503` - // Minimum execution time: 27_802_000 picoseconds. - Weight::from_parts(28_495_000, 3503) - .saturating_add(T::DbWeight::get().reads(6)) + // Minimum execution time: 27_396_000 picoseconds. + Weight::from_parts(28_037_000, 3503) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) @@ -203,127 +195,152 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_683_000 picoseconds. - Weight::from_parts(4_907_000, 0) + // Minimum execution time: 4_662_000 picoseconds. + Weight::from_parts(5_035_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_941_000 picoseconds. - Weight::from_parts(4_080_000, 0) + // Minimum execution time: 3_694_000 picoseconds. + Weight::from_parts(3_930_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_775_000 picoseconds. - Weight::from_parts(2_908_000, 0) + // Minimum execution time: 2_403_000 picoseconds. + Weight::from_parts(2_519_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_743_000 picoseconds. - Weight::from_parts(2_863_000, 0) + // Minimum execution time: 2_302_000 picoseconds. + Weight::from_parts(2_422_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_641_000 picoseconds. - Weight::from_parts(2_771_000, 0) + // Minimum execution time: 2_250_000 picoseconds. + Weight::from_parts(2_293_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_838_000 picoseconds. - Weight::from_parts(2_950_000, 0) + // Minimum execution time: 2_504_000 picoseconds. + Weight::from_parts(2_632_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 29_284_000 picoseconds. - Weight::from_parts(29_867_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - pub fn expect_pallet() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_734_000 picoseconds. - Weight::from_parts(4_876_000, 0) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 71_517_000 picoseconds. + Weight::from_parts(73_518_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 26_154_000 picoseconds. - Weight::from_parts(26_851_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 67_403_000 picoseconds. + Weight::from_parts(69_255_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) } pub fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_678_000 picoseconds. - Weight::from_parts(2_748_000, 0) + // Minimum execution time: 2_293_000 picoseconds. + Weight::from_parts(2_403_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_585_000 picoseconds. - Weight::from_parts(2_697_000, 0) + // Minimum execution time: 2_295_000 picoseconds. + Weight::from_parts(2_339_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_576_000 picoseconds. - Weight::from_parts(2_701_000, 0) + // Minimum execution time: 2_227_000 picoseconds. + Weight::from_parts(2_293_000, 0) + } + // Storage: `ParachainInfo::ParachainId` (r:1 w:0) + // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) + // Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) + // Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + // Storage: `BridgePolkadotMessages::OutboundLanesCongestedSignals` (r:1 w:0) + // Proof: `BridgePolkadotMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `BridgePolkadotMessages::OutboundMessages` (r:0 w:1) + // Proof: `BridgePolkadotMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 1000]`. + pub fn export_message(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `61` + // Estimated: `1529` + // Minimum execution time: 30_606_000 picoseconds. + Weight::from_parts(33_048_888, 1529) + // Standard Error: 705 + .saturating_add(Weight::from_parts(409_990, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_597_000 picoseconds. - Weight::from_parts(2_735_000, 0) + // Minimum execution time: 2_218_000 picoseconds. + Weight::from_parts(2_277_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_744_000 picoseconds. - Weight::from_parts(2_809_000, 0) + // Minimum execution time: 2_299_000 picoseconds. + Weight::from_parts(2_431_000, 0) } } + +impl WeightInfo { pub fn expect_pallet() -> Weight { Weight::from_parts(5_756_000, 0) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index a448ffeadc..023ddc7e4a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -15,6 +15,9 @@ // along with Cumulus. If not, see . use super::{ + bridge_to_polkadot_config::{ + DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubPolkadotHaulBlobExporter, + }, AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, @@ -48,10 +51,10 @@ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: Option = Some(NetworkId::Kusama); + pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); @@ -139,6 +142,17 @@ impl Contains for SafeCallFilter { } } + // Allow to change dedicated storage items (called by governance-like) + match call { + RuntimeCall::System(frame_system::Call::set_storage { items }) + if items.iter().all(|(k, _)| { + k.eq(&DeliveryRewardInBalance::key()) || + k.eq(&RequiredStakeForStakeAndSlash::key()) + }) => + return true, + _ => (), + }; + matches!( call, RuntimeCall::PolkadotXcm( @@ -162,7 +176,23 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::remove_invulnerable { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | RuntimeCall::XcmpQueue(..) | - RuntimeCall::DmpQueue(..) + RuntimeCall::DmpQueue(..) | + RuntimeCall::BridgePolkadotGrandpa(pallet_bridge_grandpa::Call::< + Runtime, + crate::bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, + >::initialize { .. }) | + RuntimeCall::BridgePolkadotGrandpa(pallet_bridge_grandpa::Call::< + Runtime, + crate::bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, + >::set_operating_mode { .. }) | + RuntimeCall::BridgePolkadotParachains(pallet_bridge_parachains::Call::< + Runtime, + crate::bridge_to_polkadot_config::BridgeParachainPolkadotInstance, + >::set_operating_mode { .. }) | + RuntimeCall::BridgePolkadotMessages(pallet_bridge_messages::Call::< + Runtime, + crate::bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, + >::set_operating_mode { .. }) ) } } @@ -246,7 +276,7 @@ impl xcm_executor::Config for XcmConfig { type AssetLocker = (); type AssetExchanger = (); type FeeManager = XcmFeesToAccount; - type MessageExporter = (); + type MessageExporter = ToBridgeHubPolkadotHaulBlobExporter; type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 54ebc96a7a..54a4192851 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -14,21 +14,87 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -pub use bridge_hub_kusama_runtime::{ - xcm_config::XcmConfig, AllPalletsWithoutSystem, Balances, ExistentialDeposit, ParachainSystem, - PolkadotXcm, Runtime, RuntimeEvent, SessionKeys, +use bp_polkadot_core::Signature; +use bridge_hub_kusama_runtime::{ + bridge_to_polkadot_config::{ + BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, + DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, + RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, + WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + }, + xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, }; -use codec::Decode; +use codec::{Decode, Encode}; use frame_support::parameter_types; -use parachains_common::{AccountId, AuraId}; -use system_parachains_constants::kusama::fee::WeightToFee; +use frame_system::pallet_prelude::HeaderFor; +use parachains_common::{kusama::fee::WeightToFee, AccountId, AuraId, Balance}; +use sp_keyring::AccountKeyring::Alice; +use sp_runtime::{ + generic::{Era, SignedPayload}, + AccountId32, +}; +use xcm::latest::prelude::*; const ALICE: [u8; 32] = [1u8; 32]; +// Para id of sibling chain used in tests. +pub const SIBLING_PARACHAIN_ID: u32 = 1000; + parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } +fn construct_extrinsic( + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> UncheckedExtrinsic { + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from(0), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages, + (RefundBridgeHubPolkadotMessages::default()), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + AccountId32::from(sender.public()).into(), + Signature::Sr25519(signature.clone()), + extra, + ) +} + +fn construct_and_apply_extrinsic( + relayer_at_target: sp_keyring::AccountKeyring, + batch: pallet_utility::Call, +) -> sp_runtime::DispatchOutcome { + let batch_call = RuntimeCall::Utility(batch); + let xt = construct_extrinsic(relayer_at_target, batch_call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() +} + +fn executive_init_block(header: &HeaderFor) { + Executive::initialize_block(header) +} + +fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) +} + bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( Runtime, AllPalletsWithoutSystem, @@ -56,3 +122,191 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( }), 1002 ); + +#[test] +fn initialize_bridge_by_governance_works() { + bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::< + Runtime, + BridgeGrandpaPolkadotInstance, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + Box::new(|call| RuntimeCall::BridgePolkadotGrandpa(call).encode()), + ) +} + +#[test] +fn change_delivery_reward_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + DeliveryRewardInBalance, + Balance, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (DeliveryRewardInBalance::key().to_vec(), DeliveryRewardInBalance::get()), + |old_value| old_value.checked_mul(2).unwrap(), + ) +} + +#[test] +fn change_required_stake_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + RequiredStakeForStakeAndSlash, + Balance, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (RequiredStakeForStakeAndSlash::key().to_vec(), RequiredStakeForStakeAndSlash::get()), + |old_value| old_value.checked_mul(2).unwrap(), + ) +} + +#[test] +fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { + bridge_hub_test_utils::test_cases::handle_export_message_from_system_parachain_to_outbound_queue_works::< + Runtime, + XcmConfig, + WithBridgeHubPolkadotMessagesInstance, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::BridgePolkadotMessages(event)) => Some(event), + _ => None, + } + }), + || ExportMessage { network: Polkadot, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) }, + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + Some((KsmRelayLocation::get(), ExistentialDeposit::get()).into()), + // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` + Some((KsmRelayLocation::get(), bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get()).into()), + || (), + ) +} + +#[test] +fn message_dispatch_routing_works() { + bridge_hub_test_utils::test_cases::message_dispatch_routing_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + WithBridgeHubPolkadotMessagesInstance, + RelayNetwork, + PolkadotGlobalConsensusNetwork, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::ParachainSystem(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + || (), + ) +} + +#[test] +fn relayed_incoming_message_works() { + bridge_hub_test_utils::test_cases::relayed_incoming_message_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + BridgeGrandpaPolkadotInstance, + BridgeParachainPolkadotInstance, + WithBridgeHubPolkadotMessagesInstance, + WithBridgeHubPolkadotMessageBridge, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Kusama, + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + || (), + ) +} + +#[test] +pub fn complex_relay_extrinsic_works() { + bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + BridgeGrandpaPolkadotInstance, + BridgeParachainPolkadotInstance, + WithBridgeHubPolkadotMessagesInstance, + WithBridgeHubPolkadotMessageBridge, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + BridgeHubPolkadotChainId::get(), + Kusama, + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + ExistentialDeposit::get(), + executive_init_block, + construct_and_apply_extrinsic, + || (), + ); +} + +#[test] +pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { + let estimated = bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< + Runtime, + XcmConfig, + WeightToFee, + >(); + + // check if estimated value is sane + let max_expected = bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get(); + assert!( + estimated <= max_expected, + "calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms` value", + estimated, + max_expected + ); +} + +// TODO: replace me with direct usages of `bridge_hub_test_utils` after deps are bumped to (at +// least) 1.4 +// +// Following two tests have to be implemented properly after upgrade to 1.6. +// See https://github.com/paritytech/polkadot-sdk/pull/2139/ and https://github.com/paritytech/parity-bridges-common/pull/2728 +// for impl details +// +// Until that, anyone can run it manually by doing following: +// +// 1) cargo vendor ../vendored-dependencies +// 2) apply relevant changes from above PRs +// 3) change workspace Cargo.toml: +// [patch.crates-io] +// bp-polkadot-core = { path = "../vendored-dependencies/bp-polkadot-core" } +// bridge-hub-test-utils = { path = "../vendored-dependencies/bridge-hub-test-utils" } +// bridge-runtime-common = { path = "../vendored-dependencies/bridge-runtime-common" } +// 4) add actual tests code and do `cargo test -p bridge-hub-polkadot-runtime` + +#[test] +pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} + +#[test] +pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 46aef5b926..110f33c676 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -19,6 +19,13 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive" serde = { version = "1.0.188", optional = true, features = ["derive"] } smallvec = "1.11.0" +# Local +bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} +bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives", default-features = false} +bp-bridge-hub-kusama = { path = "../bridge-hub-kusama/primitives", default-features = false} +bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} + # Substrate frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } frame-executive = { default-features = false, version = "25.0.0" } @@ -52,7 +59,6 @@ sp-transaction-pool = { default-features = false, version = "23.0.0" } sp-version = { default-features = false, version = "26.0.0" } # Polkadot -polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} pallet-xcm = { default-features = false, version = "4.0.0" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } polkadot-core-primitives = { default-features = false, version = "4.0.0" } @@ -68,7 +74,7 @@ cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } cumulus-primitives-core = { default-features = false , version = "0.4.0" } cumulus-primitives-utility = { default-features = false , version = "0.4.0" } pallet-collator-selection = { default-features = false , version = "6.0.0" } @@ -76,12 +82,43 @@ parachain-info = { package = "staging-parachain-info", default-features = false parachains-common = { default-features = false , version = "4.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } +# Bridges +bp-header-chain = { default-features = false , version = "0.4.0" } +bp-messages = { default-features = false , version = "0.4.0" } +bp-parachains = { default-features = false , version = "0.4.0" } +bp-polkadot-core = { default-features = false , version = "0.4.0" } +bp-relayers = { default-features = false , version = "0.4.0" } +bp-runtime = { default-features = false , version = "0.4.0" } +bp-kusama = { default-features = false , version = "0.2.0" } +bp-polkadot = { default-features = false , version = "0.2.0" } +bridge-runtime-common = { default-features = false , version = "0.4.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } +pallet-bridge-messages = { default-features = false , version = "0.4.0" } +pallet-bridge-parachains = { default-features = false , version = "0.4.0" } +pallet-bridge-relayers = { default-features = false , version = "0.4.0" } + [dev-dependencies] bridge-hub-test-utils = { version = "0.4.0" } +bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } +sp-keyring = { version = "28.0.0" } +static_assertions = { version = "1.1.0" } [features] default = [ "std" ] std = [ + "bp-asset-hub-kusama/std", + "bp-asset-hub-polkadot/std", + "bp-bridge-hub-kusama/std", + "bp-bridge-hub-polkadot/std", + "bp-header-chain/std", + "bp-messages/std", + "bp-parachains/std", + "bp-polkadot-core/std", + "bp-relayers/std", + "bp-runtime/std", + "bp-kusama/std", + "bp-polkadot/std", + "bridge-runtime-common/std", "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", @@ -102,6 +139,10 @@ std = [ "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", + "pallet-bridge-grandpa/std", + "pallet-bridge-messages/std", + "pallet-bridge-parachains/std", + "pallet-bridge-relayers/std", "pallet-collator-selection/std", "pallet-multisig/std", "pallet-session/std", @@ -141,6 +182,7 @@ std = [ ] runtime-benchmarks = [ + "bridge-runtime-common/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -150,6 +192,10 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-bridge-grandpa/runtime-benchmarks", + "pallet-bridge-messages/runtime-benchmarks", + "pallet-bridge-parachains/runtime-benchmarks", + "pallet-bridge-relayers/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", @@ -176,6 +222,10 @@ try-runtime = [ "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-bridge-grandpa/try-runtime", + "pallet-bridge-messages/try-runtime", + "pallet-bridge-parachains/try-runtime", + "pallet-bridge-relayers/try-runtime", "pallet-collator-selection/try-runtime", "pallet-multisig/try-runtime", "pallet-session/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml new file mode 100644 index 0000000000..614216ff78 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "bp-bridge-hub-polkadot" +description = "Primitives of BridgeHubPolkadot parachain runtime." +repository.workspace = true +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] + +# Local +kusama-runtime-constants = { path = "../../../../relay/kusama/constants", default-features = false} +polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} + +# Bridge Dependencies +bp-bridge-hub-cumulus = { default-features = false , version = "0.4.0" } +bp-runtime = { default-features = false , version = "0.4.0" } +bp-messages = { default-features = false , version = "0.4.0" } + +# Substrate Based Dependencies +frame-support = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-std = { default-features = false , version = "12.0.0" } + +[features] +default = [ "std" ] +std = [ + "bp-bridge-hub-cumulus/std", + "bp-messages/std", + "bp-runtime/std", + "frame-support/std", + "kusama-runtime-constants/std", + "polkadot-runtime-constants/std", + "sp-api/std", + "sp-runtime/std", + "sp-std/std", +] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs new file mode 100644 index 0000000000..b02f6107d6 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -0,0 +1,146 @@ +// 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 . + +//! Module with configuration which reflects BridgeHubPolkadot runtime setup +//! (AccountId, Headers, Hashes...) + +#![cfg_attr(not(feature = "std"), no_std)] + +pub use bp_bridge_hub_cumulus::*; +use bp_messages::*; +use bp_runtime::{ + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, +}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; + +/// BridgeHubPolkadot parachain. +#[derive(RuntimeDebug)] +pub struct BridgeHubPolkadot; + +impl Chain for BridgeHubPolkadot { + type BlockNumber = BlockNumber; + type Hash = Hash; + type Hasher = Hasher; + type Header = Header; + + type AccountId = AccountId; + type Balance = Balance; + type Nonce = Nonce; + type Signature = Signature; + + fn max_extrinsic_size() -> u32 { + *BlockLength::get().max.get(DispatchClass::Normal) + } + + fn max_extrinsic_weight() -> Weight { + BlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic + .unwrap_or(Weight::MAX) + } +} + +impl Parachain for BridgeHubPolkadot { + const PARACHAIN_ID: u32 = BRIDGE_HUB_POLKADOT_PARACHAIN_ID; +} + +/// Identifier of BridgeHubPolkadot in the Polkadot relay chain. +pub const BRIDGE_HUB_POLKADOT_PARACHAIN_ID: u32 = 1002; + +/// Name of the With-BridgeHubPolkadot messages pallet instance that is deployed at bridged chains. +pub const WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME: &str = "BridgePolkadotMessages"; + +/// Name of the With-BridgeHubPolkadot bridge-relayers pallet instance that is deployed at bridged +/// chains. +pub const WITH_BRIDGE_HUB_POLKADOT_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; + +/// Pallet index of `BridgeKusamaMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX: u8 = 53; + +decl_bridge_finality_runtime_apis!(bridge_hub_polkadot); +decl_bridge_messages_runtime_apis!(bridge_hub_polkadot); + +frame_support::parameter_types! { + /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Polkadot + /// BridgeHub. + /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 4_858_960_000; + + /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. + /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) + pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_954_899_613; + + /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single outbound message confirmation. + /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) + pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_183_099_613; +} + +/// Compute the total estimated fee that needs to be paid in DOTs by the sender when sending +/// message from Polkadot Bridge Hub to Kusama Bridge Hub. +pub fn estimate_polkadot_to_kusama_message_fee( + bridge_hub_kusama_base_delivery_fee_in_uksms: Balance, +) -> Balance { + // Sender must pay: + // + // 1) an approximate cost of XCM execution (`ExportMessage` and surroundings) at Polkadot bridge + // Hub; + // + // 2) the approximate cost of Polkadot -> Kusama message delivery transaction on Kusama Bridge + // Hub, converted into KSMs using 1:5 conversion rate; + // + // 3) the approximate cost of Polkadot -> Kusama message confirmation transaction on Polkadot + // Bridge Hub. + BridgeHubPolkadotBaseXcmFeeInDots::get() + .saturating_add(convert_from_uksm_to_udot(bridge_hub_kusama_base_delivery_fee_in_uksms)) + .saturating_add(BridgeHubPolkadotBaseConfirmationFeeInDots::get()) +} + +/// Convert from uKSMs to uDOTs. +fn convert_from_uksm_to_udot(price_in_uksm: Balance) -> Balance { + // assuming exchange rate is 5 DOTs for 1 KSM + let dot_to_ksm_economic_rate = FixedU128::from_rational(5, 1); + // tokens have different nominals and we need to take that into account + let nominal_ratio = FixedU128::from_rational( + polkadot_runtime_constants::currency::UNITS, + kusama_runtime_constants::currency::UNITS, + ); + + dot_to_ksm_economic_rate + .saturating_mul(nominal_ratio) + .saturating_mul(FixedU128::saturating_from_integer(price_in_uksm)) + .into_inner() / + FixedU128::DIV +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn convert_from_uksm_to_udot_works() { + let price_in_uksm = 77 * kusama_runtime_constants::currency::UNITS; + let same_price_in_udot = convert_from_uksm_to_udot(price_in_uksm); + + let price_in_ksm = + FixedU128::from_rational(price_in_uksm, kusama_runtime_constants::currency::UNITS); + let price_in_dot = FixedU128::from_rational( + same_price_in_udot, + polkadot_runtime_constants::currency::UNITS, + ); + assert_eq!(price_in_dot / FixedU128::saturating_from_integer(5), price_in_ksm); + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs new file mode 100644 index 0000000000..4911e3444f --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -0,0 +1,400 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus 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. + +// Cumulus 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 Cumulus. If not, see . + +//! Bridge definitions used for bridging with Kusama Bridge Hub. + +use crate::{ + weights, + xcm_config::{UniversalLocation, XcmRouter}, + AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, Runtime, RuntimeEvent, + RuntimeOrigin, +}; +use bp_messages::LaneId; +use bp_parachains::SingleParaStoredHeaderDataBuilder; +use bridge_runtime_common::{ + messages, + messages::{ + source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter}, + target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter}, + MessageBridge, ThisChainWithMessages, UnderlyingChainProvider, + }, + messages_xcm_extension::{ + SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, + XcmBlobMessageDispatch, + }, + refund_relayer_extension::{ + ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, + RefundableMessagesLane, RefundableParachain, + }, +}; +use cumulus_primitives_core::ParentThen; +use frame_support::{parameter_types, traits::PalletInfoAccess}; +use polkadot_runtime_constants as constants; +use sp_runtime::{traits::ConstU32, RuntimeDebug}; +use xcm::{ + latest::prelude::*, + prelude::{InteriorMultiLocation, NetworkId}, +}; +use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter}; + +/// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. +pub const XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA: LaneId = LaneId([0, 0, 0, 1]); + +// Parameters that may be changed by the governance. +parameter_types! { + /// Reward that is paid (by the Polkadot Asset Hub) to relayers for delivering a single + /// Polkadot -> Kusama bridge message. + /// + /// This payment is tracked by the `pallet_bridge_relayers` pallet at the Polkadot + /// Bridge Hub. + pub storage DeliveryRewardInBalance: Balance = constants::currency::UNITS / 2_000; + + /// Registered relayer stake. + /// + /// Any relayer may reserve this amount on his account and get a priority boost for his + /// message delivery transactions. In exchange, he risks losing his stake if he would + /// submit an invalid transaction. The set of such (registered) relayers is tracked + /// by the `pallet_bridge_relayers` pallet at the Polkadot Bridge Hub. + pub storage RequiredStakeForStakeAndSlash: Balance = 500 * constants::currency::UNITS; +} + +// Parameters, used by both XCM and bridge code. +parameter_types! { + /// Kusama Network identifier. + pub KusamaGlobalConsensusNetwork: NetworkId = NetworkId::Kusama; + /// Interior location (relative to this runtime) of the with-Kusama messages pallet. + pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorMultiLocation = X1( + PalletInstance(::index() as u8), + ); + + /// Identifier of the sibling Polkadot Asset Hub parachain. + pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub + /// message is following. + pub FromAssetHubPolkadotToAssetHubKusamaRoute: SenderAndLane = SenderAndLane::new( + ParentThen(X1(Parachain(AssetHubPolkadotParaId::get().into()))).into(), + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + ); +} + +// Parameters, used by bridge transport code. +parameter_types! { + /// Number of Kusama headers to keep in the runtime storage. + /// + /// Note that we are keeping only required header information, not the whole header itself. Roughly, it + /// is the 2 hours of real time (assuming that every header is submitted). + pub const RelayChainHeadersToKeep: u32 = 1_200; + /// Number of Kusama Bridge Hub headers to keep in the runtime storage. + /// + /// Note that we are keeping only required header information, not the whole header itself. Roughly, it + /// is the 2 hours of real time (assuming that every header is submitted). + pub const ParachainHeadsToKeep: u32 = 600; + /// Maximal size of Kusama Bridge Hub header **part** that we are storing in the runtime storage. + pub const MaxParaHeadDataSize: u32 = bp_kusama::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; + + /// Bridge specific chain (network) identifier of the Kusama Bridge Hub. + pub const BridgeHubKusamaChainId: bp_runtime::ChainId = bp_runtime::BRIDGE_HUB_KUSAMA_CHAIN_ID; + /// Name of the `paras` pallet at Kusama that tracks all parachain heads. + pub const ParachainPalletNameAtKusama: &'static str = bp_kusama::PARAS_PALLET_NAME; + + /// Maximal number of entries in the unrewarded relayers vector at the Polkadot Bridge Hub. It matches the + /// maximal number of unrewarded relayers that the single confirmation transaction at Kusama Bridge + /// Hub may process. + pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = + bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + /// Maximal number of unconfirmed messages at the Polkadot Bridge Hub. It matches the maximal number of + /// uncinfirmed messages that the single confirmation transaction at Kusama Bridge Hub may process. + pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = + bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; + + /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. + pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; + + /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. + pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; + /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. + pub const RelayerStakeLease: u32 = 300; + /// Priority boost that the registered relayer receives for every additional message in the message + /// delivery transaction. + /// + /// It is determined semi-automatically - see `FEE_BOOST_PER_MESSAGE` constant to get the + /// meaning of this value + pub PriorityBoostPerMessage: u64 = 1_820_444_444_444; +} + +/// Add GRANDPA bridge pallet to track Kusama relay chain. +pub type BridgeGrandpaKusamaInstance = pallet_bridge_grandpa::Instance1; +impl pallet_bridge_grandpa::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type BridgedChain = bp_kusama::Kusama; + type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; + type HeadersToKeep = RelayChainHeadersToKeep; + type WeightInfo = weights::pallet_bridge_grandpa::WeightInfo; +} + +/// Add parachain bridge pallet to track Kusama BridgeHub parachain. +pub type BridgeParachainKusamaInstance = pallet_bridge_parachains::Instance1; +impl pallet_bridge_parachains::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_bridge_parachains::WeightInfo; + type BridgesGrandpaPalletInstance = BridgeGrandpaKusamaInstance; + type ParasPalletName = ParachainPalletNameAtKusama; + type ParaStoredHeaderDataBuilder = + SingleParaStoredHeaderDataBuilder; + type HeadsToKeep = ParachainHeadsToKeep; + type MaxParaHeadDataSize = MaxParaHeadDataSize; +} + +/// Allows collect and claim rewards for relayers. +impl pallet_bridge_relayers::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reward = Balance; + type PaymentProcedure = + bp_relayers::PayRewardFromAccount, AccountId>; + type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + RelayerStakeReserveId, + RequiredStakeForStakeAndSlash, + RelayerStakeLease, + >; + type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; +} + +/// Add XCM messages support for exchanging messages with BridgeHubKusama. +pub type WithBridgeHubKusamaMessagesInstance = pallet_bridge_messages::Instance1; +impl pallet_bridge_messages::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_bridge_messages::WeightInfo; + type BridgedChainId = BridgeHubKusamaChainId; + type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubKusama; + type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; + type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; + + type MaximalOutboundPayloadSize = ToBridgeHubKusamaMaximalOutboundPayloadSize; + type OutboundPayload = XcmAsPlainPayload; + + type InboundPayload = XcmAsPlainPayload; + type InboundRelayer = AccountId; + type DeliveryPayments = (); + + type TargetHeaderChain = TargetHeaderChainAdapter; + type LaneMessageVerifier = ToBridgeHubKusamaMessageVerifier; + type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< + Runtime, + WithBridgeHubKusamaMessagesInstance, + DeliveryRewardInBalance, + >; + + type SourceHeaderChain = SourceHeaderChainAdapter; + type MessageDispatch = XcmBlobMessageDispatch< + FromKusamaMessageBlobDispatcher, + Self::WeightInfo, + cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider< + AssetHubPolkadotParaId, + Runtime, + >, + >; + type OnMessagesDelivered = OnMessagesDeliveredFromKusama; +} + +/// Proof of messages, coming from Kusama. +pub type FromKusamaBridgeHubMessagesProof = + FromBridgedChainMessagesProof; +/// Messages delivery proof for Polkadot Bridge Hub -> Kusama Bridge Hub messages. +pub type ToKusamaBridgeHubMessagesDeliveryProof = + FromBridgedChainMessagesDeliveryProof; + +/// Dispatches received XCM messages from Kusama BridgeHub. +type FromKusamaMessageBlobDispatcher = BridgeBlobDispatcher< + XcmRouter, + UniversalLocation, + BridgePolkadotToKusamaMessagesPalletInstance, +>; + +/// Export XCM messages to be relayed to the other side +pub type ToBridgeHubKusamaHaulBlobExporter = HaulBlobExporter< + XcmBlobHaulerAdapter, + KusamaGlobalConsensusNetwork, + (), +>; +pub struct ToBridgeHubKusamaXcmBlobHauler; +impl XcmBlobHauler for ToBridgeHubKusamaXcmBlobHauler { + type Runtime = Runtime; + type MessagesInstance = WithBridgeHubKusamaMessagesInstance; + type SenderAndLane = FromAssetHubPolkadotToAssetHubKusamaRoute; + + type ToSourceChainSender = XcmRouter; + type CongestedMessage = bp_asset_hub_polkadot::CongestedMessage; + type UncongestedMessage = bp_asset_hub_polkadot::UncongestedMessage; +} + +/// On messages delivered callback. +type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; + +/// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama +pub struct WithBridgeHubKusamaMessageBridge; +impl MessageBridge for WithBridgeHubKusamaMessageBridge { + const BRIDGED_MESSAGES_PALLET_NAME: &'static str = + bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME; + type ThisChain = BridgeHubPolkadot; + type BridgedChain = BridgeHubKusama; + type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< + Runtime, + BridgeParachainKusamaInstance, + bp_bridge_hub_kusama::BridgeHubKusama, + >; +} + +/// Message verifier for BridgeHubKusama messages sent from BridgeHubPolkadot +pub type ToBridgeHubKusamaMessageVerifier = + messages::source::FromThisChainMessageVerifier; + +/// Maximal outbound payload size of BridgeHubPolkadot -> BridgeHubKusama messages. +pub type ToBridgeHubKusamaMaximalOutboundPayloadSize = + messages::source::FromThisChainMaximalOutboundPayloadSize; + +/// BridgeHubKusama chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct BridgeHubKusama; + +impl UnderlyingChainProvider for BridgeHubKusama { + type Chain = bp_bridge_hub_kusama::BridgeHubKusama; +} + +impl messages::BridgedChainWithMessages for BridgeHubKusama {} + +/// BridgeHubPolkadot chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct BridgeHubPolkadot; + +impl UnderlyingChainProvider for BridgeHubPolkadot { + type Chain = bp_bridge_hub_polkadot::BridgeHubPolkadot; +} + +impl ThisChainWithMessages for BridgeHubPolkadot { + type RuntimeOrigin = RuntimeOrigin; +} + +/// Signed extension that refunds relayers that are delivering messages from the Kusama parachain. +pub type RefundBridgeHubKusamaMessages = RefundSignedExtensionAdapter< + RefundBridgedParachainMessages< + Runtime, + RefundableParachain, + RefundableMessagesLane< + WithBridgeHubKusamaMessagesInstance, + AssetHubPolkadotToAssetHubKusamaMessagesLane, + >, + ActualFeeRefund, + PriorityBoostPerMessage, + StrRefundBridgeHubKusamaMessages, + >, +>; +bp_runtime::generate_static_str_provider!(RefundBridgeHubKusamaMessages); + +#[cfg(test)] +mod tests { + use super::*; + use bridge_runtime_common::{ + assert_complete_bridge_types, + integrity::{ + assert_complete_bridge_constants, check_message_lane_weights, + AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants, + AssertCompleteBridgeConstants, + }, + }; + + /// Every additional message in the message delivery transaction boosts its priority. + /// So the priority of transaction with `N+1` messages is larger than priority of + /// transaction with `N` messages by the `PriorityBoostPerMessage`. + /// + /// Economically, it is an equivalent of adding tip to the transaction with `N` messages. + /// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip. + /// + /// We want this tip to be large enough (delivery transactions with more messages = less + /// operational costs and a faster bridge), so this value should be significant. + const FEE_BOOST_PER_MESSAGE: Balance = 2 * constants::currency::UNITS; + + #[test] + fn ensure_bridge_hub_polkadot_message_lane_weights_are_correct() { + check_message_lane_weights::< + bp_bridge_hub_polkadot::BridgeHubPolkadot, + Runtime, + WithBridgeHubKusamaMessagesInstance, + >( + bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE, + bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + true, + ); + } + + #[test] + fn ensure_bridge_integrity() { + assert_complete_bridge_types!( + runtime: Runtime, + with_bridged_chain_grandpa_instance: BridgeGrandpaKusamaInstance, + with_bridged_chain_messages_instance: WithBridgeHubKusamaMessagesInstance, + bridge: WithBridgeHubKusamaMessageBridge, + this_chain: bp_polkadot::Polkadot, + bridged_chain: bp_kusama::Kusama, + ); + + assert_complete_bridge_constants::< + Runtime, + BridgeGrandpaKusamaInstance, + WithBridgeHubKusamaMessagesInstance, + WithBridgeHubKusamaMessageBridge, + >(AssertCompleteBridgeConstants { + this_chain_constants: AssertChainConstants { + block_length: bp_bridge_hub_polkadot::BlockLength::get(), + block_weights: bp_bridge_hub_polkadot::BlockWeights::get(), + }, + messages_pallet_constants: AssertBridgeMessagesPalletConstants { + max_unrewarded_relayers_in_bridged_confirmation_tx: + bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + max_unconfirmed_messages_in_bridged_confirmation_tx: + bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + bridged_chain_id: bp_runtime::BRIDGE_HUB_KUSAMA_CHAIN_ID, + }, + pallet_names: AssertBridgePalletNames { + with_this_chain_messages_pallet_name: + bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME, + with_bridged_chain_grandpa_pallet_name: bp_kusama::WITH_KUSAMA_GRANDPA_PALLET_NAME, + with_bridged_chain_messages_pallet_name: + bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME, + }, + }); + + bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::< + Runtime, + WithBridgeHubKusamaMessagesInstance, + PriorityBoostPerMessage, + >(FEE_BOOST_PER_MESSAGE); + + assert_eq!( + BridgePolkadotToKusamaMessagesPalletInstance::get(), + X1(PalletInstance( + bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX + )) + ); + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index c18dcc3d2f..126a5dd407 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -22,6 +22,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; @@ -101,8 +102,20 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + BridgeRejectObsoleteHeadersAndMessages, + bridge_to_kusama_config::RefundBridgeHubKusamaMessages, ); +bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { + RuntimeCall, AccountId, + // Grandpa + BridgeKusamaGrandpa, + // Parachains + BridgeKusamaParachains, + // Messages + BridgeKusamaMessages +} + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -454,6 +467,14 @@ construct_runtime!( // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, + + // Pallets that may be used by all bridges. + BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event} = 50, + + // Kusama bridge pallets. + BridgeKusamaGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 51, + BridgeKusamaParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 52, + BridgeKusamaMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 53, } ); @@ -477,6 +498,12 @@ mod benches { // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] + // Shared bridge pallets + [pallet_bridge_relayers, BridgeRelayersBench::] + // Polkadot bridge pallets. + [pallet_bridge_grandpa, KusamaFinality] + [pallet_bridge_parachains, KusamaParachains] + [pallet_bridge_messages, KusamaMessages] ); } @@ -634,6 +661,50 @@ impl_runtime_apis! { } } + impl bp_kusama::KusamaFinalityApi for Runtime { + fn best_finalized() -> Option> { + BridgeKusamaGrandpa::best_finalized() + } + + fn synced_headers_grandpa_info( + ) -> Vec> { + BridgeKusamaGrandpa::synced_headers_grandpa_info() + } + } + + impl bp_bridge_hub_kusama::BridgeHubKusamaFinalityApi for Runtime { + fn best_finalized() -> Option> { + BridgeKusamaParachains::best_parachain_head_id::< + bp_bridge_hub_kusama::BridgeHubKusama + >().unwrap_or(None) + } + } + + impl bp_bridge_hub_kusama::FromBridgeHubKusamaInboundLaneApi for Runtime { + fn message_details( + lane: bp_messages::LaneId, + messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, + ) -> Vec { + bridge_runtime_common::messages_api::inbound_message_details::< + Runtime, + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >(lane, messages) + } + } + + impl bp_bridge_hub_kusama::ToBridgeHubKusamaOutboundLaneApi for Runtime { + fn message_details( + lane: bp_messages::LaneId, + begin: bp_messages::MessageNonce, + end: bp_messages::MessageNonce, + ) -> Vec { + bridge_runtime_common::messages_api::outbound_message_details::< + Runtime, + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >(lane, begin, end) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -670,6 +741,11 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench; + type KusamaFinality = BridgeKusamaGrandpa; + type KusamaParachains = pallet_bridge_parachains::benchmarking::Pallet::; + type KusamaMessages = pallet_bridge_messages::benchmarking::Pallet::; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -792,7 +868,7 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - Err(BenchmarkError::Skip) + Ok((DotRelayLocation::get(), NetworkId::Kusama, X1(Parachain(1000)))) } fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { @@ -803,6 +879,114 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + type KusamaFinality = BridgeKusamaGrandpa; + type KusamaParachains = pallet_bridge_parachains::benchmarking::Pallet::; + type KusamaMessages = pallet_bridge_messages::benchmarking::Pallet::; + + use pallet_bridge_relayers::benchmarking::{ + Pallet as BridgeRelayersBench, + Config as BridgeRelayersConfig, + }; + + impl BridgeRelayersConfig for Runtime { + fn prepare_rewards_account( + account_params: bp_relayers::RewardsAccountParams, + reward: Balance, + ) { + let rewards_account = bp_relayers::PayRewardFromAccount::< + Balances, + AccountId + >::rewards_account(account_params); + Self::deposit_account(rewards_account, reward); + } + + fn deposit_account(account: AccountId, balance: Balance) { + use frame_support::traits::fungible::Mutate; + Balances::mint_into(&account, balance.saturating_add(ExistentialDeposit::get())).unwrap(); + } + } + + use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof; + use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig; + + impl BridgeParachainsConfig for Runtime { + fn parachains() -> Vec { + use bp_runtime::Parachain; + vec![bp_polkadot_core::parachains::ParaId(bp_bridge_hub_kusama::BridgeHubKusama::PARACHAIN_ID)] + } + + fn prepare_parachain_heads_proof( + parachains: &[bp_polkadot_core::parachains::ParaId], + parachain_head_size: u32, + proof_size: bp_runtime::StorageProofSize, + ) -> ( + pallet_bridge_parachains::RelayBlockNumber, + pallet_bridge_parachains::RelayBlockHash, + bp_polkadot_core::parachains::ParaHeadsProof, + Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>, + ) { + prepare_parachain_heads_proof::( + parachains, + parachain_head_size, + proof_size, + ) + } + } + + use bridge_runtime_common::messages_benchmarking::{ + prepare_message_delivery_proof_from_parachain, + prepare_message_proof_from_parachain, + generate_xcm_builder_bridge_message_sample, + }; + use pallet_bridge_messages::benchmarking::{ + Config as BridgeMessagesConfig, + MessageDeliveryProofParams, + MessageProofParams, + }; + + impl BridgeMessagesConfig for Runtime { + fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { + let bench_lane_id = >::bench_lane_id(); + let bridged_chain_id = bp_runtime::BRIDGE_HUB_KUSAMA_CHAIN_ID; + pallet_bridge_relayers::Pallet::::relayer_reward( + relayer, + bp_relayers::RewardsAccountParams::new( + bench_lane_id, + bridged_chain_id, + bp_relayers::RewardsAccountOwner::BridgedChain + ) + ).is_some() + } + + fn prepare_message_proof( + params: MessageProofParams, + ) -> (bridge_to_kusama_config::FromKusamaBridgeHubMessagesProof, Weight) { + use cumulus_primitives_core::XcmpMessageSource; + assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + prepare_message_proof_from_parachain::< + Runtime, + bridge_to_kusama_config::BridgeGrandpaKusamaInstance, + bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, + >(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Polkadot), Parachain(42)))) + } + + fn prepare_message_delivery_proof( + params: MessageDeliveryProofParams, + ) -> bridge_to_kusama_config::ToKusamaBridgeHubMessagesDeliveryProof { + prepare_message_delivery_proof_from_parachain::< + Runtime, + bridge_to_kusama_config::BridgeGrandpaKusamaInstance, + bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, + >(params) + } + + fn is_message_successfully_dispatched(_nonce: bp_messages::MessageNonce) -> bool { + use cumulus_primitives_core::XcmpMessageSource; + !XcmpQueue::take_outbound_messages(usize::MAX).is_empty() + } + } + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs index 60dfbea8db..951cab5546 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs @@ -17,11 +17,21 @@ //! Expose the auto generated weight files. +use crate::Runtime; +use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt; +use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt; +use ::pallet_bridge_relayers::WeightInfoExt as _; +use frame_support::weights::Weight; + pub mod block_weights; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; pub mod pallet_balances; +pub mod pallet_bridge_grandpa; +pub mod pallet_bridge_messages; +pub mod pallet_bridge_parachains; +pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; pub mod pallet_multisig; pub mod pallet_session; @@ -35,3 +45,24 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; pub use rocksdb_weights::constants::RocksDbWeight; + +impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo { + fn expected_extra_storage_proof_size() -> u32 { + bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE + } + + fn receive_messages_proof_overhead_from_runtime() -> Weight { + pallet_bridge_relayers::WeightInfo::::receive_messages_proof_overhead_from_runtime( + ) + } + + fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight { + pallet_bridge_relayers::WeightInfo::::receive_messages_delivery_proof_overhead_from_runtime() + } +} + +impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo { + fn expected_extra_storage_proof_size() -> u32 { + bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs new file mode 100644 index 0000000000..197f112806 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs @@ -0,0 +1,63 @@ + +//! Autogenerated weights for `pallet_bridge_grandpa` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-polkadot-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-polkadot-local-raw.json +// --pallet +// pallet-bridge-grandpa +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_grandpa`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_grandpa::WeightInfo for WeightInfo { + /// Storage: `BridgeKusamaGrandpa::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::BestFinalized` (r:1 w:1) + /// Proof: `BridgeKusamaGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::CurrentAuthoritySet` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHashesPointer` (r:1 w:1) + /// Proof: `BridgeKusamaGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHashes` (r:1 w:1) + /// Proof: `BridgeKusamaGrandpa::ImportedHashes` (`max_values`: Some(1200), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:0 w:2) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 838]`. + /// The range of component `v` is `[50, 100]`. + fn submit_finality_proof(p: u32, v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `302 + p * (60 ±0)` + // Estimated: `51735` + // Minimum execution time: 375_137_000 picoseconds. + Weight::from_parts(60_927_772, 0) + .saturating_add(Weight::from_parts(0, 51735)) + // Standard Error: 8_595 + .saturating_add(Weight::from_parts(61_673_711, 0).saturating_mul(p.into())) + // Standard Error: 143_360 + .saturating_add(Weight::from_parts(3_269_140, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs new file mode 100644 index 0000000000..fb7f0e1895 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs @@ -0,0 +1,226 @@ + +//! Autogenerated weights for `pallet_bridge_messages` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-polkadot-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-polkadot-local-raw.json +// --pallet +// pallet-bridge-messages +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_messages`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_messages::WeightInfo for WeightInfo { + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_single_message_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `542` + // Estimated: `52645` + // Minimum execution time: 71_852_000 picoseconds. + Weight::from_parts(74_164_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_two_messages_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `542` + // Estimated: `52645` + // Minimum execution time: 90_722_000 picoseconds. + Weight::from_parts(99_839_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_single_message_proof_with_outbound_lane_state() -> Weight { + // Proof Size summary in bytes: + // Measured: `542` + // Estimated: `52645` + // Minimum execution time: 78_537_000 picoseconds. + Weight::from_parts(80_528_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + fn receive_single_message_proof_1_kb() -> Weight { + // Proof Size summary in bytes: + // Measured: `510` + // Estimated: `52645` + // Minimum execution time: 68_804_000 picoseconds. + Weight::from_parts(71_705_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + fn receive_single_message_proof_16_kb() -> Weight { + // Proof Size summary in bytes: + // Measured: `510` + // Estimated: `52645` + // Minimum execution time: 104_741_000 picoseconds. + Weight::from_parts(106_847_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_single_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `412` + // Estimated: `3877` + // Minimum execution time: 40_971_000 picoseconds. + Weight::from_parts(42_095_000, 0) + .saturating_add(Weight::from_parts(0, 3877)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { + // Proof Size summary in bytes: + // Measured: `412` + // Estimated: `3877` + // Minimum execution time: 41_175_000 picoseconds. + Weight::from_parts(42_223_000, 0) + .saturating_add(Weight::from_parts(0, 3877)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { + // Proof Size summary in bytes: + // Measured: `412` + // Estimated: `6086` + // Minimum execution time: 44_446_000 picoseconds. + Weight::from_parts(45_490_000, 0) + .saturating_add(Weight::from_parts(0, 6086)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[128, 2048]`. + fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `673` + // Estimated: `52645` + // Minimum execution time: 84_817_000 picoseconds. + Weight::from_parts(85_877_544, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 96 + .saturating_add(Weight::from_parts(7_374, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_parachains.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_parachains.rs new file mode 100644 index 0000000000..8cf2ee96c2 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_parachains.rs @@ -0,0 +1,96 @@ + +//! Autogenerated weights for `pallet_bridge_parachains` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-polkadot-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-polkadot-local-raw.json +// --pallet +// pallet-bridge-parachains +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_parachains`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_parachains::WeightInfo for WeightInfo { + /// Storage: `BridgeKusamaParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 2]`. + fn submit_parachain_heads_with_n_parachains(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `364` + // Estimated: `2543` + // Minimum execution time: 41_520_000 picoseconds. + Weight::from_parts(42_862_371, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeKusamaParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + fn submit_parachain_heads_with_1kb_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `364` + // Estimated: `2543` + // Minimum execution time: 43_116_000 picoseconds. + Weight::from_parts(43_611_000, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeKusamaParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + fn submit_parachain_heads_with_16kb_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `364` + // Estimated: `2543` + // Minimum execution time: 77_877_000 picoseconds. + Weight::from_parts(79_034_000, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs new file mode 100644 index 0000000000..636b5b5b4f --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs @@ -0,0 +1,107 @@ + +//! Autogenerated weights for `pallet_bridge_relayers` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-11-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `MusXroom`, CPU: `13th Gen Intel(R) Core(TM) i7-13650HX` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bh-polkadot-local-raw.json")`, DB CACHE: 1024 + +// Executed Command: +// ../polkadot-sdk/target/release/polkadot-parachain-benchmarks +// benchmark +// pallet +// --chain +// bh-polkadot-local-raw.json +// --pallet +// pallet-bridge-relayers +// --extrinsic +// * +// --output=system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights +// --no-median-slopes +// --no-min-squares + +#![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_bridge_relayers`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_relayers::WeightInfo for WeightInfo { + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn claim_rewards() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `3593` + // Minimum execution time: 37_582_000 picoseconds. + Weight::from_parts(38_046_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + fn register() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `4714` + // Minimum execution time: 18_758_000 picoseconds. + Weight::from_parts(19_298_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + fn deregister() -> Weight { + // Proof Size summary in bytes: + // Measured: `231` + // Estimated: `4714` + // Minimum execution time: 20_507_000 picoseconds. + Weight::from_parts(20_944_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn slash_and_deregister() -> Weight { + // Proof Size summary in bytes: + // Measured: `334` + // Estimated: `4714` + // Minimum execution time: 22_634_000 picoseconds. + Weight::from_parts(23_065_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn register_relayer_reward() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3538` + // Minimum execution time: 2_718_000 picoseconds. + Weight::from_parts(2_840_000, 0) + .saturating_add(Weight::from_parts(0, 3538)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs index 7e9f218427..3a07ef123f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs @@ -18,6 +18,7 @@ mod pallet_xcm_benchmarks_fungible; mod pallet_xcm_benchmarks_generic; use crate::{xcm_config::MaxAssetsIntoHolding, Runtime}; +use codec::Encode; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; @@ -211,8 +212,9 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn universal_origin(_: &Junction) -> Weight { Weight::MAX } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { - Weight::MAX + fn export_message(_: &NetworkId, _: &Junctions, inner: &Xcm<()>) -> Weight { + let inner_encoded_len = inner.encode().len() as u32; + XcmGeneric::::export_message(inner_encoded_len) } fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { Weight::MAX diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 7968649d14..c42cdccb1e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -1,44 +1,26 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus 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. - -// Cumulus 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 Cumulus. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 +//! HOSTNAME: `svyatonik-benchmarking`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz` +//! WASM-EXECUTION: Compiled, CHAIN: Some("bh-polkadot-local-raw.json"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// ../polkadot-sdk/target/production/polkadot-parachain-benchmarks // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=bridge-hub-polkadot-dev -// --wasm-execution=compiled -// --pallet=pallet_xcm_benchmarks::generic -// --no-storage-info +// --chain +// bh-polkadot-local-raw.json +// --pallet +// pallet-xcm-benchmarks::generic +// --extrinsic +// report_holding,buy_execution,query_response,transact,refund_surplus,set_error_handler,set_appendix,clear_error,descend_origin,clear_origin,report_error,claim_asset,trap,subscribe_version,unsubscribe_version,burn_asset,expect_asset,expect_origin,expect_error,expect_transact_status,query_pallet,report_transact_status,clear_transact_status,set_topic,clear_topic,export_message,set_fees_mode,unpaid_execution,universal_origin +// --template=../polkadot-sdk/cumulus/templates/xcm-bench-template.hbs +// --output=system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm // --no-median-slopes // --no-min-squares -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json -// --header=./file_header.txt -// --output=./parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,31 +34,35 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 30_923_000 picoseconds. - Weight::from_parts(31_653_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 62_849_000 picoseconds. + Weight::from_parts(63_913_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .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_837_000 picoseconds. - Weight::from_parts(2_932_000, 0) + // Minimum execution time: 2_513_000 picoseconds. + Weight::from_parts(2_619_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -84,79 +70,83 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `3497` - // Minimum execution time: 10_319_000 picoseconds. - Weight::from_parts(10_614_000, 3497) + // Minimum execution time: 9_382_000 picoseconds. + Weight::from_parts(9_570_000, 3497) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_466_000 picoseconds. - Weight::from_parts(12_005_000, 0) + // Minimum execution time: 10_783_000 picoseconds. + Weight::from_parts(11_041_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_039_000 picoseconds. - Weight::from_parts(3_125_000, 0) + // Minimum execution time: 2_732_000 picoseconds. + Weight::from_parts(2_800_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_655_000 picoseconds. - Weight::from_parts(2_717_000, 0) + // Minimum execution time: 2_347_000 picoseconds. + Weight::from_parts(2_420_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_655_000 picoseconds. - Weight::from_parts(2_695_000, 0) + // Minimum execution time: 2_357_000 picoseconds. + Weight::from_parts(2_393_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_612_000 picoseconds. - Weight::from_parts(2_685_000, 0) + // Minimum execution time: 2_339_000 picoseconds. + Weight::from_parts(2_417_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_286_000 picoseconds. - Weight::from_parts(3_425_000, 0) + // Minimum execution time: 3_165_000 picoseconds. + Weight::from_parts(3_241_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_613_000 picoseconds. - Weight::from_parts(2_699_000, 0) + // Minimum execution time: 2_338_000 picoseconds. + Weight::from_parts(2_403_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 24_616_000 picoseconds. - Weight::from_parts(25_147_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 54_827_000 picoseconds. + Weight::from_parts(55_517_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) // Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -164,8 +154,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `3555` - // Minimum execution time: 14_511_000 picoseconds. - Weight::from_parts(14_831_000, 3555) + // Minimum execution time: 13_690_000 picoseconds. + Weight::from_parts(13_900_000, 3555) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,11 +163,13 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_640_000 picoseconds. - Weight::from_parts(2_702_000, 0) + // Minimum execution time: 2_324_000 picoseconds. + Weight::from_parts(2_397_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -192,9 +184,9 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `38` // Estimated: `3503` - // Minimum execution time: 26_044_000 picoseconds. - Weight::from_parts(26_561_000, 3503) - .saturating_add(T::DbWeight::get().reads(6)) + // Minimum execution time: 27_827_000 picoseconds. + Weight::from_parts(28_423_000, 3503) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) @@ -203,127 +195,152 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_568_000 picoseconds. - Weight::from_parts(4_764_000, 0) + // Minimum execution time: 4_665_000 picoseconds. + Weight::from_parts(4_827_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_953_000 picoseconds. - Weight::from_parts(4_079_000, 0) + // Minimum execution time: 3_898_000 picoseconds. + Weight::from_parts(3_979_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_793_000 picoseconds. - Weight::from_parts(2_914_000, 0) + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_622_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_719_000 picoseconds. - Weight::from_parts(2_829_000, 0) + // Minimum execution time: 2_472_000 picoseconds. + Weight::from_parts(2_541_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_710_000 picoseconds. - Weight::from_parts(2_824_000, 0) + // Minimum execution time: 2_366_000 picoseconds. + Weight::from_parts(2_420_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_941_000 picoseconds. - Weight::from_parts(3_201_000, 0) + // Minimum execution time: 2_621_000 picoseconds. + Weight::from_parts(2_724_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 28_080_000 picoseconds. - Weight::from_parts(28_920_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } - pub fn expect_pallet() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_752_000 picoseconds. - Weight::from_parts(4_982_000, 0) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 58_965_000 picoseconds. + Weight::from_parts(60_095_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + // Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) // Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) // Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) // Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `70` - // Estimated: `3535` - // Minimum execution time: 24_810_000 picoseconds. - Weight::from_parts(25_270_000, 3535) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `171` + // Estimated: `6196` + // Minimum execution time: 54_594_000 picoseconds. + Weight::from_parts(56_039_000, 6196) + .saturating_add(T::DbWeight::get().reads(9)) + .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_676_000 picoseconds. - Weight::from_parts(2_780_000, 0) + // Minimum execution time: 2_393_000 picoseconds. + Weight::from_parts(2_465_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_624_000 picoseconds. - Weight::from_parts(2_710_000, 0) + // Minimum execution time: 2_356_000 picoseconds. + Weight::from_parts(2_406_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_611_000 picoseconds. - Weight::from_parts(2_707_000, 0) + // Minimum execution time: 2_305_000 picoseconds. + Weight::from_parts(2_375_000, 0) + } + // Storage: `ParachainInfo::ParachainId` (r:1 w:0) + // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + // Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + // Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + // Storage: `BridgeKusamaMessages::OutboundLanesCongestedSignals` (r:1 w:0) + // Proof: `BridgeKusamaMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `BridgeKusamaMessages::OutboundMessages` (r:0 w:1) + // Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 1000]`. + pub fn export_message(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `133` + // Estimated: `1529` + // Minimum execution time: 31_422_000 picoseconds. + Weight::from_parts(33_165_507, 1529) + // Standard Error: 568 + .saturating_add(Weight::from_parts(433_830, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_653_000 picoseconds. - Weight::from_parts(2_740_000, 0) + // Minimum execution time: 2_695_000 picoseconds. + Weight::from_parts(2_770_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_821_000 picoseconds. - Weight::from_parts(2_874_000, 0) + // Minimum execution time: 2_833_000 picoseconds. + Weight::from_parts(2_970_000, 0) } } + +impl WeightInfo { pub fn expect_pallet() -> Weight { Weight::from_parts(5_756_000, 0) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 472eba4ce7..59a3890e02 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -15,6 +15,9 @@ // along with Cumulus. If not, see . use super::{ + bridge_to_kusama_config::{ + DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubKusamaHaulBlobExporter, + }, AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, @@ -48,10 +51,10 @@ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const DotRelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: Option = Some(NetworkId::Polkadot); + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); @@ -142,6 +145,17 @@ impl Contains for SafeCallFilter { } } + // Allow to change dedicated storage items (called by governance-like) + match call { + RuntimeCall::System(frame_system::Call::set_storage { items }) + if items.iter().all(|(k, _)| { + k.eq(&DeliveryRewardInBalance::key()) || + k.eq(&RequiredStakeForStakeAndSlash::key()) + }) => + return true, + _ => (), + }; + matches!( call, RuntimeCall::PolkadotXcm( @@ -165,7 +179,23 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::remove_invulnerable { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | RuntimeCall::XcmpQueue(..) | - RuntimeCall::DmpQueue(..) + RuntimeCall::DmpQueue(..) | + RuntimeCall::BridgeKusamaGrandpa(pallet_bridge_grandpa::Call::< + Runtime, + crate::bridge_to_kusama_config::BridgeGrandpaKusamaInstance, + >::initialize { .. }) | + RuntimeCall::BridgeKusamaGrandpa(pallet_bridge_grandpa::Call::< + Runtime, + crate::bridge_to_kusama_config::BridgeGrandpaKusamaInstance, + >::set_operating_mode { .. }) | + RuntimeCall::BridgeKusamaParachains(pallet_bridge_parachains::Call::< + Runtime, + crate::bridge_to_kusama_config::BridgeParachainKusamaInstance, + >::set_operating_mode { .. }) | + RuntimeCall::BridgeKusamaMessages(pallet_bridge_messages::Call::< + Runtime, + crate::bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >::set_operating_mode { .. }) ) } } @@ -253,7 +283,7 @@ impl xcm_executor::Config for XcmConfig { type AssetLocker = (); type AssetExchanger = (); type FeeManager = XcmFeesToAccount; - type MessageExporter = (); + type MessageExporter = ToBridgeHubKusamaHaulBlobExporter; type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 1529f77025..b5682ec790 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -14,21 +14,87 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -pub use bridge_hub_polkadot_runtime::{ - xcm_config::XcmConfig, AllPalletsWithoutSystem, Balances, ExistentialDeposit, ParachainSystem, - PolkadotXcm, Runtime, RuntimeEvent, SessionKeys, +use bp_polkadot_core::Signature; +use bridge_hub_polkadot_runtime::{ + bridge_to_kusama_config::{ + BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, + DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, + RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessageBridge, + WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + }, + xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, }; -use codec::Decode; +use codec::{Decode, Encode}; use frame_support::parameter_types; -use parachains_common::{AccountId, AuraId}; -use system_parachains_constants::polkadot::fee::WeightToFee; +use frame_system::pallet_prelude::HeaderFor; +use parachains_common::{polkadot::fee::WeightToFee, AccountId, AuraId, Balance}; +use sp_keyring::AccountKeyring::Alice; +use sp_runtime::{ + generic::{Era, SignedPayload}, + AccountId32, +}; +use xcm::latest::prelude::*; const ALICE: [u8; 32] = [1u8; 32]; +// Para id of sibling chain used in tests. +pub const SIBLING_PARACHAIN_ID: u32 = 1000; + parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } +fn construct_extrinsic( + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> UncheckedExtrinsic { + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from(0), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages, + (RefundBridgeHubKusamaMessages::default()), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + AccountId32::from(sender.public()).into(), + Signature::Sr25519(signature.clone()), + extra, + ) +} + +fn construct_and_apply_extrinsic( + relayer_at_target: sp_keyring::AccountKeyring, + batch: pallet_utility::Call, +) -> sp_runtime::DispatchOutcome { + let batch_call = RuntimeCall::Utility(batch); + let xt = construct_extrinsic(relayer_at_target, batch_call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() +} + +fn executive_init_block(header: &HeaderFor) { + Executive::initialize_block(header) +} + +fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) +} + bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( Runtime, AllPalletsWithoutSystem, @@ -56,3 +122,191 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( }), 1002 ); + +#[test] +fn initialize_bridge_by_governance_works() { + bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::< + Runtime, + BridgeGrandpaKusamaInstance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + Box::new(|call| RuntimeCall::BridgeKusamaGrandpa(call).encode()), + ) +} + +#[test] +fn change_delivery_reward_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + DeliveryRewardInBalance, + Balance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (DeliveryRewardInBalance::key().to_vec(), DeliveryRewardInBalance::get()), + |old_value| old_value.checked_mul(2).unwrap(), + ) +} + +#[test] +fn change_required_stake_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + RequiredStakeForStakeAndSlash, + Balance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (RequiredStakeForStakeAndSlash::key().to_vec(), RequiredStakeForStakeAndSlash::get()), + |old_value| old_value.checked_mul(2).unwrap(), + ) +} + +#[test] +fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { + bridge_hub_test_utils::test_cases::handle_export_message_from_system_parachain_to_outbound_queue_works::< + Runtime, + XcmConfig, + WithBridgeHubKusamaMessagesInstance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::BridgeKusamaMessages(event)) => Some(event), + _ => None, + } + }), + || ExportMessage { network: Kusama, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) }, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), + // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` + Some((DotRelayLocation::get(), bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get()).into()), + || (), + ) +} + +#[test] +fn message_dispatch_routing_works() { + bridge_hub_test_utils::test_cases::message_dispatch_routing_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + WithBridgeHubKusamaMessagesInstance, + RelayNetwork, + KusamaGlobalConsensusNetwork, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::ParachainSystem(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + || (), + ) +} + +#[test] +fn relayed_incoming_message_works() { + bridge_hub_test_utils::test_cases::relayed_incoming_message_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + BridgeGrandpaKusamaInstance, + BridgeParachainKusamaInstance, + WithBridgeHubKusamaMessagesInstance, + WithBridgeHubKusamaMessageBridge, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Polkadot, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + || (), + ) +} + +#[test] +pub fn complex_relay_extrinsic_works() { + bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + BridgeGrandpaKusamaInstance, + BridgeParachainKusamaInstance, + WithBridgeHubKusamaMessagesInstance, + WithBridgeHubKusamaMessageBridge, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + BridgeHubKusamaChainId::get(), + Polkadot, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + ExistentialDeposit::get(), + executive_init_block, + construct_and_apply_extrinsic, + || (), + ); +} + +#[test] +pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { + let estimated = bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< + Runtime, + XcmConfig, + WeightToFee, + >(); + + // check if estimated value is sane + let max_expected = bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get(); + assert!( + estimated <= max_expected, + "calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots` value", + estimated, + max_expected + ); +} + +// TODO: replace me with direct usages of `bridge_hub_test_utils` after deps are bumped to (at +// least) 1.4 +// +// Following two tests have to be implemented properly after upgrade to 1.6. +// See https://github.com/paritytech/polkadot-sdk/pull/2139/ and https://github.com/paritytech/parity-bridges-common/pull/2728 +// for impl details +// +// Until that, anyone can run it manually by doing following: +// +// 1) cargo vendor ../vendored-dependencies +// 2) apply relevant changes from above PRs +// 3) change workspace Cargo.toml: +// [patch.crates-io] +// bp-polkadot-core = { path = "../vendored-dependencies/bp-polkadot-core" } +// bridge-hub-test-utils = { path = "../vendored-dependencies/bridge-hub-test-utils" } +// bridge-runtime-common = { path = "../vendored-dependencies/bridge-runtime-common" } +// 4) add actual tests code and do `cargo test -p bridge-hub-polkadot-runtime` + +#[test] +pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} + +#[test] +pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} From fa59883ab95690baf225e917f6629d43b36d0368 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 9 Jan 2024 16:24:42 +0100 Subject: [PATCH 21/27] CI: Enable try-runtime idempotency check (#133) Enable one more check in the CI to ensure that our migrations are idempotent. Can only merge after https://github.com/polkadot-fellows/runtimes/pull/118 --------- Signed-off-by: Oliver Tale-Yazdi --- .github/workflows/check-migrations.yml | 42 ++++++++++++++++++++------ 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml index 75a0d14db1..412bbc7f25 100644 --- a/.github/workflows/check-migrations.yml +++ b/.github/workflows/check-migrations.yml @@ -47,7 +47,7 @@ jobs: - name: Download try-runtime-cli run: | - curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.2/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x ./try-runtime - name: Install Protoc @@ -60,21 +60,43 @@ jobs: - name: Build ${{ matrix.runtime.name }} run: | - cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime + cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime -q --locked - name: Check migrations run: | PACKAGE_NAME=${{ matrix.runtime.package }} RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm + RUNTIME_BLOB_PATH=./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME + # When running on relay, we don't need weight checks. - NO_WEIGHT_WARNINGS_FLAG="" + EXTRA_FLAGS="" if [[ "${{ matrix.runtime.is_relay }}" == "true" ]]; then - NO_WEIGHT_WARNINGS_FLAG="--no-weight-warnings" + EXTRA_FLAGS+="--no-weight-warnings" + echo "Disabling weight checks since we are on a relay" + else + echo "Enabling weight checks since we are not on a relay" + fi + + # Disable the spec version check when we dont want to release. + if ! .github/changelog-processor.py CHANGELOG.md --should-release ; then + EXTRA_FLAGS+=" --disable-spec-version-check" + echo "Disabling the spec version check since we are not releasing" + else + echo "Enabling the spec version check since we are releasing" fi - # Disable idempotency checks for now because the Scheduler pallet MigrateToV1 migration is - # non-idempotent at its root in Polkadot SDK V1.2.0. In V1.3.0 we can re-enable - # idempotency checks. - EXTRA_ARGS="--disable-spec-version-check --disable-idempotency-checks" + + # Disable idemepotency checks on Polkadot until we enact them. + if [[ "${{ matrix.runtime.name }}" == "polkadot" ]]; then + echo "Disabling the idempotency check since we are on Polkadot" + EXTRA_FLAGS+=" --disable-idempotency-checks" + else + echo "Enabling the idempotency check since we are not on Polkadot" + fi + + echo "Flags: $EXTRA_FLAGS" + ./try-runtime \ - --runtime ./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME \ - on-runtime-upgrade --checks=pre-and-post $EXTRA_ARGS $NO_WEIGHT_WARNINGS_FLAG live --uri ${{ matrix.runtime.uri }} + --runtime $RUNTIME_BLOB_PATH \ + on-runtime-upgrade --checks=pre-and-post \ + $EXTRA_FLAGS \ + live --uri ${{ matrix.runtime.uri }} From 45cb7b4346542be0c94af500422de61d14dd364a Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:22:00 +0100 Subject: [PATCH 22/27] Bump Runtime Specs for 1.1.0 (#138) TODO: - [x] Check transaction versions --- CHANGELOG.md | 2 +- relay/kusama/src/lib.rs | 4 ++-- relay/polkadot/src/lib.rs | 4 ++-- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 8 ++++---- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 4 ++-- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++-- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 4 ++-- .../collectives/collectives-polkadot/src/lib.rs | 4 ++-- system-parachains/gluttons/glutton-kusama/src/lib.rs | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 141c966da4..d093250bae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] +## [1.1.0] 10.01.2024 ### Changed diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 539fa8cafc..75cd3da8bc 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -149,10 +149,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 1_000_001, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 24, + transaction_version: 25, state_version: 1, }; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 4fd2d286fc..7835ff0f82 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -144,10 +144,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 1_000_001, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 24, + transaction_version: 25, state_version: 0, }; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 92ba0a9641..e2c0661a54 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -113,10 +113,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 13, + transaction_version: 14, state_version: 1, }; @@ -129,10 +129,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 13, + transaction_version: 14, state_version: 0, }; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 87ec19b53b..260ab78176 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -141,10 +141,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 13, + transaction_version: 14, state_version: 0, }; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 8aa92ce9ed..6b9d501ac9 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -144,10 +144,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-kusama"), impl_name: create_runtime_str!("bridge-hub-kusama"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 3, + transaction_version: 4, state_version: 1, }; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 126a5dd407..8a17bf41c6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -144,10 +144,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-polkadot"), impl_name: create_runtime_str!("bridge-hub-polkadot"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 2, + transaction_version: 3, state_version: 1, }; diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 9e29e0a077..f95c53f8ce 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -113,10 +113,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 5, + transaction_version: 6, state_version: 0, }; diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 050bf21f88..cd09c252fb 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -88,7 +88,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("glutton"), impl_name: create_runtime_str!("glutton"), authoring_version: 1, - spec_version: 1_000_000, + spec_version: 1_001_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 562fd7691160102a894a639dd6b13c1261ea4d66 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 10 Jan 2024 14:26:13 +0100 Subject: [PATCH 23/27] added up-to-date-action (#139) Added action to keep pull requests up to date. Every time master receives a push, it will look for all the PRs and sync them with the master branch. This only works when the PR has `auto-merge` enabled (it can be enabled for all PRs too if required). Merging this PR will count as solving paritytech/auto-merge-bot#21 and paritytech/up-to-date-action#1 We use a github app to solve the issue that tests would not run if the credentials comes from a github action. I'm resuing the credentials for the [`fellowship-merge-bot`](https://github.com/apps/fellowship-merge-bot) used in [`auto-merge`](https://github.com/polkadot-fellows/runtimes/blob/main/.github/workflows/auto-merge.yml). It needs to have the following permissions: - Repository permissions: - Pull Requests - [x] Write - Contents - [x] Write --- .github/workflows/up-to-date.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/up-to-date.yml diff --git a/.github/workflows/up-to-date.yml b/.github/workflows/up-to-date.yml new file mode 100644 index 0000000000..96004f4e9f --- /dev/null +++ b/.github/workflows/up-to-date.yml @@ -0,0 +1,22 @@ +name: Keep PR up to date + +on: + push: + branches: + - master + +jobs: + updatePullRequests: + runs-on: ubuntu-latest + environment: master + steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.MERGE_APP_ID }} + private_key: ${{ secrets.MERGE_APP_KEY }} + - name: Update all the PRs + uses: paritytech/up-to-date-action@v0.1.0 + with: + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} From b8f26c161fa97c301ba7b8037403b0302c43a790 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 10 Jan 2024 15:18:40 +0100 Subject: [PATCH 24/27] up-to-date: fixed wrong branch name (#141) I put master when it was main. --- .github/workflows/up-to-date.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/up-to-date.yml b/.github/workflows/up-to-date.yml index 96004f4e9f..a5a431fa39 100644 --- a/.github/workflows/up-to-date.yml +++ b/.github/workflows/up-to-date.yml @@ -3,7 +3,7 @@ name: Keep PR up to date on: push: branches: - - master + - main jobs: updatePullRequests: From a205a9a53e9d8ec84d8dd162784c21667258dfa4 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 10 Jan 2024 16:02:55 +0100 Subject: [PATCH 25/27] Remove unused weight files (#57) Deleting the weight files of all pallets that were undeployed by the OpenGov migration. Kusama still had one duplicate file for the balances. Also contains #58 --------- Signed-off-by: Oliver Tale-Yazdi Co-authored-by: Branislav Kontur Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com> --- relay/kusama/src/lib.rs | 19 ++++++++++++++----- relay/kusama/src/weights/mod.rs | 4 ++-- ..._balances.rs => pallet_balances_native.rs} | 0 ...art_balances.rs => pallet_balances_nis.rs} | 0 4 files changed, 16 insertions(+), 7 deletions(-) rename relay/kusama/src/weights/{pallet_balances_balances.rs => pallet_balances_native.rs} (100%) rename relay/kusama/src/weights/{pallet_balances_nis_counterpart_balances.rs => pallet_balances_nis.rs} (100%) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 75cd3da8bc..ac28a26466 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -327,7 +327,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances_balances::WeightInfo; + type WeightInfo = weights::pallet_balances_native::WeightInfo; type FreezeIdentifier = RuntimeFreezeReason; type MaxFreezes = ConstU32<8>; type RuntimeHoldReason = RuntimeHoldReason; @@ -1406,7 +1406,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<4>; type MaxReserves = ConstU32<4>; type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; + type WeightInfo = weights::pallet_balances_nis::WeightInfo; type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); @@ -1591,7 +1591,6 @@ construct_runtime! { // NIS pallet. Nis: pallet_nis::{Pallet, Call, Storage, Event, HoldReason} = 38, -// pub type NisCounterpartInstance = pallet_balances::Instance2; NisCounterpartBalances: pallet_balances:: = 45, // Provides a semi-sorted list of nominators for staking. @@ -1721,8 +1720,8 @@ mod benches { [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] // Substrate - [pallet_balances, Balances] - [pallet_balances, NisCounterpartBalances] + [pallet_balances, Native] + [pallet_balances, Nis] [pallet_bags_list, VoterList] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] @@ -2281,6 +2280,13 @@ sp_api::impl_runtime_apis! { use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; use frame_benchmarking::baseline::Pallet as Baseline; + // Benchmark files generated for `Balances/NisCounterpartBalances` instances are by default + // `pallet_balances_balances.rs / pallet_balances_nis_counterpart_balances`, which is not really nice, + // so with this redefinition we can change names to nicer: + // `pallet_balances_native.rs / pallet_balances_nis.rs`. + type Native = pallet_balances::Pallet::; + type Nis = pallet_balances::Pallet::; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -2421,6 +2427,9 @@ sp_api::impl_runtime_apis! { } } + type Native = pallet_balances::Pallet::; + type Nis = pallet_balances::Pallet::; + 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()); diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index 5e3b1d22b2..a9a9f4bce7 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -19,8 +19,8 @@ pub mod frame_election_provider_support; pub mod frame_system; pub mod pallet_asset_rate; pub mod pallet_bags_list; -pub mod pallet_balances_balances; -pub mod pallet_balances_nis_counterpart_balances; +pub mod pallet_balances_native; +pub mod pallet_balances_nis; pub mod pallet_bounties; pub mod pallet_child_bounties; pub mod pallet_conviction_voting; diff --git a/relay/kusama/src/weights/pallet_balances_balances.rs b/relay/kusama/src/weights/pallet_balances_native.rs similarity index 100% rename from relay/kusama/src/weights/pallet_balances_balances.rs rename to relay/kusama/src/weights/pallet_balances_native.rs diff --git a/relay/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs b/relay/kusama/src/weights/pallet_balances_nis.rs similarity index 100% rename from relay/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs rename to relay/kusama/src/weights/pallet_balances_nis.rs From 6334588c9db0115f6b3445ce11d02a457275b34b Mon Sep 17 00:00:00 2001 From: brenzi Date: Wed, 10 Jan 2024 21:58:07 +0100 Subject: [PATCH 26/27] add encointer runtime (#80) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In fulfillment of [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/0022-adopt-encointer-runtime.md), this PR adds the encointer runtime. replacing #17 notes * this runtime shall enable async backing at the conservative 12s block time ("Phase 1" in Santi's tutorial). in a subsequent step we shall set target block rate of 6s * We used the same upstream dependency versions like the other system chains on master * The PR includes the runtime's commit history for reference * strictly using published crates.io dependencies --------- Co-authored-by: Bastian Köcher Co-authored-by: Cecile Tonglet Co-authored-by: Sergei Shulepov Co-authored-by: Shawn Tabrizi Co-authored-by: Joshy Orndorff Co-authored-by: Shaun Wang Co-authored-by: Andrew Jones Co-authored-by: Vincent Geddes Co-authored-by: Sebastian Thiel Co-authored-by: Keith Yeung Co-authored-by: Gavin Wood Co-authored-by: Robert Habermeier Co-authored-by: Amar Singh Co-authored-by: Bastian Köcher Co-authored-by: Guillaume Thiolliere Co-authored-by: Alexander Popiak Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: clangenb <37865735+clangenb@users.noreply.github.com> Co-authored-by: Christian Langenbacher Co-authored-by: anizeani <36300021+anizeani@users.noreply.github.com> Co-authored-by: mosonyi Co-authored-by: NicJak <56108218+NicJak@users.noreply.github.com> Co-authored-by: pifragile Co-authored-by: Joakim Nyman Co-authored-by: Kutsal Kaan Bilgin Co-authored-by: Paulo Martins Co-authored-by: tugy <33746108+tugytur@users.noreply.github.com> Co-authored-by: Milos Kriz <82968568+miloskriz@users.noreply.github.com> Co-authored-by: Szilárd Parrag Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .github/workflows/runtimes-matrix.json | 7 + CHANGELOG.md | 5 + Cargo.lock | 469 +++++++- Cargo.toml | 1 + system-parachains/encointer/Cargo.toml | 223 ++++ system-parachains/encointer/build.rs | 27 + .../encointer/src/deal_with_fees.rs | 45 + system-parachains/encointer/src/lib.rs | 1005 +++++++++++++++++ .../encointer/src/migrations_fix.rs | 190 ++++ .../encointer/src/weights/block_weights.rs | 53 + .../src/weights/cumulus_pallet_xcmp_queue.rs | 59 + .../src/weights/extrinsic_weights.rs | 53 + .../encointer/src/weights/frame_system.rs | 150 +++ .../encointer/src/weights/mod.rs | 45 + .../encointer/src/weights/pallet_balances.rs | 135 +++ .../src/weights/pallet_collective.rs | 287 +++++ .../src/weights/pallet_encointer_balances.rs | 72 ++ .../src/weights/pallet_encointer_bazaar.rs | 111 ++ .../weights/pallet_encointer_ceremonies.rs | 401 +++++++ .../weights/pallet_encointer_communities.rs | 187 +++ .../src/weights/pallet_encointer_faucet.rs | 122 ++ ...pallet_encointer_reputation_commitments.rs | 65 ++ .../src/weights/pallet_encointer_scheduler.rs | 91 ++ .../src/weights/pallet_membership.rs | 185 +++ .../encointer/src/weights/pallet_proxy.rs | 208 ++++ .../encointer/src/weights/pallet_timestamp.rs | 61 + .../encointer/src/weights/pallet_treasury.rs | 211 ++++ .../encointer/src/weights/pallet_utility.rs | 84 ++ .../encointer/src/weights/paritydb_weights.rs | 63 ++ .../encointer/src/weights/rocksdb_weights.rs | 63 ++ system-parachains/encointer/src/xcm_config.rs | 237 ++++ 31 files changed, 4907 insertions(+), 8 deletions(-) create mode 100644 system-parachains/encointer/Cargo.toml create mode 100644 system-parachains/encointer/build.rs create mode 100644 system-parachains/encointer/src/deal_with_fees.rs create mode 100644 system-parachains/encointer/src/lib.rs create mode 100644 system-parachains/encointer/src/migrations_fix.rs create mode 100644 system-parachains/encointer/src/weights/block_weights.rs create mode 100644 system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs create mode 100644 system-parachains/encointer/src/weights/extrinsic_weights.rs create mode 100644 system-parachains/encointer/src/weights/frame_system.rs create mode 100644 system-parachains/encointer/src/weights/mod.rs create mode 100644 system-parachains/encointer/src/weights/pallet_balances.rs create mode 100644 system-parachains/encointer/src/weights/pallet_collective.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_balances.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_bazaar.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_ceremonies.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_communities.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_faucet.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_reputation_commitments.rs create mode 100644 system-parachains/encointer/src/weights/pallet_encointer_scheduler.rs create mode 100644 system-parachains/encointer/src/weights/pallet_membership.rs create mode 100644 system-parachains/encointer/src/weights/pallet_proxy.rs create mode 100644 system-parachains/encointer/src/weights/pallet_timestamp.rs create mode 100644 system-parachains/encointer/src/weights/pallet_treasury.rs create mode 100644 system-parachains/encointer/src/weights/pallet_utility.rs create mode 100644 system-parachains/encointer/src/weights/paritydb_weights.rs create mode 100644 system-parachains/encointer/src/weights/rocksdb_weights.rs create mode 100644 system-parachains/encointer/src/xcm_config.rs diff --git a/.github/workflows/runtimes-matrix.json b/.github/workflows/runtimes-matrix.json index ffe99af042..bda9899ec7 100644 --- a/.github/workflows/runtimes-matrix.json +++ b/.github/workflows/runtimes-matrix.json @@ -53,5 +53,12 @@ "path": "system-parachains/collectives/collectives-polkadot", "uri": "wss://polkadot-collectives-rpc.polkadot.io:443", "is_relay": false + }, + { + "name": "encointer-kusama", + "package": "encointer-kusama-runtime", + "path": "system-parachains/encointer", + "uri": "wss://kusama.api.encointer.org:443", + "is_relay": false } ] diff --git a/CHANGELOG.md b/CHANGELOG.md index d093250bae..d28e030feb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +### Added +- Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80)) + ## [1.1.0] 10.01.2024 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 9069eaf411..f51de76060 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,7 +348,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.0", "zeroize", ] @@ -2307,15 +2307,30 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +dependencies = [ + "crc-catalog 1.1.1", +] + [[package]] name = "crc" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ - "crc-catalog", + "crc-catalog 2.2.0", ] +[[package]] +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + [[package]] name = "crc-catalog" version = "2.2.0" @@ -2653,6 +2668,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "cumulus-primitives-timestamp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771ef4a34f7bcd4e8782f73d8dbd0df031b1c1c82e54b06af69f88df2cddc316" +dependencies = [ + "cumulus-primitives-core", + "futures", + "parity-scale-codec", + "sp-inherents", + "sp-std", + "sp-timestamp", +] + [[package]] name = "cumulus-primitives-utility" version = "0.4.0" @@ -2746,7 +2775,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version", + "rustc_version 0.4.0", "subtle 2.4.1", "zeroize", ] @@ -2984,7 +3013,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -3260,6 +3289,154 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encointer-balances-tx-payment" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574a256785661fe0353b6664a896b03eaac804e01de3b7146a1e68bea23823c6" +dependencies = [ + "encointer-primitives", + "frame-support", + "frame-system", + "log", + "pallet-asset-tx-payment", + "pallet-encointer-balances", + "pallet-encointer-ceremonies", + "pallet-transaction-payment", + "sp-runtime", +] + +[[package]] +name = "encointer-balances-tx-payment-rpc-runtime-api" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc19094858c453d1622fee74cd5ac4aeafc5afcc1695c442361528604f3a3cd" +dependencies = [ + "encointer-primitives", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-std", +] + +[[package]] +name = "encointer-ceremonies-assignment" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0e915dfb90455b04de86863d5e8c28727b88a5e79035d1592f5340befc2d31a" +dependencies = [ + "encointer-primitives", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "encointer-kusama-runtime" +version = "1.0.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-timestamp", + "cumulus-primitives-utility", + "encointer-balances-tx-payment", + "encointer-balances-tx-payment-rpc-runtime-api", + "encointer-primitives", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-tx-payment", + "pallet-aura", + "pallet-balances", + "pallet-collective", + "pallet-encointer-balances", + "pallet-encointer-bazaar", + "pallet-encointer-bazaar-rpc-runtime-api", + "pallet-encointer-ceremonies", + "pallet-encointer-ceremonies-rpc-runtime-api", + "pallet-encointer-communities", + "pallet-encointer-communities-rpc-runtime-api", + "pallet-encointer-faucet", + "pallet-encointer-reputation-commitments", + "pallet-encointer-scheduler", + "pallet-insecure-randomness-collective-flip", + "pallet-membership", + "pallet-proxy", + "pallet-scheduler", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "encointer-meetup-validation" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bef78af8c5897da00bb93d7d77573ad7d4e6169f3daac2a36ba450760611c94" +dependencies = [ + "encointer-primitives", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "encointer-primitives" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306cf10a0e74f42080c064fdc1d827b5c3fd6e0c40ee5f4e36bb2f5ee76c51dc" +dependencies = [ + "bs58 0.4.0", + "crc 2.1.0", + "ep-core", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-geohash", +] + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -3322,6 +3499,24 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "ep-core" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfa4c3869cba69547a6cf0b80faf892822cee70027f86439ea7d145286fc6ba" +dependencies = [ + "array-bytes 6.1.0", + "impl-serde", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", + "substrate-fixed", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -6915,6 +7110,189 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-encointer-balances" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a2ea2b74c36582daf64b632064b3525da8aa2cdced57581272264ebd811a7a" +dependencies = [ + "approx", + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-asset-tx-payment", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-encointer-bazaar" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0858d85b205d1026ccfc7e617d0028357efcfdaa9918e6ad4896f93eda3bc960" +dependencies = [ + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-communities", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-std", +] + +[[package]] +name = "pallet-encointer-bazaar-rpc-runtime-api" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6471fa29e940363ff8090bb620ad82564286f955bfaa33a15147190438542aa6" +dependencies = [ + "encointer-primitives", + "frame-support", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-encointer-ceremonies" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a35401aa2ffbae97ba5f981542c20ca4c8609c115078a2a84835336921d5208" +dependencies = [ + "encointer-ceremonies-assignment", + "encointer-meetup-validation", + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-balances", + "pallet-encointer-communities", + "pallet-encointer-scheduler", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-encointer-ceremonies-rpc-runtime-api" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af85c19a7b83a255348a95ee0b691810088320c36319eb4446eb527f0e854a04" +dependencies = [ + "encointer-primitives", + "frame-support", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-encointer-communities" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b78031c09e3adc31ba279bb18186e379222a7b54a14d59288040dc205621e49" +dependencies = [ + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-balances", + "pallet-encointer-scheduler", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-encointer-communities-rpc-runtime-api" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1808d7908167315f12204db923a35f4af851e7c53b73351ed7d1b9e53a8c948d" +dependencies = [ + "encointer-primitives", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-encointer-faucet" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fdd1b8885dfb83e249af6a8914a38e3d5ea5f01d196ae35ec1420e502a54ef" +dependencies = [ + "approx", + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-communities", + "pallet-encointer-reputation-commitments", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-encointer-reputation-commitments" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27da548ae6f6070797c3270160cc0c76d4ddc20575d63e5a615d6f28d99c7cb5" +dependencies = [ + "approx", + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-encointer-ceremonies", + "pallet-encointer-communities", + "pallet-encointer-scheduler", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-encointer-scheduler" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffe4e1efc5084466c4c0ae1d835651a29ab3ee8fc68933ae14df00d0875441b" +dependencies = [ + "encointer-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-fast-unstake" version = "24.0.0" @@ -7034,6 +7412,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df4d7fab2948940925d4c0076ec542b2c67b37a5332449f102241993d31a8b41" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "25.0.0" @@ -9418,6 +9811,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -9578,6 +9980,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version 0.2.3", +] + [[package]] name = "safe_arch" version = "0.7.1" @@ -10594,6 +11005,15 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.18" @@ -10840,7 +11260,7 @@ dependencies = [ "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring", - "rustc_version", + "rustc_version 0.4.0", "sha2 0.10.7", "subtle 2.4.1", ] @@ -11993,7 +12413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" dependencies = [ "base64 0.13.1", - "crc", + "crc 3.0.1", "lazy_static", "md-5", "rand 0.8.5", @@ -12018,6 +12438,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-fixed" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e83ba2b4f68f12ec6b0f55bac0a23a5bcaaf2676f1109c7a5ead6121c7f0622" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "substrate-typenum", +] + +[[package]] +name = "substrate-geohash" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa2aad67d4ac1b37d97338ab6fd18fd5ec79c35a24112028e6feda0d67142e9a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "substrate-fixed", +] + [[package]] name = "substrate-prometheus-endpoint" version = "0.16.0" @@ -12045,6 +12488,16 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "substrate-typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f0091e93c2c75b233ae39424c52cb8a662c0811fb68add149e20e5d7e8a788" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + [[package]] name = "substrate-wasm-builder" version = "14.0.0" @@ -13465,7 +13918,7 @@ checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" dependencies = [ "arc-swap", "async-trait", - "crc", + "crc 3.0.1", "log", "rand 0.8.5", "serde", @@ -13516,7 +13969,7 @@ dependencies = [ "arc-swap", "async-trait", "bytes", - "crc", + "crc 3.0.1", "log", "rand 0.8.5", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 60818e781e..ffa140147d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ members = [ "system-parachains/bridge-hubs/bridge-hub-polkadot/primitives", "system-parachains/collectives/collectives-polkadot", "system-parachains/constants", + "system-parachains/encointer", "system-parachains/gluttons/glutton-kusama", "integration-tests/emulated/assets/asset-hub-kusama", "integration-tests/emulated/assets/asset-hub-polkadot", diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml new file mode 100644 index 0000000000..5c1c40b5b2 --- /dev/null +++ b/system-parachains/encointer/Cargo.toml @@ -0,0 +1,223 @@ +[package] +authors = ["Encointer "] +description = "Runtime for Encointer Network (kusama system chain)" +edition.workspace = true +homepage = "https://encointer.org" +license.workspace = true +name = 'encointer-kusama-runtime' +repository.workspace = true +version.workspace = true + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } +hex-literal = { version = "0.4.1", optional = true } +log = { version = "0.4.20", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = [ + "derive", +] } + +# encointer deps +encointer-balances-tx-payment = { default-features = false, version = "3.0.2" } +encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "3.0.2" } +encointer-primitives = { default-features = false, version = "3.0.2" } +pallet-encointer-balances = { default-features = false, version = "3.0.2" } +pallet-encointer-bazaar = { default-features = false, version = "3.0.2" } +pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "3.0.2" } +pallet-encointer-ceremonies = { default-features = false, version = "3.0.2" } +pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "3.0.2" } +pallet-encointer-communities = { default-features = false, version = "3.0.2" } +pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "3.0.2" } +pallet-encointer-faucet = { default-features = false, version = "3.0.2" } +pallet-encointer-reputation-commitments = { default-features = false, version = "3.0.2" } +pallet-encointer-scheduler = { default-features = false, version = "3.0.2" } + +# Substrate +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-asset-tx-payment = { default-features = false, version = "25.0.0" } +pallet-aura = { default-features = false, version = "24.0.0" } +pallet-balances = { default-features = false, version = "25.0.0" } +pallet-collective = { default-features = false, version = "25.0.0" } +pallet-insecure-randomness-collective-flip = { default-features = false, version = "13.0.0" } +pallet-membership = { default-features = false, version = "25.0.0" } +pallet-proxy = { default-features = false, version = "25.0.0" } +pallet-scheduler = { default-features = false, version = "26.0.0" } +pallet-timestamp = { default-features = false, version = "24.0.0" } +pallet-transaction-payment = { default-features = false, version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-treasury = { default-features = false, version = "24.0.0" } +pallet-utility = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-consensus-aura = { default-features = false, version = "0.29.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } + +# Polkadot dependencies +pallet-xcm = { default-features = false, version = "4.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } +polkadot-runtime-common = { default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } + +# Cumulus dependencies +cumulus-pallet-aura-ext = { default-features = false, version = "0.4.0" } +cumulus-pallet-dmp-queue = { default-features = false, version = "0.4.0" } +cumulus-pallet-parachain-system = { default-features = false, features = [ + "parameterized-consensus-hook", +], version = "0.4.0" } +cumulus-pallet-xcm = { default-features = false, version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false, version = "0.4.0" } +cumulus-primitives-core = { default-features = false, version = "0.4.0" } +cumulus-primitives-timestamp = { default-features = false, version = "0.4.0" } +cumulus-primitives-utility = { default-features = false, version = "0.4.0" } +parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.4.0" } +parachains-common = { default-features = false, version = "4.0.0" } + +# Used for runtime benchmarking + + +[build-dependencies] +substrate-wasm-builder = { optional = true, version = "14.0.0" } + +[features] +default = ["std"] +runtime-benchmarks = [ + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-encointer-balances/runtime-benchmarks", + "pallet-encointer-bazaar/runtime-benchmarks", + "pallet-encointer-ceremonies/runtime-benchmarks", + "pallet-encointer-communities/runtime-benchmarks", + "pallet-encointer-faucet/runtime-benchmarks", + "pallet-encointer-reputation-commitments/runtime-benchmarks", + "pallet-encointer-scheduler/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", +] +std = [ + "codec/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "encointer-balances-tx-payment-rpc-runtime-api/std", + "encointer-balances-tx-payment/std", + "encointer-primitives/serde_derive", + "encointer-primitives/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime/std", + "log/std", + "pallet-asset-tx-payment/std", + "pallet-aura/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-encointer-balances/std", + "pallet-encointer-bazaar-rpc-runtime-api/std", + "pallet-encointer-bazaar/std", + "pallet-encointer-ceremonies-rpc-runtime-api/std", + "pallet-encointer-ceremonies/std", + "pallet-encointer-communities-rpc-runtime-api/std", + "pallet-encointer-communities/std", + "pallet-encointer-faucet/std", + "pallet-encointer-reputation-commitments/std", + "pallet-encointer-scheduler/std", + "pallet-insecure-randomness-collective-flip/std", + "pallet-membership/std", + "pallet-proxy/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "substrate-wasm-builder", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", +] + + +try-runtime = [ + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-asset-tx-payment/try-runtime", + "pallet-aura/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-encointer-balances/try-runtime", + "pallet-encointer-bazaar/try-runtime", + "pallet-encointer-ceremonies/try-runtime", + "pallet-encointer-communities/try-runtime", + "pallet-encointer-faucet/try-runtime", + "pallet-encointer-reputation-commitments/try-runtime", + "pallet-encointer-scheduler/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", + "pallet-membership/try-runtime", + "pallet-proxy/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-treasury/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", +] + +experimental = ["pallet-aura/experimental"] diff --git a/system-parachains/encointer/build.rs b/system-parachains/encointer/build.rs new file mode 100644 index 0000000000..256e9fb765 --- /dev/null +++ b/system-parachains/encointer/build.rs @@ -0,0 +1,27 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Substrate 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. + +// Substrate 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 Cumulus. If not, see . + +#[cfg(feature = "std")] +fn main() { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build() +} + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/system-parachains/encointer/src/deal_with_fees.rs b/system-parachains/encointer/src/deal_with_fees.rs new file mode 100644 index 0000000000..3abe942713 --- /dev/null +++ b/system-parachains/encointer/src/deal_with_fees.rs @@ -0,0 +1,45 @@ +// Copyright (c) 2023 Encointer Association +// This file is part of Encointer +// +// Encointer 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. +// +// Encointer 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 Encointer. If not, see . + +use frame_support::traits::{Currency, Imbalance, OnUnbalanced}; +use sp_runtime::sp_std::marker::PhantomData; + +/// Type alias to conveniently refer to the `Currency::NegativeImbalance` associated type. +pub type NegativeImbalance = as Currency< + ::AccountId, +>>::NegativeImbalance; + +/// Moves all the fees to the treasury. +/// +/// This does only handle the native currency. The community currencies are managed by the +/// `pallet-asset-tx-payment`. +pub struct FeesToTreasury(PhantomData); + +impl OnUnbalanced> for FeesToTreasury +where + Runtime: pallet_balances::Config + pallet_treasury::Config, +{ + fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { + if let Some(mut fees) = fees_then_tips.next() { + // no burning, add all fees and tips to the treasury + + if let Some(tips) = fees_then_tips.next() { + tips.merge_into(&mut fees); + } + as OnUnbalanced<_>>::on_unbalanced(fees); + } + } +} diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs new file mode 100644 index 0000000000..e3ee4e891d --- /dev/null +++ b/system-parachains/encointer/src/lib.rs @@ -0,0 +1,1005 @@ +// Copyright (c) 2023 Encointer Association +// This file is part of Encointer +// +// Encointer 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. +// +// Encointer 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 Encointer. If not, see . + +//! # Encointer Parachain Runtime +//! +//! Encointer runtime containing all the specific logic to: +//! * perform ceremonies and receive a community income +//! * pay fees in the respective community currency +//! +//! The configuration (especially XCM) is almost identical to `asset-hub`. Therefore, upstream +//! updates should always check the diff to see if there are some configuration updates. + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +mod deal_with_fees; +mod migrations_fix; +mod weights; +pub mod xcm_config; +use codec::{Decode, Encode, MaxEncodedLen}; +use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; +use deal_with_fees::FeesToTreasury; +use encointer_balances_tx_payment::{AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance}; +pub use encointer_primitives::{ + balances::{BalanceEntry, BalanceType, Demurrage}, + bazaar::{BusinessData, BusinessIdentifier, OfferingData}, + ceremonies::{AggregatedAccountData, CeremonyIndexType, CeremonyInfo, CommunityReputation}, + common::PalletString, + communities::{CommunityIdentifier, Location}, + scheduler::CeremonyPhaseType, +}; +use frame_support::{ + construct_runtime, + dispatch::DispatchClass, + parameter_types, + traits::{ + tokens::{pay::PayFromAccount, ConversionFromAssetBalance, ConversionToAssetBalance}, + ConstBool, Contains, EitherOfDiverse, EqualPrivilegeOnly, InstanceFilter, + }, + weights::{ConstantMultiplier, Weight}, + PalletId, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + EnsureRoot, +}; +pub use pallet_encointer_balances::Call as EncointerBalancesCall; +pub use pallet_encointer_bazaar::Call as EncointerBazaarCall; +pub use pallet_encointer_ceremonies::Call as EncointerCeremoniesCall; +pub use pallet_encointer_communities::Call as EncointerCommunitiesCall; +pub use pallet_encointer_faucet::Call as EncointerFaucetCall; +pub use pallet_encointer_reputation_commitments::Call as EncointerReputationCommitmentsCall; +pub use pallet_encointer_scheduler::Call as EncointerSchedulerCall; +use pallet_xcm::{EnsureXcm, IsMajorityOfBody}; +pub use parachains_common as common; +use parachains_common::{ + kusama::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::*, fee::WeightToFee}, + AuraId, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, +}; +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; +use sp_api::impl_runtime_apis; +use sp_core::{crypto::KeyTypeId, ConstU32, OpaqueMetadata}; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentityLookup, Verify}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, Perbill, Permill, RuntimeDebug, +}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; +use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; +use xcm::{ + latest::{BodyId, InteriorMultiLocation, Junction::PalletInstance}, + v3::AssetId as XcmAssetId, +}; + +use xcm_config::{KsmLocation, XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_executor::XcmExecutor; + +/// A type to hold UTC unix epoch [ms] +pub type Moment = u64; +pub const ONE_DAY: Moment = 86_400_000; + +/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included +/// into the relay chain. +const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; +/// How many parachain blocks are processed by the relay chain per parent. Limits the +/// number of blocks authored per slot. +const BLOCK_PROCESSING_VELOCITY: u32 = 1; +/// This determines the average expected block time that we are targeting. +/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. +/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked +/// up by `pallet_aura` to implement `fn slot_duration()`. +/// +/// Change this to adjust the block time. +pub const MILLISECS_PER_BLOCK: u64 = 12000; +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +pub type AssetId = AssetIdOf; +pub type AssetBalance = AssetBalanceOf; + +impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + } +} + +/// This runtime version. +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("encointer-parachain"), + impl_name: create_runtime_str!("encointer-parachain"), + authoring_version: 1, + spec_version: 1_001_000, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, + transaction_version: 3, + state_version: 0, +}; + +/// The version information used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } +} + +parameter_types! { + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 40); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const MaxProxies: u16 = 32; + // One storage item; key size 32, value size 16 + pub const AnnouncementDepositBase: Balance = deposit(1, 48); + 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, + scale_info::TypeInfo, + MaxEncodedLen, +)] +pub enum ProxyType { + Any, + NonTransfer, + BazaarEdit, +} + +impl Default for ProxyType { + 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::Balances { .. } | RuntimeCall::EncointerBalances { .. }), + ProxyType::BazaarEdit => matches!( + c, + RuntimeCall::EncointerBazaar(EncointerBazaarCall::create_offering { .. }) | + RuntimeCall::EncointerBazaar(EncointerBazaarCall::update_offering { .. }) | + RuntimeCall::EncointerBazaar(EncointerBazaarCall::delete_offering { .. }) + ), + } + } + + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, ProxyType::BazaarEdit) => 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; +} + +parameter_types! { + pub const Version: RuntimeVersion = VERSION; + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); + pub const SS58Prefix: u8 = 2; +} + +pub struct BaseFilter; +impl Contains for BaseFilter { + fn contains(_c: &RuntimeCall) -> bool { + true + } +} + +// Configure FRAME pallets to include in runtime. +impl frame_system::Config for Runtime { + type BaseCallFilter = BaseFilter; + // The block type. + type Block = generic::Block; + type BlockWeights = RuntimeBlockWeights; + type BlockLength = RuntimeBlockLength; + type AccountId = AccountId; + type RuntimeCall = RuntimeCall; + type Lookup = AccountIdLookup; + type Nonce = Nonce; + type Hash = Hash; + type Hashing = BlakeTwo256; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type BlockHashCount = BlockHashCount; + type DbWeight = RocksDbWeight; + type Version = Version; + type PalletInfo = PalletInfo; + type OnNewAccount = (); + type OnKilledAccount = (); + type AccountData = pallet_balances::AccountData; + type SystemWeightInfo = weights::frame_system::WeightInfo; + type SS58Prefix = SS58Prefix; + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = Moment; + type OnTimestampSet = EncointerScheduler; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = weights::pallet_timestamp::WeightInfo; +} + +parameter_types! { + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = weights::pallet_balances::WeightInfo; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = (); + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + /// Relay Chain `TransactionByteFee` / 10, same as statemine + pub const TransactionByteFee: Balance = MILLICENTS; + pub const OperationalFeeMultiplier: u8 = 5; +} + +impl pallet_transaction_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + // `FeesToTreasury is an encointer adaptation. + type OnChargeTransaction = + pallet_transaction_payment::CurrencyAdapter>; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type OperationalFeeMultiplier = OperationalFeeMultiplier; +} + +pub const ENCOINTER_TREASURY_PALLET_ID: u8 = 43; + +parameter_types! { + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 100 * MILLICENTS; + pub const ProposalBondMaximum: Balance = 500 * CENTS; + pub const SpendPeriod: BlockNumber = 6 * 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 18). + pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(ENCOINTER_TREASURY_PALLET_ID).into(); + pub const MaxApprovals: u32 = 10; + pub TreasuryAccount: AccountId = Treasury::account_id(); +} + +pub struct NoConversion; +impl ConversionFromAssetBalance for NoConversion { + type Error = (); + fn from_asset_balance(balance: Balance, _asset_id: ()) -> Result { + return Ok(balance) + } + #[cfg(feature = "runtime-benchmarks")] + fn ensure_successful(_: ()) {} +} + +impl pallet_treasury::Config for Runtime { + type PalletId = TreasuryPalletId; + type Currency = pallet_balances::Pallet; + type ApproveOrigin = MoreThanHalfCouncil; + type RejectOrigin = MoreThanHalfCouncil; + type RuntimeEvent = RuntimeEvent; + type OnSlash = (); //No proposal + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type ProposalBondMaximum = ProposalBondMaximum; + type SpendPeriod = SpendPeriod; //Cannot be 0: Error: Thread 'tokio-runtime-worker' panicked at 'attempt to calculate the + // remainder with a divisor of zero + type Burn = (); //No burn + type BurnDestination = (); //No burn + type SpendFunds = (); //No spend, no bounty + type MaxApprovals = MaxApprovals; + type WeightInfo = weights::pallet_treasury::WeightInfo; + type SpendOrigin = frame_support::traits::NeverEnsureOrigin; //No spend, no bounty + type AssetKind = (); + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount; + type BalanceConverter = NoConversion; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; +} + +parameter_types! { + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * + RuntimeBlockWeights::get().max_block; + pub const MaxScheduledPerBlock: u32 = 50; +} + +impl pallet_scheduler::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type PalletsOrigin = OriginCaller; + type RuntimeCall = RuntimeCall; + type MaximumWeight = MaximumSchedulerWeight; + type ScheduleOrigin = MoreThanHalfCouncil; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type OriginPrivilegeCmp = EqualPrivilegeOnly; + type Preimages = (); +} + +parameter_types! { + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); +} + +impl cumulus_pallet_parachain_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = parachain_info::Pallet; + type DmpMessageHandler = DmpQueue; + type ReservedDmpWeight = ReservedDmpWeight; + type OutboundXcmpMessageSource = XcmpQueue; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; + type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, + >; +} + +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} + +impl parachain_info::Config for Runtime {} + +impl cumulus_pallet_aura_ext::Config for Runtime {} + +parameter_types! { + pub const ExecutiveBody: BodyId = BodyId::Executive; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: XcmAssetId = XcmAssetId::Concrete(xcm_config::KsmLocation::get()); + /// The base fee for the message delivery fees. + pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); +} + +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; + +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; + type ChannelInfo = ParachainSystem; + type VersionWrapper = PolkadotXcm; + type ExecuteOverweightOrigin = EnsureRoot; + type ControllerOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, + >; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; +} + +impl cumulus_pallet_dmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; + type ExecuteOverweightOrigin = EnsureRoot; +} + +parameter_types! { + pub const Period: u32 = 6 * HOURS; + pub const Offset: u32 = 0; + pub const MaxAuthorities: u32 = 100_000; +} + +parameter_types! { + pub const MomentsPerDay: Moment = 86_400_000; // [ms/d] + pub const DefaultDemurrage: Demurrage = Demurrage::from_bits(0x0000000000000000000001E3F0A8A973_i128); + pub const EncointerExistentialDeposit: BalanceType = BalanceType::from_bits(0x0000000000000000000053e2d6238da4_u128); + pub const MeetupSizeTarget: u64 = 10; + pub const MeetupMinSize: u64 = 3; + pub const MeetupNewbieLimitDivider: u64 = 2; // 2 means 1/3 of participants may be newbies + pub const FaucetPalletId: PalletId = PalletId(*b"ectrfct0"); +} + +impl pallet_encointer_scheduler::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnCeremonyPhaseChange = EncointerCeremonies; + type MomentsPerDay = MomentsPerDay; + type CeremonyMaster = MoreThanHalfCouncil; + type WeightInfo = weights::pallet_encointer_scheduler::WeightInfo; +} + +impl pallet_encointer_ceremonies::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Public = ::Signer; + type Signature = Signature; + type RandomnessSource = RandomnessCollectiveFlip; + type MeetupSizeTarget = MeetupSizeTarget; + type MeetupMinSize = MeetupMinSize; + type MeetupNewbieLimitDivider = MeetupNewbieLimitDivider; + type CeremonyMaster = MoreThanHalfCouncil; + type WeightInfo = weights::pallet_encointer_ceremonies::WeightInfo; + type MaxAttestations = ConstU32<100>; +} + +impl pallet_encointer_communities::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type CommunityMaster = MoreThanHalfCouncil; + type TrustableForNonDestructiveAction = MoreThanHalfCouncil; + type WeightInfo = weights::pallet_encointer_communities::WeightInfo; + type MaxCommunityIdentifiers = ConstU32<10000>; + type MaxBootstrappers = ConstU32<10000>; + type MaxLocationsPerGeohash = ConstU32<10000>; + type MaxCommunityIdentifiersPerGeohash = ConstU32<10000>; +} + +impl pallet_encointer_balances::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type DefaultDemurrage = DefaultDemurrage; + type ExistentialDeposit = EncointerExistentialDeposit; + type CeremonyMaster = MoreThanHalfCouncil; + type WeightInfo = weights::pallet_encointer_balances::WeightInfo; +} + +impl pallet_encointer_bazaar::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_encointer_bazaar::WeightInfo; +} + +impl pallet_encointer_reputation_commitments::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_encointer_reputation_commitments::WeightInfo; +} + +impl pallet_encointer_faucet::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ControllerOrigin = EnsureRoot; + type Currency = Balances; + type PalletId = FaucetPalletId; + type WeightInfo = weights::pallet_encointer_faucet::WeightInfo; +} + +impl pallet_aura::Config for Runtime { + type AuthorityId = AuraId; + type DisabledValidators = (); + type MaxAuthorities = MaxAuthorities; + type AllowMultipleBlocksPerSlot = ConstBool; + #[cfg(feature = "experimental")] + type SlotDuration = ConstU64; +} + +parameter_types! { + pub const CouncilMotionDuration: BlockNumber = 7 * DAYS; + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; + pub MaxProposalWeight: Weight = sp_runtime::Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; +} + +type MoreThanHalfCouncil = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionMoreThan, +>; + +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 DefaultVote = pallet_collective::PrimeDefaultVote; + type MaxMembers = CouncilMaxMembers; + type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = MoreThanHalfCouncil; + type MaxProposalWeight = MaxProposalWeight; +} + +// support for collective pallet +impl pallet_membership::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AddOrigin = MoreThanHalfCouncil; + type RemoveOrigin = MoreThanHalfCouncil; + type SwapOrigin = MoreThanHalfCouncil; + type ResetOrigin = MoreThanHalfCouncil; + type PrimeOrigin = MoreThanHalfCouncil; + type MembershipInitialized = Collective; + type MembershipChanged = Collective; + type MaxMembers = CouncilMaxMembers; + type WeightInfo = weights::pallet_membership::WeightInfo; +} + +// Allow fee payment in community currency +impl pallet_asset_tx_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Fungibles = pallet_encointer_balances::Pallet; + type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter< + encointer_balances_tx_payment::BalanceToCommunityBalance, + encointer_balances_tx_payment::BurnCredit, + >; +} + +construct_runtime! { + pub enum Runtime { + // System support stuff. + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + ParachainSystem: cumulus_pallet_parachain_system::{ + Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, + } = 1, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage} = 2, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + + // Monetary stuff. + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + AssetTxPayment: pallet_asset_tx_payment::{Pallet, Storage, Event} = 12, + + Aura: pallet_aura::{Pallet, Storage, Config} = 23, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + + // XCM helpers. + XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, + CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + + // Handy utilities. + Utility: pallet_utility::{Pallet, Call, Event} = 40, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 43, + Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 44, + Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 48, + + // Encointer council. + Collective: pallet_collective::::{Pallet, Call, Storage, Origin, Config, Event } = 50, + Membership: pallet_membership::::{Pallet, Call, Storage, Event, Config} = 51, + + EncointerScheduler: pallet_encointer_scheduler::{Pallet, Call, Storage, Config, Event} = 60, + EncointerCeremonies: pallet_encointer_ceremonies::{Pallet, Call, Storage, Config, Event} = 61, + EncointerCommunities: pallet_encointer_communities::{Pallet, Call, Storage, Config, Event} = 62, + EncointerBalances: pallet_encointer_balances::{Pallet, Call, Storage, Config, Event} = 63, + EncointerBazaar: pallet_encointer_bazaar::{Pallet, Call, Storage, Event} = 64, + EncointerReputationCommitments: pallet_encointer_reputation_commitments::{Pallet, Call, Storage, Event} = 65, + EncointerFaucet: pallet_encointer_faucet::{Pallet, Call, Storage, Config, Event} = 66, + } +} + +/// `parachains_common` is an upstream crate, where they are started to define common types. +/// +/// The re-export is added by encointer. +pub use parachains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature}; + +/// The address format for describing accounts. +pub type Address = sp_runtime::MultiAddress; +/// Block type as expected by this runtime. +pub type Block = generic::Block; +/// A Block signed with a Justification +pub type SignedBlock = generic::SignedBlock; +/// BlockId type as expected by this runtime. +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::CheckEra, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_asset_tx_payment::ChargeAssetTxPayment, +); +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; +/// Extrinsic type that has already been checked. +pub type CheckedExtrinsic = generic::CheckedExtrinsic; + +/// Migrations to apply on runtime upgrade. +pub type Migrations = ( + // fixing the scheduler with a local migration is necessary because we have missed intermediate + // migrations. the safest migration is, therefore, to clear all storage and bump StorageVersion + migrations_fix::scheduler::v4::MigrateToV4, + // also here we're actually too late with applying the migration. however, the migration does + // work as-is. + pallet_xcm::migration::v1::VersionUncheckedMigrateToV1, + // balances are more tricky. We missed to do the migration to V1 and now we have inconsistent + // state which can't be decoded to V0, yet the StorageVersion is V0. + // the strategy is to: just pretend we're on V1 + migrations_fix::balances::v1::BruteForceToV1, + // then reset to V0 + pallet_balances::migration::ResetInactive, + //then apply the proper migration as we should have done earlier + pallet_balances::migration::MigrateToTrackInactive, +); + +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, +>; + +#[cfg(feature = "runtime-benchmarks")] +#[macro_use] +extern crate frame_benchmarking; + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + [frame_system, SystemBench::] + [pallet_balances, Balances] + [pallet_collective, Collective] + [pallet_membership, Membership] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_utility, Utility] + [pallet_proxy, Proxy] + [pallet_encointer_balances, EncointerBalances] + [pallet_encointer_bazaar, EncointerBazaar] + [pallet_encointer_ceremonies, EncointerCeremonies] + [pallet_encointer_communities, EncointerCommunities] + [pallet_encointer_faucet, EncointerFaucet] + [pallet_encointer_reputation_commitments, EncointerReputationCommitments] + [pallet_encointer_scheduler, EncointerScheduler] + [cumulus_pallet_xcmp_queue, XcmpQueue] + ); +} + +impl_runtime_apis! { + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION) + } + + fn authorities() -> Vec { + Aura::authorities().into_inner() + } + } + + 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 sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, 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 for Runtime { + fn query_info( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::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 cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { + ParachainSystem::collect_collation_info(header) + } + } + + impl pallet_encointer_ceremonies_rpc_runtime_api::CeremoniesApi for Runtime { + fn get_reputations(account: &AccountId) -> Vec<(CeremonyIndexType, CommunityReputation)> { + EncointerCeremonies::get_reputations(account) + } + fn get_aggregated_account_data(cid:CommunityIdentifier, account: &AccountId) -> AggregatedAccountData { + EncointerCeremonies::get_aggregated_account_data(cid, account) + } + fn get_ceremony_info() -> CeremonyInfo { + EncointerCeremonies::get_ceremony_info() + } + } + + impl pallet_encointer_communities_rpc_runtime_api::CommunitiesApi for Runtime { + fn get_all_balances(account: &AccountId) -> Vec<(CommunityIdentifier, BalanceEntry)> { + EncointerCommunities::get_all_balances(account) + } + + fn get_cids() -> Vec { + EncointerCommunities::get_cids() + } + + fn get_name(cid: &CommunityIdentifier) -> Option { + EncointerCommunities::get_name(cid) + } + + fn get_locations(cid: &CommunityIdentifier) -> Vec { + EncointerCommunities::get_locations(cid) + } + } + + impl pallet_encointer_bazaar_rpc_runtime_api::BazaarApi for Runtime { + fn get_offerings(business: &BusinessIdentifier) -> Vec{ + EncointerBazaar::get_offerings(business) + } + + fn get_businesses(community: &CommunityIdentifier) -> Vec<(AccountId, BusinessData)>{ + EncointerBazaar::get_businesses(community) + } + } + + impl encointer_balances_tx_payment_rpc_runtime_api::BalancesTxPaymentApi for Runtime { + fn balance_to_asset_balance(amount: Balance, asset_id: AssetId) -> Result { + BalanceToCommunityBalance::::to_asset_balance(amount, asset_id).map_err(|_e| + encointer_balances_tx_payment_rpc_runtime_api::Error::RuntimeError + ) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. If any of the pre/post migration checks fail, we shall stop + // right here and right now. + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, RuntimeBlockWeights::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).expect("execute-block failed") + } + } + + #[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 frame_system_benchmarking::Pallet as SystemBench; + + 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, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch}; + use frame_support::traits::TrackedStorageKey; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime {} + + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + // Treasury Account + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + add_benchmarks!(params, batches); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok(batches) + } + } +} + +cumulus_pallet_parachain_system::register_validate_block! { + Runtime = Runtime, + BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, +} + +#[cfg(test)] +mod multiplier_tests { + use super::*; + use frame_support::pallet_prelude::PalletInfoAccess; + + #[test] + fn treasury_pallet_index_is_correct() { + assert_eq!(ENCOINTER_TREASURY_PALLET_ID, ::index() as u8); + } +} diff --git a/system-parachains/encointer/src/migrations_fix.rs b/system-parachains/encointer/src/migrations_fix.rs new file mode 100644 index 0000000000..5b8de3611b --- /dev/null +++ b/system-parachains/encointer/src/migrations_fix.rs @@ -0,0 +1,190 @@ +// Copyright (c) 2023 Encointer Association +// This file is part of Encointer +// +// Encointer 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. +// +// Encointer 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 Encointer. If not, see . + +// the following are temporary local migration fixes to solve inconsistencies caused by not +// migrating Storage at the time of migrating runtime code + +pub mod balances { + use frame_support::traits::OnRuntimeUpgrade; + use pallet_balances::*; + #[cfg(feature = "try-runtime")] + use sp_runtime::TryRuntimeError; + use sp_std::vec::Vec; + + /// The log target. + const TARGET: &'static str = "runtime::fix::balances::migration"; + pub mod v1 { + use super::*; + use frame_support::pallet_prelude::*; + pub struct BruteForceToV1(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for BruteForceToV1 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + Ok(().encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version >= 1 { + log::warn!( + target: TARGET, + "skipping bruteforce to v1 migration: executed on wrong storage version." + ); + return T::DbWeight::get().reads(1) + } + log::info!(target: TARGET, "bruteforcing from {:?} to 1", onchain_version); + StorageVersion::new(1).put::>(); + + T::DbWeight::get().reads_writes(1, 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + ensure!(StorageVersion::get::>() == 1, "Must upgrade"); + Ok(()) + } + } + } +} +pub mod scheduler { + // this is necessary because migrations from v0 to v3 are no longer available in the scheduler + // pallet code and migrating is only possible from v3. The strategy here is to empty the agenda + // (has been empty since genesis) + use frame_support::traits::OnRuntimeUpgrade; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_scheduler::*; + use sp_std::vec::Vec; + + #[cfg(feature = "try-runtime")] + use sp_runtime::TryRuntimeError; + + /// The log target. + const TARGET: &'static str = "runtime::fix::scheduler::migration"; + + pub mod v1 { + use super::*; + use frame_support::{pallet_prelude::*, traits::schedule}; + + #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))] + #[derive(Clone, RuntimeDebug, Encode, Decode)] + pub(crate) struct ScheduledV1 { + maybe_id: Option>, + priority: schedule::Priority, + call: Call, + maybe_periodic: Option>, + } + + #[frame_support::storage_alias] + pub(crate) type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + Vec::RuntimeCall, BlockNumberFor>>>, + ValueQuery, + >; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, Vec, TaskAddress>>; + } + + pub mod v3 { + use super::*; + use frame_support::pallet_prelude::*; + + #[frame_support::storage_alias] + pub(crate) type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + Vec>>, + ValueQuery, + >; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, Vec, TaskAddress>>; + } + + pub mod v4 { + use super::*; + use frame_support::pallet_prelude::*; + + #[frame_support::storage_alias] + pub type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + BoundedVec< + Option>, + ::MaxScheduledPerBlock, + >, + ValueQuery, + >; + + pub(crate) type TaskName = [u8; 32]; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, TaskName, TaskAddress>>; + + /// Migrate the scheduler pallet from V0 to V4 by brute-force emptying the agenda. + pub struct MigrateToV4(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for MigrateToV4 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let agendas = v1::Agenda::::iter_keys().count() as u32; + let lookups = v1::Lookup::::iter_keys().count() as u32; + log::info!(target: TARGET, "agendas present which will be dropped: {}/{}...", agendas, lookups); + Ok((agendas, lookups).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version >= 3 { + log::warn!( + target: TARGET, + "skipping v0 to v4 migration: executed on wrong storage version.\ + Expected version < 3, found {:?}", + onchain_version, + ); + return T::DbWeight::get().reads(1) + } + log::info!(target: TARGET, "migrating from {:?} to 4", onchain_version); + let purged_agendas = v1::Agenda::::clear(u32::MAX, None).unique as u64; + let purged_lookups = v1::Lookup::::clear(u32::MAX, None).unique as u64; + StorageVersion::new(4).put::>(); + + T::DbWeight::get() + .reads_writes(purged_agendas + purged_lookups, purged_agendas + purged_lookups) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + ensure!(StorageVersion::get::>() == 4, "Must upgrade"); + + let agendas = Agenda::::iter_keys().count() as u32; + ensure!(agendas == 0, "agenda must be empty after now"); + let lookups = Lookup::::iter_keys().count() as u32; + ensure!(lookups == 0, "agenda must be empty after now"); + + Ok(()) + } + } + } +} diff --git a/system-parachains/encointer/src/weights/block_weights.rs b/system-parachains/encointer/src/weights/block_weights.rs new file mode 100644 index 0000000000..e7fdb2aae2 --- /dev/null +++ b/system-parachains/encointer/src/weights/block_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Importing a block with 0 Extrinsics. + pub const BlockExecutionWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::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::constants::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." + ); + } + } +} diff --git a/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs new file mode 100644 index 0000000000..f10766cb91 --- /dev/null +++ b/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs @@ -0,0 +1,59 @@ + +//! Autogenerated weights for `cumulus_pallet_xcmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_xcmp_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/cumulus_pallet_xcmp_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_xcmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn set_config_with_u32() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1527` + // Minimum execution time: 4_338_000 picoseconds. + Weight::from_parts(4_474_000, 0) + .saturating_add(Weight::from_parts(0, 1527)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn set_config_with_weight() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1527` + // Minimum execution time: 4_285_000 picoseconds. + Weight::from_parts(4_439_000, 0) + .saturating_add(Weight::from_parts(0, 1527)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/encointer/src/weights/extrinsic_weights.rs b/system-parachains/encointer/src/weights/extrinsic_weights.rs new file mode 100644 index 0000000000..1a4adb968b --- /dev/null +++ b/system-parachains/encointer/src/weights/extrinsic_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Executing a NO-OP `System::remarks` Extrinsic. + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::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::constants::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." + ); + } + } +} diff --git a/system-parachains/encointer/src/weights/frame_system.rs b/system-parachains/encointer/src/weights/frame_system.rs new file mode 100644 index 0000000000..ee7995b4ac --- /dev/null +++ b/system-parachains/encointer/src/weights/frame_system.rs @@ -0,0 +1,150 @@ +// 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 `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 + +// Executed Command: +// /builds/polkadot-sdk/target/production/polkadot-parachain +// benchmark +// pallet +// --chain=spec-asset-hub-kusama.json +// --pallet=frame_system +// --extrinsic= +// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights +// --header=/builds/bench/header.txt +// --no-median-slopes +// --no-min-squares + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_system`. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_815_000 picoseconds. + Weight::from_parts(1_241_063, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3932160]`. + fn remark_with_event(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_962_000 picoseconds. + Weight::from_parts(128_782_669, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 10 + .saturating_add(Weight::from_parts(1_587, 0).saturating_mul(b.into())) + } + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + fn set_heap_pages() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 3_517_000 picoseconds. + Weight::from_parts(3_750_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) + /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + /// Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + /// Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + /// Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `164` + // Estimated: `1649` + // Minimum execution time: 97_863_204_000 picoseconds. + Weight::from_parts(101_385_669_000, 0) + .saturating_add(Weight::from_parts(0, 1649)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_919_000 picoseconds. + Weight::from_parts(2_055_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_130 + .saturating_add(Weight::from_parts(718_734, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_943_000 picoseconds. + Weight::from_parts(2_123_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 931 + .saturating_add(Weight::from_parts(541_111, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `83 + p * (69 ±0)` + // Estimated: `86 + p * (70 ±0)` + // Minimum execution time: 3_533_000 picoseconds. + Weight::from_parts(3_617_000, 0) + .saturating_add(Weight::from_parts(0, 86)) + // Standard Error: 1_337 + .saturating_add(Weight::from_parts(1_236_860, 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/system-parachains/encointer/src/weights/mod.rs b/system-parachains/encointer/src/weights/mod.rs new file mode 100644 index 0000000000..b0f75efdc0 --- /dev/null +++ b/system-parachains/encointer/src/weights/mod.rs @@ -0,0 +1,45 @@ +// Copyright (c) 2019 Alain Brenzikofer +// This file is part of Encointer +// +// Encointer 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. +// +// Encointer 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 Encointer. If not, see . + +//! The weights used in the encointer-parachain-runtime + +// the generated files do not pass clippy +#![allow(clippy::all)] + +pub mod block_weights; +pub mod cumulus_pallet_xcmp_queue; +pub mod extrinsic_weights; +pub mod frame_system; +pub mod pallet_balances; +pub mod pallet_collective; +pub mod pallet_encointer_balances; +pub mod pallet_encointer_bazaar; +pub mod pallet_encointer_ceremonies; +pub mod pallet_encointer_communities; +pub mod pallet_encointer_faucet; +pub mod pallet_encointer_reputation_commitments; +pub mod pallet_encointer_scheduler; +pub mod pallet_membership; +pub mod pallet_proxy; +pub mod pallet_timestamp; +pub mod pallet_treasury; +pub mod pallet_utility; +pub mod paritydb_weights; +pub mod rocksdb_weights; + +pub use block_weights::constants::BlockExecutionWeight; +pub use extrinsic_weights::constants::ExtrinsicBaseWeight; +pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/encointer/src/weights/pallet_balances.rs b/system-parachains/encointer/src/weights/pallet_balances.rs new file mode 100644 index 0000000000..449621b5aa --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_balances.rs @@ -0,0 +1,135 @@ + +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_balances.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn transfer_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 51_062_000 picoseconds. + Weight::from_parts(52_242_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn transfer_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 38_442_000 picoseconds. + Weight::from_parts(38_796_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 12_980_000 picoseconds. + Weight::from_parts(13_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) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 19_468_000 picoseconds. + Weight::from_parts(19_763_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `6196` + // Minimum execution time: 51_765_000 picoseconds. + Weight::from_parts(52_610_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 47_586_000 picoseconds. + Weight::from_parts(48_295_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn force_unreserve() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 15_891_000 picoseconds. + Weight::from_parts(16_204_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:999 w:999) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (135 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 15_647_000 picoseconds. + Weight::from_parts(15_952_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 99_031 + .saturating_add(Weight::from_parts(15_553_741, 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/system-parachains/encointer/src/weights/pallet_collective.rs b/system-parachains/encointer/src/weights/pallet_collective.rs new file mode 100644 index 0000000000..2587a89de3 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_collective.rs @@ -0,0 +1,287 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_collective.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_collective`. +pub struct WeightInfo(PhantomData); +impl pallet_collective::WeightInfo for WeightInfo { + /// Storage: Collective Members (r:1 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:100 w:100) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `15728 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 12_612_000 picoseconds. + Weight::from_parts(12_817_000, 0) + .saturating_add(Weight::from_parts(0, 15728)) + // Standard Error: 54_992 + .saturating_add(Weight::from_parts(4_313_092, 0).saturating_mul(m.into())) + // Standard Error: 54_992 + .saturating_add(Weight::from_parts(6_586_060, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) + } + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `69 + m * (32 ±0)` + // Estimated: `1555 + m * (32 ±0)` + // Minimum execution time: 13_615_000 picoseconds. + Weight::from_parts(13_294_322, 0) + .saturating_add(Weight::from_parts(0, 1555)) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_137, 0).saturating_mul(b.into())) + // Standard Error: 250 + .saturating_add(Weight::from_parts(9_446, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:0) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `69 + m * (32 ±0)` + // Estimated: `3535 + m * (32 ±0)` + // Minimum execution time: 16_050_000 picoseconds. + Weight::from_parts(15_173_364, 0) + .saturating_add(Weight::from_parts(0, 3535)) + // Standard Error: 43 + .saturating_add(Weight::from_parts(1_403, 0).saturating_mul(b.into())) + // Standard Error: 453 + .saturating_add(Weight::from_parts(18_210, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalCount (r:1 w:1) + /// Proof Skipped: Collective ProposalCount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:0 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `359 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3751 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 22_203_000 picoseconds. + Weight::from_parts(22_610_277, 0) + .saturating_add(Weight::from_parts(0, 3751)) + // Standard Error: 95 + .saturating_add(Weight::from_parts(2_707, 0).saturating_mul(b.into())) + // Standard Error: 1_000 + .saturating_add(Weight::from_parts(23_109, 0).saturating_mul(m.into())) + // Standard Error: 988 + .saturating_add(Weight::from_parts(189_590, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `808 + m * (64 ±0)` + // Estimated: `4272 + m * (64 ±0)` + // Minimum execution time: 22_632_000 picoseconds. + Weight::from_parts(23_889_147, 0) + .saturating_add(Weight::from_parts(0, 4272)) + // Standard Error: 1_170 + .saturating_add(Weight::from_parts(34_147, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:0 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3842 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 25_176_000 picoseconds. + Weight::from_parts(26_526_585, 0) + .saturating_add(Weight::from_parts(0, 3842)) + // Standard Error: 1_143 + .saturating_add(Weight::from_parts(19_843, 0).saturating_mul(m.into())) + // Standard Error: 1_114 + .saturating_add(Weight::from_parts(185_128, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 35_905_000 picoseconds. + Weight::from_parts(37_097_894, 0) + .saturating_add(Weight::from_parts(0, 4016)) + // Standard Error: 155 + .saturating_add(Weight::from_parts(2_460, 0).saturating_mul(b.into())) + // Standard Error: 1_638 + .saturating_add(Weight::from_parts(25_075, 0).saturating_mul(m.into())) + // Standard Error: 1_597 + .saturating_add(Weight::from_parts(220_820, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:1 w:0) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:0 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3862 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 27_232_000 picoseconds. + Weight::from_parts(28_648_248, 0) + .saturating_add(Weight::from_parts(0, 3862)) + // Standard Error: 921 + .saturating_add(Weight::from_parts(27_951, 0).saturating_mul(m.into())) + // Standard Error: 898 + .saturating_add(Weight::from_parts(183_334, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Collective Voting (r:1 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Members (r:1 w:0) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:1 w:0) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:1 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 37_906_000 picoseconds. + Weight::from_parts(41_399_461, 0) + .saturating_add(Weight::from_parts(0, 4036)) + // Standard Error: 124 + .saturating_add(Weight::from_parts(1_721, 0).saturating_mul(b.into())) + // Standard Error: 1_311 + .saturating_add(Weight::from_parts(22_182, 0).saturating_mul(m.into())) + // Standard Error: 1_278 + .saturating_add(Weight::from_parts(214_365, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: Collective Proposals (r:1 w:1) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Voting (r:0 w:1) + /// Proof Skipped: Collective Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Collective ProposalOf (r:0 w:1) + /// Proof Skipped: Collective ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `226 + p * (32 ±0)` + // Estimated: `1711 + p * (32 ±0)` + // Minimum execution time: 13_796_000 picoseconds. + Weight::from_parts(15_669_737, 0) + .saturating_add(Weight::from_parts(0, 1711)) + // Standard Error: 1_075 + .saturating_add(Weight::from_parts(172_017, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_balances.rs b/system-parachains/encointer/src/weights/pallet_encointer_balances.rs new file mode 100644 index 0000000000..e8c813ba4c --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_balances.rs @@ -0,0 +1,72 @@ + +//! Autogenerated weights for `pallet_encointer_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_balances.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_balances::WeightInfo for WeightInfo { + /// Storage: EncointerBalances Balance (r:2 w:2) + /// Proof: EncointerBalances Balance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `6126` + // Minimum execution time: 83_473_000 picoseconds. + Weight::from_parts(84_889_000, 0) + .saturating_add(Weight::from_parts(0, 6126)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EncointerBalances Balance (r:2 w:2) + /// Proof: EncointerBalances Balance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `6196` + // Minimum execution time: 117_542_000 picoseconds. + Weight::from_parts(119_322_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + fn set_fee_conversion_factor() -> Weight { + Weight::from_parts(6_000_000, 0) + .saturating_add(T::DbWeight::get().writes(1)) + } + +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_bazaar.rs b/system-parachains/encointer/src/weights/pallet_encointer_bazaar.rs new file mode 100644 index 0000000000..2bbab53783 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_bazaar.rs @@ -0,0 +1,111 @@ + +//! Autogenerated weights for `pallet_encointer_bazaar` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_bazaar +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_bazaar.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_bazaar`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_bazaar::WeightInfo for WeightInfo { + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) + fn create_business() -> Weight { + // Proof Size summary in bytes: + // Measured: `263` + // Estimated: `91487` + // Minimum execution time: 28_826_000 picoseconds. + Weight::from_parts(31_307_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) + fn update_business() -> Weight { + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3627` + // Minimum execution time: 24_215_000 picoseconds. + Weight::from_parts(26_309_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) + fn delete_business() -> Weight { + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3627` + // Minimum execution time: 27_141_000 picoseconds. + Weight::from_parts(28_669_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerBazaar BusinessRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar BusinessRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerBazaar OfferingRegistry (r:0 w:1) + /// Proof Skipped: EncointerBazaar OfferingRegistry (max_values: None, max_size: None, mode: Measured) + fn create_offering() -> Weight { + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3627` + // Minimum execution time: 29_322_000 picoseconds. + Weight::from_parts(30_740_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: EncointerBazaar OfferingRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar OfferingRegistry (max_values: None, max_size: None, mode: Measured) + fn update_offering() -> Weight { + // Proof Size summary in bytes: + // Measured: `196` + // Estimated: `3661` + // Minimum execution time: 21_668_000 picoseconds. + Weight::from_parts(22_897_000, 0) + .saturating_add(Weight::from_parts(0, 3661)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerBazaar OfferingRegistry (r:1 w:1) + /// Proof Skipped: EncointerBazaar OfferingRegistry (max_values: None, max_size: None, mode: Measured) + fn delete_offering() -> Weight { + // Proof Size summary in bytes: + // Measured: `196` + // Estimated: `3661` + // Minimum execution time: 19_727_000 picoseconds. + Weight::from_parts(20_387_000, 0) + .saturating_add(Weight::from_parts(0, 3661)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_ceremonies.rs b/system-parachains/encointer/src/weights/pallet_encointer_ceremonies.rs new file mode 100644 index 0000000000..94370b838c --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_ceremonies.rs @@ -0,0 +1,401 @@ + +//! Autogenerated weights for `pallet_encointer_ceremonies` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_ceremonies +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_ceremonies.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_ceremonies`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_ceremonies::WeightInfo for WeightInfo { + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies EndorseeIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies NewbieIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Bootstrappers (r:1 w:0) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:0) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputableCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + fn register_participant() -> Weight { + // Proof Size summary in bytes: + // Measured: `862` + // Estimated: `323492` + // Minimum execution time: 141_377_000 picoseconds. + Weight::from_parts(150_107_000, 0) + .saturating_add(Weight::from_parts(0, 323492)) + .saturating_add(T::DbWeight::get().reads(13)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies EndorseeIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Bootstrappers (r:1 w:0) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:0) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputableCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + fn upgrade_registration() -> Weight { + // Proof Size summary in bytes: + // Measured: `1140` + // Estimated: `323492` + // Minimum execution time: 170_801_000 picoseconds. + Weight::from_parts(177_027_000, 0) + .saturating_add(Weight::from_parts(0, 323492)) + .saturating_add(T::DbWeight::get().reads(15)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:2) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + fn unregister_participant() -> Weight { + // Proof Size summary in bytes: + // Measured: `943` + // Estimated: `91487` + // Minimum execution time: 62_897_000 picoseconds. + Weight::from_parts(65_129_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupCount (r:1 w:0) + /// Proof Skipped: EncointerCeremonies MeetupCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AssignmentCounts (r:1 w:0) + /// Proof Skipped: EncointerCeremonies AssignmentCounts (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Assignments (r:1 w:0) + /// Proof Skipped: EncointerCeremonies Assignments (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:8 w:0) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:2 w:0) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Locations (r:2 w:0) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + /// Storage: EncointerScheduler PhaseDurations (r:1 w:0) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:0) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupTimeOffset (r:1 w:0) + /// Proof Skipped: EncointerCeremonies MeetupTimeOffset (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies AttestationCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies AttestationIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies MeetupParticipantCountVote (r:0 w:1) + /// Proof Skipped: EncointerCeremonies MeetupParticipantCountVote (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies AttestationRegistry (max_values: None, max_size: None, mode: Measured) + fn attest_attendees() -> Weight { + // Proof Size summary in bytes: + // Measured: `2137` + // Estimated: `646004` + // Minimum execution time: 123_019_000 picoseconds. + Weight::from_parts(126_476_000, 0) + .saturating_add(Weight::from_parts(0, 646004)) + .saturating_add(T::DbWeight::get().reads(25)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Endorsees (r:2 w:1) + /// Proof Skipped: EncointerCeremonies Endorsees (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:2 w:0) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BurnedReputableNewbieTickets (r:1 w:1) + /// Proof Skipped: EncointerCeremonies BurnedReputableNewbieTickets (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorsementTicketsPerReputable (r:1 w:0) + /// Proof Skipped: EncointerCeremonies EndorsementTicketsPerReputable (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieCount (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities Bootstrappers (r:1 w:0) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:0) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies EndorseeRegistry (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseesCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseesCount (max_values: None, max_size: None, mode: Measured) + fn endorse_newcomer() -> Weight { + // Proof Size summary in bytes: + // Measured: `1130` + // Estimated: `323492` + // Minimum execution time: 116_739_000 picoseconds. + Weight::from_parts(119_393_000, 0) + .saturating_add(Weight::from_parts(0, 323492)) + .saturating_add(T::DbWeight::get().reads(20)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupCount (r:1 w:0) + /// Proof Skipped: EncointerCeremonies MeetupCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AssignmentCounts (r:1 w:0) + /// Proof Skipped: EncointerCeremonies AssignmentCounts (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Assignments (r:1 w:0) + /// Proof Skipped: EncointerCeremonies Assignments (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies BootstrapperIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies IssuedRewards (r:1 w:1) + /// Proof Skipped: EncointerCeremonies IssuedRewards (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableRegistry (r:8 w:0) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieRegistry (r:2 w:0) + /// Proof Skipped: EncointerCeremonies NewbieRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationIndex (r:10 w:0) + /// Proof Skipped: EncointerCeremonies AttestationIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationRegistry (r:10 w:0) + /// Proof Skipped: EncointerCeremonies AttestationRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies MeetupParticipantCountVote (r:10 w:0) + /// Proof Skipped: EncointerCeremonies MeetupParticipantCountVote (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCommunities NominalIncome (r:1 w:0) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies CeremonyReward (r:1 w:0) + /// Proof Skipped: EncointerCeremonies CeremonyReward (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EncointerBalances Balance (r:10 w:10) + /// Proof: EncointerBalances Balance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:1 w:0) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerBalances TotalIssuance (r:1 w:1) + /// Proof: EncointerBalances TotalIssuance (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ParticipantReputation (r:0 w:10) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + fn claim_rewards() -> Weight { + // Proof Size summary in bytes: + // Measured: `7649` + // Estimated: `33389` + // Minimum execution time: 441_163_000 picoseconds. + Weight::from_parts(455_147_000, 0) + .saturating_add(Weight::from_parts(0, 33389)) + .saturating_add(T::DbWeight::get().reads(62)) + .saturating_add(T::DbWeight::get().writes(22)) + } + /// Storage: EncointerCeremonies InactivityTimeout (r:0 w:1) + /// Proof Skipped: EncointerCeremonies InactivityTimeout (max_values: Some(1), max_size: None, mode: Measured) + fn set_inactivity_timeout() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_151_000 picoseconds. + Weight::from_parts(8_366_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies MeetupTimeOffset (r:0 w:1) + /// Proof Skipped: EncointerCeremonies MeetupTimeOffset (max_values: Some(1), max_size: None, mode: Measured) + fn set_meetup_time_offset() -> Weight { + // Proof Size summary in bytes: + // Measured: `73` + // Estimated: `1486` + // Minimum execution time: 10_374_000 picoseconds. + Weight::from_parts(10_844_000, 0) + .saturating_add(Weight::from_parts(0, 1486)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies ReputationLifetime (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + fn set_reputation_lifetime() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_514_000 picoseconds. + Weight::from_parts(8_789_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies EndorsementTicketsPerBootstrapper (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorsementTicketsPerBootstrapper (max_values: Some(1), max_size: None, mode: Measured) + fn set_endorsement_tickets_per_bootstrapper() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_173_000 picoseconds. + Weight::from_parts(8_489_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies EndorsementTicketsPerReputable (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorsementTicketsPerReputable (max_values: Some(1), max_size: None, mode: Measured) + fn set_endorsement_tickets_per_reputable() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_431_000 picoseconds. + Weight::from_parts(8_612_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies TimeTolerance (r:0 w:1) + /// Proof Skipped: EncointerCeremonies TimeTolerance (max_values: Some(1), max_size: None, mode: Measured) + fn set_time_tolerance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_506_000 picoseconds. + Weight::from_parts(8_655_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies LocationTolerance (r:0 w:1) + /// Proof Skipped: EncointerCeremonies LocationTolerance (max_values: Some(1), max_size: None, mode: Measured) + fn set_location_tolerance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_300_000 picoseconds. + Weight::from_parts(8_793_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCeremonies ReputableRegistry (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableIndex (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ReputableIndex (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:1) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies Assignments (r:0 w:1) + /// Proof Skipped: EncointerCeremonies Assignments (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies MeetupCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies MeetupCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies NewbieCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies NewbieCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies ReputableCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies ReputableCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AssignmentCounts (r:0 w:1) + /// Proof Skipped: EncointerCeremonies AssignmentCounts (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies BootstrapperCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies BootstrapperCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies AttestationCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies AttestationCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseeCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseeCount (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerCeremonies EndorseesCount (r:0 w:1) + /// Proof Skipped: EncointerCeremonies EndorseesCount (max_values: None, max_size: None, mode: Measured) + fn purge_community_ceremony() -> Weight { + // Proof Size summary in bytes: + // Measured: `641` + // Estimated: `4106` + // Minimum execution time: 74_214_000 picoseconds. + Weight::from_parts(76_621_000, 0) + .saturating_add(Weight::from_parts(0, 4106)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(12)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_communities.rs b/system-parachains/encointer/src/weights/pallet_encointer_communities.rs new file mode 100644 index 0000000000..da64e97970 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_communities.rs @@ -0,0 +1,187 @@ + +//! Autogenerated weights for `pallet_encointer_communities` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_communities +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_communities.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_communities`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_communities::WeightInfo for WeightInfo { + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MaxSpeedMps (r:1 w:0) + /// Proof: EncointerCommunities MaxSpeedMps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MinSolarTripTimeS (r:1 w:0) + /// Proof: EncointerCommunities MinSolarTripTimeS (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiersByGeohash (max_values: None, max_size: Some(90007), added: 92482, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Locations (r:1 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + /// Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Proof: EncointerCommunities CommunityMetadata (max_values: None, max_size: Some(1352), added: 3827, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Bootstrappers (r:0 w:1) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:0 w:1) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + fn new_community() -> Weight { + // Proof Size summary in bytes: + // Measured: `6448` + // Estimated: `323497` + // Minimum execution time: 5_643_876_000 picoseconds. + Weight::from_parts(5_676_264_000, 0) + .saturating_add(Weight::from_parts(0, 323497)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MaxSpeedMps (r:1 w:0) + /// Proof: EncointerCommunities MaxSpeedMps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities MinSolarTripTimeS (r:1 w:0) + /// Proof: EncointerCommunities MinSolarTripTimeS (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiersByGeohash (max_values: None, max_size: Some(90007), added: 92482, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Locations (r:1 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + fn add_location() -> Weight { + // Proof Size summary in bytes: + // Measured: `6521` + // Estimated: `323497` + // Minimum execution time: 5_627_080_000 picoseconds. + Weight::from_parts(5_682_831_000, 0) + .saturating_add(Weight::from_parts(0, 323497)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerScheduler CurrentPhase (r:1 w:0) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Locations (r:1 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + fn remove_location() -> Weight { + // Proof Size summary in bytes: + // Measured: `6500` + // Estimated: `323497` + // Minimum execution time: 37_629_000 picoseconds. + Weight::from_parts(39_837_000, 0) + .saturating_add(Weight::from_parts(0, 323497)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Proof: EncointerCommunities CommunityMetadata (max_values: None, max_size: Some(1352), added: 3827, mode: MaxEncodedLen) + fn update_community_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `221` + // Estimated: `91487` + // Minimum execution time: 16_765_000 picoseconds. + Weight::from_parts(17_226_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerBalances DemurragePerBlock (r:0 w:1) + /// Proof: EncointerBalances DemurragePerBlock (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + fn update_demurrage() -> Weight { + // Proof Size summary in bytes: + // Measured: `221` + // Estimated: `91487` + // Minimum execution time: 14_259_000 picoseconds. + Weight::from_parts(14_985_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + fn update_nominal_income() -> Weight { + // Proof Size summary in bytes: + // Measured: `221` + // Estimated: `91487` + // Minimum execution time: 14_959_000 picoseconds. + Weight::from_parts(15_675_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCommunities MinSolarTripTimeS (r:0 w:1) + /// Proof: EncointerCommunities MinSolarTripTimeS (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + fn set_min_solar_trip_time_s() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_071_000 picoseconds. + Weight::from_parts(8_746_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCommunities MaxSpeedMps (r:0 w:1) + /// Proof: EncointerCommunities MaxSpeedMps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + fn set_max_speed_mps() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_080_000 picoseconds. + Weight::from_parts(8_636_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerCommunities Locations (r:2 w:1) + /// Proof: EncointerCommunities Locations (max_values: None, max_size: Some(320032), added: 322507, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiersByGeohash (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiersByGeohash (max_values: None, max_size: Some(90007), added: 92482, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:1) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerCommunities NominalIncome (r:0 w:1) + /// Proof: EncointerCommunities NominalIncome (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + /// Storage: EncointerCommunities CommunityMetadata (r:0 w:1) + /// Proof: EncointerCommunities CommunityMetadata (max_values: None, max_size: Some(1352), added: 3827, mode: MaxEncodedLen) + /// Storage: EncointerCommunities Bootstrappers (r:0 w:1) + /// Proof: EncointerCommunities Bootstrappers (max_values: None, max_size: Some(320027), added: 322502, mode: MaxEncodedLen) + fn purge_community() -> Weight { + // Proof Size summary in bytes: + // Measured: `482` + // Estimated: `646004` + // Minimum execution time: 45_935_000 picoseconds. + Weight::from_parts(47_790_000, 0) + .saturating_add(Weight::from_parts(0, 646004)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(6)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_faucet.rs b/system-parachains/encointer/src/weights/pallet_encointer_faucet.rs new file mode 100644 index 0000000000..1567e28046 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_faucet.rs @@ -0,0 +1,122 @@ + +//! Autogenerated weights for `pallet_encointer_faucet` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_faucet +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_faucet.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_faucet`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_faucet::WeightInfo for WeightInfo { + /// Storage: EncointerCommunities CommunityIdentifiers (r:1 w:0) + /// Proof: EncointerCommunities CommunityIdentifiers (max_values: Some(1), max_size: Some(90002), added: 90497, mode: MaxEncodedLen) + /// Storage: EncointerFaucet Faucets (r:1 w:1) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: EncointerFaucet ReserveAmount (r:1 w:0) + /// Proof: EncointerFaucet ReserveAmount (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances Reserves (r:1 w:1) + /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments CurrentPurposeId (r:1 w:1) + /// Proof: EncointerReputationCommitments CurrentPurposeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments Purposes (r:0 w:1) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + fn create_faucet() -> Weight { + // Proof Size summary in bytes: + // Measured: `371` + // Estimated: `91487` + // Minimum execution time: 94_701_000 picoseconds. + Weight::from_parts(97_700_000, 0) + .saturating_add(Weight::from_parts(0, 91487)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: EncointerFaucet Faucets (r:1 w:0) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments Purposes (r:1 w:0) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerReputationCommitments Commitments (r:1 w:1) + /// Proof: EncointerReputationCommitments Commitments (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn drip() -> Weight { + // Proof Size summary in bytes: + // Measured: `680` + // Estimated: `12838` + // Minimum execution time: 72_829_000 picoseconds. + Weight::from_parts(76_945_000, 0) + .saturating_add(Weight::from_parts(0, 12838)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EncointerFaucet Faucets (r:1 w:1) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: Balances Reserves (r:1 w:1) + /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + /// Storage: System Account (r:3 w:3) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn dissolve_faucet() -> Weight { + // Proof Size summary in bytes: + // Measured: `507` + // Estimated: `12838` + // Minimum execution time: 78_329_000 picoseconds. + Weight::from_parts(80_171_000, 0) + .saturating_add(Weight::from_parts(0, 12838)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EncointerFaucet Faucets (r:1 w:1) + /// Proof: EncointerFaucet Faucets (max_values: None, max_size: Some(9373), added: 11848, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Balances Reserves (r:1 w:1) + /// Proof: Balances Reserves (max_values: None, max_size: Some(1249), added: 3724, mode: MaxEncodedLen) + fn close_faucet() -> Weight { + // Proof Size summary in bytes: + // Measured: `507` + // Estimated: `12838` + // Minimum execution time: 72_776_000 picoseconds. + Weight::from_parts(74_301_000, 0) + .saturating_add(Weight::from_parts(0, 12838)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EncointerFaucet ReserveAmount (r:0 w:1) + /// Proof: EncointerFaucet ReserveAmount (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + fn set_reserve_amount() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_612_000 picoseconds. + Weight::from_parts(8_143_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_reputation_commitments.rs b/system-parachains/encointer/src/weights/pallet_encointer_reputation_commitments.rs new file mode 100644 index 0000000000..c85a0c5395 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_reputation_commitments.rs @@ -0,0 +1,65 @@ + +//! Autogenerated weights for `pallet_encointer_reputation_commitments` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_reputation_commitments +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_reputation_commitments.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_reputation_commitments`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_reputation_commitments::WeightInfo for WeightInfo { + /// Storage: EncointerReputationCommitments CurrentPurposeId (r:1 w:1) + /// Proof: EncointerReputationCommitments CurrentPurposeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerReputationCommitments Purposes (r:0 w:1) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + fn register_purpose() -> Weight { + // Proof Size summary in bytes: + // Measured: `4` + // Estimated: `1493` + // Minimum execution time: 21_094_000 picoseconds. + Weight::from_parts(22_125_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: EncointerReputationCommitments Purposes (r:1 w:0) + /// Proof: EncointerReputationCommitments Purposes (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ParticipantReputation (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ParticipantReputation (max_values: None, max_size: None, mode: Measured) + /// Storage: EncointerReputationCommitments Commitments (r:1 w:1) + /// Proof: EncointerReputationCommitments Commitments (max_values: None, max_size: Some(102), added: 2577, mode: MaxEncodedLen) + fn commit_reputation() -> Weight { + // Proof Size summary in bytes: + // Measured: `329` + // Estimated: `3794` + // Minimum execution time: 36_854_000 picoseconds. + Weight::from_parts(39_205_000, 0) + .saturating_add(Weight::from_parts(0, 3794)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_encointer_scheduler.rs b/system-parachains/encointer/src/weights/pallet_encointer_scheduler.rs new file mode 100644 index 0000000000..8fc6dd741e --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_encointer_scheduler.rs @@ -0,0 +1,91 @@ + +//! Autogenerated weights for `pallet_encointer_scheduler` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_encointer_scheduler +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_encointer_scheduler.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_encointer_scheduler`. +pub struct WeightInfo(PhantomData); +impl pallet_encointer_scheduler::WeightInfo for WeightInfo { + /// Storage: EncointerScheduler CurrentPhase (r:1 w:1) + /// Proof: EncointerScheduler CurrentPhase (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:1) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerScheduler PhaseDurations (r:3 w:0) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerCeremonies ReputationLifetime (r:1 w:0) + /// Proof Skipped: EncointerCeremonies ReputationLifetime (max_values: Some(1), max_size: None, mode: Measured) + fn next_phase() -> Weight { + // Proof Size summary in bytes: + // Measured: `409` + // Estimated: `8490` + // Minimum execution time: 61_397_000 picoseconds. + Weight::from_parts(63_823_000, 0) + .saturating_add(Weight::from_parts(0, 8490)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + fn push_by_one_day() -> Weight { + // Proof Size summary in bytes: + // Measured: `73` + // Estimated: `1493` + // Minimum execution time: 14_946_000 picoseconds. + Weight::from_parts(15_438_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerScheduler PhaseDurations (r:0 w:1) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) + fn set_phase_duration() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_814_000 picoseconds. + Weight::from_parts(6_076_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EncointerScheduler NextPhaseTimestamp (r:0 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + fn set_next_phase_timestamp() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_283_000 picoseconds. + Weight::from_parts(4_476_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_membership.rs b/system-parachains/encointer/src/weights/pallet_membership.rs new file mode 100644 index 0000000000..844851fda8 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_membership.rs @@ -0,0 +1,185 @@ + +//! Autogenerated weights for `pallet_membership` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_membership +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_membership.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_membership`. +pub struct WeightInfo(PhantomData); +impl pallet_membership::WeightInfo for WeightInfo { + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 99]`. + fn add_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `102 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 16_503_000 picoseconds. + Weight::from_parts(22_233_968, 0) + .saturating_add(Weight::from_parts(0, 4687)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:0) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[2, 100]`. + fn remove_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 16_035_000 picoseconds. + Weight::from_parts(16_899_394, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 569 + .saturating_add(Weight::from_parts(26_212, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:0) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[2, 100]`. + fn swap_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 15_874_000 picoseconds. + Weight::from_parts(16_897_269, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 463 + .saturating_add(Weight::from_parts(37_531, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:0) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn reset_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 15_407_000 picoseconds. + Weight::from_parts(17_311_131, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 892 + .saturating_add(Weight::from_parts(118_312, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Membership Members (r:1 w:1) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Collective Proposals (r:1 w:0) + /// Proof Skipped: Collective Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Membership Prime (r:1 w:1) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Members (r:0 w:1) + /// Proof Skipped: Collective Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn change_key(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `206 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 16_110_000 picoseconds. + Weight::from_parts(17_298_112, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 705 + .saturating_add(Weight::from_parts(37_102, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Membership Members (r:1 w:0) + /// Proof: Membership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: Membership Prime (r:0 w:1) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn set_prime(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `32 + m * (32 ±0)` + // Estimated: `4687 + m * (32 ±0)` + // Minimum execution time: 5_906_000 picoseconds. + Weight::from_parts(6_230_458, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 230 + .saturating_add(Weight::from_parts(7_792, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Membership Prime (r:0 w:1) + /// Proof: Membership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: Collective Prime (r:0 w:1) + /// Proof Skipped: Collective Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_695_000 picoseconds. + Weight::from_parts(2_946_268, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_proxy.rs b/system-parachains/encointer/src/weights/pallet_proxy.rs new file mode 100644 index 0000000000..c28ce0c236 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_proxy.rs @@ -0,0 +1,208 @@ + +//! Autogenerated weights for `pallet_proxy` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_proxy +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_proxy.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_proxy`. +pub struct WeightInfo(PhantomData); +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 { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 12_149_000 picoseconds. + Weight::from_parts(12_734_566, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_902 + .saturating_add(Weight::from_parts(28_028, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: Proxy Proxies (r:1 w:0) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn proxy_announced(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 31_507_000 picoseconds. + Weight::from_parts(31_594_293, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 4_810 + .saturating_add(Weight::from_parts(180_418, 0).saturating_mul(a.into())) + // Standard Error: 4_969 + .saturating_add(Weight::from_parts(39_603, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn remove_announcement(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `332 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 20_284_000 picoseconds. + Weight::from_parts(20_722_105, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 2_298 + .saturating_add(Weight::from_parts(169_410, 0).saturating_mul(a.into())) + // Standard Error: 2_374 + .saturating_add(Weight::from_parts(10_908, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn reject_announcement(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `332 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 20_140_000 picoseconds. + Weight::from_parts(20_848_925, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_778 + .saturating_add(Weight::from_parts(165_375, 0).saturating_mul(a.into())) + // Standard Error: 1_838 + .saturating_add(Weight::from_parts(5_838, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Proxy Proxies (r:1 w:0) + /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: Proxy Announcements (r:1 w:1) + /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn announce(a: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `349 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 28_744_000 picoseconds. + Weight::from_parts(29_073_555, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 3_689 + .saturating_add(Weight::from_parts(157_914, 0).saturating_mul(a.into())) + // Standard Error: 3_812 + .saturating_add(Weight::from_parts(17_443, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// 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 add_proxy(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 21_558_000 picoseconds. + Weight::from_parts(22_491_797, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 4_992 + .saturating_add(Weight::from_parts(46_402, 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 remove_proxy(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 21_541_000 picoseconds. + Weight::from_parts(22_387_406, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 4_158 + .saturating_add(Weight::from_parts(53_564, 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 remove_proxies(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 18_742_000 picoseconds. + Weight::from_parts(19_693_746, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 2_662 + .saturating_add(Weight::from_parts(21_173, 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 { + // Proof Size summary in bytes: + // Measured: `139` + // Estimated: `4706` + // Minimum execution time: 23_280_000 picoseconds. + Weight::from_parts(23_905_541, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_045 + .saturating_add(Weight::from_parts(16_212, 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 `[0, 30]`. + fn kill_pure(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `164 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 19_541_000 picoseconds. + Weight::from_parts(20_085_014, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 3_921 + .saturating_add(Weight::from_parts(58_923, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_timestamp.rs b/system-parachains/encointer/src/weights/pallet_timestamp.rs new file mode 100644 index 0000000000..81a5511734 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_timestamp.rs @@ -0,0 +1,61 @@ + +//! Autogenerated weights for `pallet_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_timestamp.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_timestamp`. +pub struct WeightInfo(PhantomData); +impl pallet_timestamp::WeightInfo for WeightInfo { + /// Storage: Timestamp Now (r:1 w:1) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerScheduler NextPhaseTimestamp (r:1 w:1) + /// Proof: EncointerScheduler NextPhaseTimestamp (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EncointerScheduler CurrentCeremonyIndex (r:1 w:0) + /// Proof: EncointerScheduler CurrentCeremonyIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EncointerScheduler PhaseDurations (r:3 w:0) + /// Proof: EncointerScheduler PhaseDurations (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `201` + // Estimated: `8490` + // Minimum execution time: 37_112_000 picoseconds. + Weight::from_parts(38_652_000, 0) + .saturating_add(Weight::from_parts(0, 8490)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `94` + // Estimated: `0` + // Minimum execution time: 5_720_000 picoseconds. + Weight::from_parts(6_127_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_treasury.rs b/system-parachains/encointer/src/weights/pallet_treasury.rs new file mode 100644 index 0000000000..52b59a25cd --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_treasury.rs @@ -0,0 +1,211 @@ +// 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_treasury` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 + +// Executed Command: +// /builds/polkadot-sdk/target/production/polkadot +// benchmark +// pallet +// --chain=spec-kusama.json +// --pallet=pallet_treasury +// --extrinsic= +// --output=/builds/runtimes/relay/kusama/src/weights +// --header=/builds/bench/header.txt +// --no-median-slopes +// --no-min-squares + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_treasury`. +pub struct WeightInfo(PhantomData); +impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `1887` + // Minimum execution time: 7_563_000 picoseconds. + Weight::from_parts(7_868_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + fn propose_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `107` + // Estimated: `1489` + // Minimum execution time: 16_827_000 picoseconds. + Weight::from_parts(17_262_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Proposals` (r:1 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn reject_proposal() -> Weight { + // Proof Size summary in bytes: + // Measured: `265` + // Estimated: `3593` + // Minimum execution time: 25_789_000 picoseconds. + Weight::from_parts(26_398_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Proposals` (r:1 w:0) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 99]`. + fn approve_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `433 + p * (8 ±0)` + // Estimated: `3573` + // Minimum execution time: 5_353_000 picoseconds. + Weight::from_parts(8_423_989, 0) + .saturating_add(Weight::from_parts(0, 3573)) + // Standard Error: 1_120 + .saturating_add(Weight::from_parts(45_883, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + fn remove_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `1887` + // Minimum execution time: 4_075_000 picoseconds. + Weight::from_parts(4_286_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Treasury::Deactivated` (r:1 w:1) + /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:99 w:99) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:199 w:199) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Bounties::BountyApprovals` (r:1 w:1) + /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 99]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `294 + p * (251 ±0)` + // Estimated: `3593 + p * (5206 ±0)` + // Minimum execution time: 34_895_000 picoseconds. + Weight::from_parts(40_046_318, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 6_188 + .saturating_add(Weight::from_parts(25_772_314, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) + } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 8_598_000 picoseconds. + Weight::from_parts(8_937_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `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::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `251` + // Estimated: `5318` + // Minimum execution time: 29_981_000 picoseconds. + Weight::from_parts(30_787_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `170` + // Estimated: `5318` + // Minimum execution time: 15_985_000 picoseconds. + Weight::from_parts(16_431_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `5318` + // Minimum execution time: 8_515_000 picoseconds. + Weight::from_parts(8_795_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/system-parachains/encointer/src/weights/pallet_utility.rs b/system-parachains/encointer/src/weights/pallet_utility.rs new file mode 100644 index 0000000000..879b30c82c --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_utility.rs @@ -0,0 +1,84 @@ + +//! Autogenerated weights for `pallet_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/encointer-collator +// benchmark +// pallet +// --chain=encointer-rococo-local-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_utility.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_utility`. +pub struct WeightInfo(PhantomData); +impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_709_000 picoseconds. + Weight::from_parts(94_666_060, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 7_075 + .saturating_add(Weight::from_parts(4_763_921, 0).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_625_000 picoseconds. + Weight::from_parts(4_855_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_014_000 picoseconds. + Weight::from_parts(10_865_846, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 4_092 + .saturating_add(Weight::from_parts(5_138_384, 0).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_101_000 picoseconds. + Weight::from_parts(8_401_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_996_000 picoseconds. + Weight::from_parts(4_430_678, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_835 + .saturating_add(Weight::from_parts(4_874_052, 0).saturating_mul(c.into())) + } +} diff --git a/system-parachains/encointer/src/weights/paritydb_weights.rs b/system-parachains/encointer/src/weights/paritydb_weights.rs new file mode 100644 index 0000000000..2567970383 --- /dev/null +++ b/system-parachains/encointer/src/weights/paritydb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +pub mod constants { + 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 { + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[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 sane() { + // 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/system-parachains/encointer/src/weights/rocksdb_weights.rs b/system-parachains/encointer/src/weights/rocksdb_weights.rs new file mode 100644 index 0000000000..3dd817aa6f --- /dev/null +++ b/system-parachains/encointer/src/weights/rocksdb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// 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. + +pub mod constants { + 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 { + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[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 sane() { + // 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/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs new file mode 100644 index 0000000000..0a1b57b07b --- /dev/null +++ b/system-parachains/encointer/src/xcm_config.rs @@ -0,0 +1,237 @@ +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// 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. + +//! Almost identical to ../asset-hubs/asset-hub-kusama + +use super::{ + AccountId, Balances, FeesToTreasury, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, +}; +use frame_support::{ + match_types, parameter_types, + traits::{Everything, Nothing}, + weights::Weight, +}; +use frame_system::EnsureRoot; +use pallet_xcm::XcmPassthrough; +use parachains_common::xcm_config::ConcreteAssetFromSystem; +use polkadot_parachain_primitives::primitives::Sibling; + +use sp_core::ConstU32; + +use xcm::latest::prelude::*; +use xcm_builder::{ + AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, + AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeTerminus, EnsureXcmOrigin, + FixedWeightBounds, HashedDescription, IsConcrete, NativeAsset, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, +}; +use xcm_executor::XcmExecutor; + +parameter_types! { + pub const KsmLocation: MultiLocation = MultiLocation::parent(); + pub const RelayNetwork: NetworkId = NetworkId::Kusama; + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); +} + +/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// when determining ownership of accounts for asset transacting and when attempting to use XCM +/// `Transact` in order to determine the dispatch Origin. +pub type LocationToAccountId = ( + // The parent (Relay-chain) origin converts to the parent `AccountId`. + ParentIsPreset, + // Sibling parachain origins convert to AccountId via the `ParaId::into`. + SiblingParachainConvertsVia, + // Straight up local `AccountId32` origins just alias directly to `AccountId`. + AccountId32Aliases, + // Here/local root location to `AccountId`. + HashedDescription, +); + +/// Means for transacting the native currency on this chain. +pub type CurrencyTransactor = CurrencyAdapter< + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // Convert an XCM MultiLocation into a local account id: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports of `Balances`. + (), +>; + +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. +pub type XcmOriginToTransactDispatchOrigin = ( + // Sovereign account converter; this attempts to derive an `AccountId` from the origin location + // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for + // foreign chains who want to have a local sovereign account on this chain which they control. + SovereignSignedViaLocation, + // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when + // recognised. + RelayChainAsNative, + // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when + // recognised. + SiblingParachainAsNative, + // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a + // transaction from the Root origin. + ParentAsSuperuser, + // Native signed account converter; this just converts an `AccountId32` origin into a normal + // `RuntimeOrigin::Signed` origin of the same 32-byte value. + SignedAccountId32AsNative, + // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. + XcmPassthrough, +); + +parameter_types! { + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 0); + pub const MaxInstructions: u32 = 100; +} + +match_types! { + pub type ParentOrParentsExecutivePlurality: impl Contains = { + MultiLocation { parents: 1, interior: Here } | + MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + }; + pub type ParentOrSiblings: impl Contains = { + MultiLocation { parents: 1, interior: Here } | + MultiLocation { parents: 1, interior: X1(_) } + }; +} + +pub type Barrier = TrailingSetTopicAsId< + DenyThenTry< + DenyReserveTransferToRelayChain, + ( + TakeWeightCredit, + AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution + AllowUnpaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + >, +>; +pub struct SafeCallFilter; +impl frame_support::traits::Contains for SafeCallFilter { + fn contains(_call: &RuntimeCall) -> bool { + // This is safe, as we prevent arbitrary xcm-transact executions. + // For rationale, see:https://github.com/paritytech/polkadot/blob/19fdd197aff085f7f66e54942999fd536e7df475/runtime/kusama/src/xcm_config.rs#L171 + true + } +} + +parameter_types! { + pub const MaxAssetsIntoHolding: u32 = 64; + pub const RelayLocation: MultiLocation = MultiLocation::parent(); +} +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = CurrencyTransactor; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + type IsReserve = NativeAsset; + /// Only allow teleportation of KSM with other system locations. + type IsTeleporter = ConcreteAssetFromSystem; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + // `FeesToTreasury` is an encointer adaptation + type Trader = + UsingComponents>; + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = crate::AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = SafeCallFilter; + type Aliasers = Nothing; +} + +/// Converts a local signed origin into an XCM multilocation. +/// Forms the basis for local origins sending/executing XCMs. +pub type LocalOriginToLocation = SignedToAccountId32; + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = ( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +); + +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + // We want to disallow users sending (arbitrary) XCMs from this chain. + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // We support local origins dispatching XCM executions in principle... + type ExecuteXcmOrigin = EnsureXcmOrigin; + // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are + // allowed. + type XcmExecuteFilter = Nothing; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Everything; + type Weigher = FixedWeightBounds; + 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 = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; + type AdminOrigin = EnsureRoot; + type UniversalLocation = UniversalLocation; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); +} + +impl cumulus_pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} From 7515fc0385f8d48f2d08b2182a24174148e70135 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 17 Jan 2024 21:55:02 +1100 Subject: [PATCH 27/27] Introduce `chain-spec-generator` and document Weight Generation process (#127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/polkadot-fellows/runtimes/issues/50 - Adds the `chain-spec-generator` from https://github.com/polkadot-fellows/runtimes/pull/78 and https://github.com/polkadot-fellows/runtimes/pull/81, updated to work with `master`. - Adds detailed instructions to the `README.md` for generating weights for fellowship runtimes I am currently generating weights and will add them in a seperate PR when they are ready. TODO - [x] Add step for checking weight outputs using https://github.com/ggwpez/substrate-weight-compare in readme - [ ] Fix encointer chain spec defaults, or open new issue for it ### Why not use the `polkadot-sdk` generic chain-spec-builder? The genesis state configs generated by this CLI are unusable for benchmarking, due to poor defaults. We need better defaults for our pallet genesis state before we can use this CLI. See also https://github.com/paritytech/polkadot-sdk/issues/2713. --------- Co-authored-by: Bastian Köcher Co-authored-by: Javier Viola Co-authored-by: NachoPal Co-authored-by: Svyatoslav Nikolsky Co-authored-by: Branislav Kontur Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Bastian Köcher --- CHANGELOG.md | 2 + Cargo.lock | 357 ++++++--- Cargo.toml | 1 + README.md | 1 + chain-spec-generator/Cargo.toml | 54 ++ chain-spec-generator/src/common.rs | 95 +++ chain-spec-generator/src/main.rs | 108 +++ chain-spec-generator/src/relay_chain_specs.rs | 493 ++++++++++++ .../src/system_parachains_specs.rs | 710 ++++++++++++++++++ docs/weight-generation.md | 88 +++ 10 files changed, 1814 insertions(+), 95 deletions(-) create mode 100644 chain-spec-generator/Cargo.toml create mode 100644 chain-spec-generator/src/common.rs create mode 100644 chain-spec-generator/src/main.rs create mode 100644 chain-spec-generator/src/relay_chain_specs.rs create mode 100644 chain-spec-generator/src/system_parachains_specs.rs create mode 100644 docs/weight-generation.md diff --git a/CHANGELOG.md b/CHANGELOG.md index d28e030feb..f9fb769526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Added + +- Introduce chain spec generator ([polkadot-fellows/runtimes#127](https://github.com/polkadot-fellows/runtimes/pull/127)) - Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80)) ## [1.1.0] 10.01.2024 diff --git a/Cargo.lock b/Cargo.lock index f51de76060..51ad1c2b9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -211,9 +211,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -249,12 +249,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -840,7 +840,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -976,7 +976,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -1869,6 +1869,41 @@ dependencies = [ "zeroize", ] +[[package]] +name = "chain-spec-generator" +version = "1.0.0" +dependencies = [ + "asset-hub-kusama-runtime", + "asset-hub-polkadot-runtime", + "bridge-hub-kusama-runtime", + "bridge-hub-polkadot-runtime", + "clap", + "collectives-polkadot-runtime", + "cumulus-primitives-core", + "encointer-kusama-runtime", + "glutton-kusama-runtime", + "hex-literal", + "kusama-runtime-constants", + "pallet-im-online", + "pallet-staking", + "parachains-common", + "polkadot-primitives", + "polkadot-runtime", + "polkadot-runtime-constants", + "polkadot-runtime-parachains", + "sc-chain-spec", + "sc-consensus-grandpa", + "serde", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "staging-kusama-runtime", + "staging-xcm", +] + [[package]] name = "chrono" version = "0.4.27" @@ -1947,9 +1982,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive", @@ -1957,9 +1992,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -1976,7 +2011,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -2563,10 +2598,10 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84baea20d10325b2501b6fa06d4a7902a43d6a6c62c71b5309e75c3ad8ae1441" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -2788,7 +2823,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -2815,7 +2850,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -2832,7 +2867,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3103,23 +3138,23 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] name = "docify" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", @@ -3127,9 +3162,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.38", + "syn 2.0.41", "termcolor", - "toml 0.7.6", + "toml 0.8.2", "walkdir", ] @@ -3466,7 +3501,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3477,7 +3512,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3608,7 +3643,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3656,7 +3691,7 @@ checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", "indexmap 1.9.3", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -3836,10 +3871,10 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3971,7 +4006,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3981,10 +4016,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -3995,7 +4030,7 @@ checksum = "d9c078db2242ea7265faa486004e7fd8daaf1a577cfcac0070ce55d926922883" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -4151,7 +4186,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -5078,7 +5113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -5884,7 +5919,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -5898,7 +5933,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -5909,7 +5944,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -5920,7 +5955,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -6183,7 +6218,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", @@ -6526,7 +6561,7 @@ dependencies = [ "indexmap 2.0.0", "itertools 0.11.0", "petgraph", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -7879,10 +7914,10 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df8878e29f3d001ac1b1b714621f462e41a9d1fa8f385657f955e8a1ec0684d7" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -8250,9 +8285,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -8265,11 +8300,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -8519,7 +8554,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -9127,7 +9162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -9171,15 +9206,6 @@ dependencies = [ "toml_edit 0.19.14", ] -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.2", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -9218,7 +9244,7 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -9264,7 +9290,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -9591,7 +9617,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -10090,10 +10116,10 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25158f791eb48715da9322375598b541cadd1f193674e8a4d77c79ffa3d95d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -10218,6 +10244,48 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-grandpa" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" +dependencies = [ + "ahash 0.8.3", + "array-bytes 6.1.0", + "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + [[package]] name = "sc-executor" version = "0.29.0" @@ -10415,6 +10483,25 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sc-network-gossip" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b884a9f7cd348c4c1899c0bbf95237e39dffba4baec48d4b98c1046f6bb04fa5" +dependencies = [ + "ahash 0.8.3", + "futures", + "futures-timer", + "libp2p", + "log", + "sc-network", + "sc-network-common", + "schnellru", + "sp-runtime", + "substrate-prometheus-endpoint", + "tracing", +] + [[package]] name = "sc-network-light" version = "0.30.0" @@ -10744,10 +10831,10 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c4ae9e4f957d7274ac6b59d667b66262caf6482dbb1b63f1c370528626b1272" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -10830,7 +10917,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -11037,29 +11124,29 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" dependencies = [ "itoa", "ryu", @@ -11238,9 +11325,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "snap" @@ -11333,10 +11420,10 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -11588,7 +11675,7 @@ checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -11609,7 +11696,7 @@ checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -11852,10 +11939,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" dependencies = [ "Inflector", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -12061,7 +12148,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -12551,9 +12638,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -12664,7 +12751,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -12839,7 +12926,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -12911,6 +12998,18 @@ dependencies = [ "toml_edit 0.19.14", ] +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" version = "0.6.3" @@ -12940,6 +13039,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.0.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -13006,7 +13107,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -13049,10 +13150,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35756d8c1a227ec525853a1080bf890d03d939deb2bc50d4d43c96516c795d0d" dependencies = [ "expander 2.0.0", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -13446,7 +13547,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", "wasm-bindgen-shared", ] @@ -13480,7 +13581,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14136,6 +14237,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -14166,6 +14276,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -14178,6 +14303,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -14196,6 +14327,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -14214,6 +14351,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -14232,6 +14375,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -14250,6 +14399,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -14262,6 +14417,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -14280,6 +14441,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" version = "0.5.15" @@ -14410,7 +14577,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -14453,7 +14620,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ffa140147d..d27df9f555 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ license = "GPL-3.0-only" # TODO . + +use crate::{ + relay_chain_specs::{KusamaChainSpec, PolkadotChainSpec}, + system_parachains_specs::{ + AssetHubKusamaChainSpec, AssetHubPolkadotChainSpec, BridgeHubKusamaChainSpec, + BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, EncointerKusamaChainSpec, + GluttonKusamaChainSpec, + }, + ChainSpec, +}; +use polkadot_primitives::{AccountId, AccountPublic}; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::traits::IdentifyAccount; + +pub fn testnet_accounts() -> Vec { + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ] +} + +/// Helper function to generate a crypto pair from seed +pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +/// Helper function to generate an account ID from seed +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +#[derive(Debug, serde::Deserialize)] +struct EmptyChainSpecWithId { + id: String, +} + +pub fn from_json_file(filepath: &str, supported: String) -> Result, String> { + let path = std::path::PathBuf::from(&filepath); + let file = std::fs::File::open(&filepath).expect("Failed to open file"); + let reader = std::io::BufReader::new(file); + let chain_spec: EmptyChainSpecWithId = serde_json::from_reader(reader) + .expect("Failed to read 'json' file with ChainSpec configuration"); + match &chain_spec.id { + x if x.starts_with("polkadot") | x.starts_with("dot") => + Ok(Box::new(PolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("kusama") | x.starts_with("ksm") => + Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("asset-hub-polkadot") => + Ok(Box::new(AssetHubPolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("asset-hub-kusama") => + Ok(Box::new(AssetHubKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("collectives-polkadot") => + Ok(Box::new(CollectivesPolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("bridge-hub-polkadot") => + Ok(Box::new(BridgeHubPolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("bridge-hub-kusama") => + Ok(Box::new(BridgeHubKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("glutton-kusama") => + Ok(Box::new(GluttonKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("encointer-kusama") => + Ok(Box::new(EncointerKusamaChainSpec::from_json_file(path)?)), + _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), + } +} diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs new file mode 100644 index 0000000000..d24cc8766a --- /dev/null +++ b/chain-spec-generator/src/main.rs @@ -0,0 +1,108 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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 . + +use clap::Parser; +use sc_chain_spec::ChainSpec; +use std::collections::HashMap; + +mod common; +mod relay_chain_specs; +mod system_parachains_specs; + +#[derive(Parser)] +struct Cli { + /// The chain spec to generate. + chain: String, + + /// Generate the chain spec as raw? + #[arg(long)] + raw: bool, +} + +fn main() -> Result<(), String> { + let cli = Cli::parse(); + + let supported_chains = + HashMap::<_, Box Result, String>>>::from([ + ( + "polkadot-dev", + Box::new(|| relay_chain_specs::polkadot_development_config()) as Box<_>, + ), + ( + "polkadot-local", + Box::new(|| relay_chain_specs::polkadot_local_testnet_config()) as Box<_>, + ), + ("kusama-dev", Box::new(|| relay_chain_specs::kusama_development_config()) as Box<_>), + ( + "kusama-local", + Box::new(|| relay_chain_specs::kusama_local_testnet_config()) as Box<_>, + ), + ( + "asset-hub-kusama-local", + Box::new(|| system_parachains_specs::asset_hub_kusama_local_testnet_config()) + as Box<_>, + ), + ( + "asset-hub-polkadot-local", + Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config()) + as Box<_>, + ), + ( + "collectives-polkadot-local", + Box::new(|| system_parachains_specs::collectives_polkadot_local_testnet_config()) + as Box<_>, + ), + ( + "bridge-hub-polkadot-local", + Box::new(|| system_parachains_specs::bridge_hub_polkadot_local_testnet_config()) + as Box<_>, + ), + ( + "bridge-hub-kusama-local", + Box::new(|| system_parachains_specs::bridge_hub_kusama_local_testnet_config()) + as Box<_>, + ), + ( + "glutton-kusama-local", + Box::new(|| system_parachains_specs::glutton_kusama_local_testnet_config()) + as Box<_>, + ), + ( + "encointer-kusama-local", + Box::new(|| system_parachains_specs::encointer_kusama_local_testnet_config()) + as Box<_>, + ), + ]); + + if let Some(function) = supported_chains.get(&*cli.chain) { + let chain_spec = (*function)()?.as_json(cli.raw)?; + print!("{chain_spec}"); + Ok(()) + } else { + let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { + let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); + format!("{c}{k}{extra}") + }); + if cli.chain.ends_with(".json") { + let chain_spec = common::from_json_file(&cli.chain, supported)?.as_json(cli.raw)?; + print!("{chain_spec}"); + Ok(()) + } else { + Err(format!("Unknown chain, only supported: {supported} or a json file")) + } + } +} diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs new file mode 100644 index 0000000000..b6b58ba5d8 --- /dev/null +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -0,0 +1,493 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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 . + +use kusama_runtime_constants::currency::UNITS as KSM; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use pallet_staking::Forcing; +use polkadot_primitives::{AccountId, AccountPublic, AssignmentId, ValidatorId}; +use polkadot_runtime_constants::currency::UNITS as DOT; +use polkadot_runtime_parachains::configuration::HostConfiguration; +use sc_chain_spec::{ChainSpec, ChainType, NoExtension}; +use sc_consensus_grandpa::AuthorityId as GrandpaId; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::{traits::IdentifyAccount, Perbill}; + +pub type PolkadotChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type KusamaChainSpec = + sc_chain_spec::GenericChainSpec; + +const DEFAULT_PROTOCOL_ID: &str = "dot"; + +/// Returns the properties for the [`PolkadotChainSpec`]. +pub fn polkadot_chain_spec_properties() -> serde_json::map::Map { + serde_json::json!({ + "tokenDecimals": 10, + }) + .as_object() + .expect("Map given; qed") + .clone() +} + +fn default_parachains_host_configuration() -> HostConfiguration { + use polkadot_primitives::{MAX_CODE_SIZE, MAX_POV_SIZE}; + + polkadot_runtime_parachains::configuration::HostConfiguration { + validation_upgrade_cooldown: 2u32, + validation_upgrade_delay: 2, + code_retention_period: 1200, + max_code_size: MAX_CODE_SIZE, + max_pov_size: MAX_POV_SIZE, + max_head_data_size: 32 * 1024, + group_rotation_frequency: 20, + paras_availability_period: 4, + max_upward_queue_count: 8, + max_upward_queue_size: 1024 * 1024, + max_downward_message_size: 1024 * 1024, + max_upward_message_size: 50 * 1024, + max_upward_message_num_per_candidate: 5, + hrmp_sender_deposit: 0, + hrmp_recipient_deposit: 0, + hrmp_channel_max_capacity: 8, + hrmp_channel_max_total_size: 8 * 1024, + hrmp_max_parachain_inbound_channels: 4, + hrmp_channel_max_message_size: 1024 * 1024, + hrmp_max_parachain_outbound_channels: 4, + hrmp_max_message_num_per_candidate: 5, + dispute_period: 6, + no_show_slots: 2, + n_delay_tranches: 25, + needed_approvals: 2, + relay_vrf_modulo_samples: 2, + zeroth_delay_tranche_width: 0, + minimum_validation_upgrade_delay: 5, + ..Default::default() + } +} + +fn polkadot_session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, +) -> polkadot_runtime::SessionKeys { + polkadot_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } +} + +fn kusama_session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, +) -> kusama_runtime::SessionKeys { + kusama_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } +} + +/// Helper function to generate a crypto pair from seed +pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +/// Helper function to generate an account ID from seed +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +/// Helper function to generate stash, controller and session key from seed +pub fn get_authority_keys_from_seed( + seed: &str, +) -> ( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, +) { + let keys = get_authority_keys_from_seed_no_beefy(seed); + (keys.0, keys.1, keys.2, keys.3, keys.4, keys.5, keys.6, keys.7, get_from_seed::(seed)) +} + +/// Helper function to generate stash, controller and session key from seed +pub fn get_authority_keys_from_seed_no_beefy( + seed: &str, +) -> ( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, +) { + ( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + ) +} + +fn testnet_accounts() -> Vec { + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ] +} + +pub fn polkadot_testnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )>, + _root_key: AccountId, + endowed_accounts: Option>, +) -> polkadot_runtime::RuntimeGenesisConfig { + let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); + + const ENDOWMENT: u128 = 1_000_000 * DOT; + const STASH: u128 = 100 * DOT; + + polkadot_runtime::RuntimeGenesisConfig { + beefy: Default::default(), + system: polkadot_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, + indices: polkadot_runtime::IndicesConfig { indices: vec![] }, + balances: polkadot_runtime::BalancesConfig { + balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + session: polkadot_runtime::SessionConfig { + keys: initial_authorities + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + polkadot_session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + staking: polkadot_runtime::StakingConfig { + minimum_validator_count: 1, + validator_count: initial_authorities.len() as u32, + stakers: initial_authorities + .iter() + .map(|x| { + (x.0.clone(), x.0.clone(), STASH, polkadot_runtime::StakerStatus::Validator) + }) + .collect(), + invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), + force_era: Forcing::NotForcing, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: polkadot_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + grandpa: Default::default(), + im_online: Default::default(), + authority_discovery: polkadot_runtime::AuthorityDiscoveryConfig { + keys: vec![], + ..Default::default() + }, + claims: polkadot_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, + vesting: polkadot_runtime::VestingConfig { vesting: vec![] }, + treasury: Default::default(), + hrmp: Default::default(), + configuration: polkadot_runtime::ConfigurationConfig { + config: default_parachains_host_configuration(), + }, + paras: Default::default(), + xcm_pallet: Default::default(), + nomination_pools: Default::default(), + } +} + +/// Helper function to create kusama `RuntimeGenesisConfig` for testing +pub fn kusama_testnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )>, + _root_key: AccountId, + endowed_accounts: Option>, +) -> kusama_runtime::RuntimeGenesisConfig { + let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); + + const ENDOWMENT: u128 = 1_000_000 * KSM; + const STASH: u128 = 100 * KSM; + + kusama_runtime::RuntimeGenesisConfig { + system: kusama_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, + indices: kusama_runtime::IndicesConfig { indices: vec![] }, + balances: kusama_runtime::BalancesConfig { + balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + beefy: Default::default(), + session: kusama_runtime::SessionConfig { + keys: initial_authorities + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + kusama_session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + staking: kusama_runtime::StakingConfig { + minimum_validator_count: 1, + validator_count: initial_authorities.len() as u32, + stakers: initial_authorities + .iter() + .map(|x| (x.0.clone(), x.0.clone(), STASH, kusama_runtime::StakerStatus::Validator)) + .collect(), + invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), + force_era: Forcing::NotForcing, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: kusama_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + grandpa: Default::default(), + im_online: Default::default(), + authority_discovery: kusama_runtime::AuthorityDiscoveryConfig { + keys: vec![], + ..Default::default() + }, + claims: kusama_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, + vesting: kusama_runtime::VestingConfig { vesting: vec![] }, + treasury: Default::default(), + hrmp: Default::default(), + configuration: kusama_runtime::ConfigurationConfig { + config: default_parachains_host_configuration(), + }, + paras: Default::default(), + xcm_pallet: Default::default(), + nomination_pools: Default::default(), + nis_counterpart_balances: Default::default(), + } +} + +fn polkadot_development_config_genesis( + wasm_binary: &[u8], +) -> polkadot_runtime::RuntimeGenesisConfig { + polkadot_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed("Alice")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { + kusama_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed("Alice")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +/// Polkadot development config (single validator Alice) +pub fn polkadot_development_config() -> Result, String> { + let wasm_binary = + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; + + Ok(Box::new(PolkadotChainSpec::from_genesis( + "Polakdot Development", + "polkadot-dev", + ChainType::Development, + move || polkadot_development_config_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + Some(polkadot_chain_spec_properties()), + Default::default(), + ))) +} + +/// Kusama development config (single validator Alice) +pub fn kusama_development_config() -> Result, String> { + let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; + + Ok(Box::new(KusamaChainSpec::from_genesis( + "Kusama Development", + "kusama-dev", + ChainType::Development, + move || kusama_development_config_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + None, + Default::default(), + ))) +} + +fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::RuntimeGenesisConfig { + polkadot_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +/// Polkadot local testnet config (multivalidator Alice + Bob) +pub fn polkadot_local_testnet_config() -> Result, String> { + let wasm_binary = + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; + + Ok(Box::new(PolkadotChainSpec::from_genesis( + "Polkadot Local Testnet", + "polkadot-local", + ChainType::Local, + move || polkadot_local_testnet_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + Some(polkadot_chain_spec_properties()), + Default::default(), + ))) +} + +fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { + kusama_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +/// Kusama local testnet config (multivalidator Alice + Bob) +pub fn kusama_local_testnet_config() -> Result, String> { + let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; + + Ok(Box::new(KusamaChainSpec::from_genesis( + "Kusama Local Testnet", + "kusama-local", + ChainType::Local, + move || kusama_local_testnet_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + None, + Default::default(), + ))) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_parachains_host_configuration_is_consistent() { + default_parachains_host_configuration().panic_if_not_consistent(); + } +} diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs new file mode 100644 index 0000000000..83d7caa0af --- /dev/null +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -0,0 +1,710 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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 . + +use crate::common::{get_account_id_from_seed, get_from_seed, testnet_accounts}; +use cumulus_primitives_core::ParaId; +use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance}; +use sc_chain_spec::{ChainSpec, ChainSpecExtension, ChainSpecGroup, ChainType}; +use serde::{Deserialize, Serialize}; +use sp_core::sr25519; + +/// Generic extensions for Parachain ChainSpecs. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)] +#[serde(deny_unknown_fields)] +pub struct Extensions { + /// The relay chain of the Parachain. + pub relay_chain: String, + /// The id of the Parachain. + pub para_id: u32, +} + +pub type AssetHubPolkadotChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type AssetHubKusamaChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type CollectivesPolkadotChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type BridgeHubPolkadotChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type BridgeHubKusamaChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type GluttonKusamaChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type EncointerKusamaChainSpec = + sc_chain_spec::GenericChainSpec; + +const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + +const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + +const COLLECTIVES_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + +const BRIDGE_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + +const BRIDGE_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + +const ENCOINTER_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + +/// The default XCM version to set in genesis config. +const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; + +/// Invulnerable Collators +pub fn invulnerables() -> Vec<(AccountId, AuraId)> { + vec![ + (get_account_id_from_seed::("Alice"), get_from_seed::("Alice")), + (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), + ] +} + +/// Invulnerable Collators for the particular case of AssetHubPolkadot +pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_from_seed::("Bob"), + ), + ] +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn asset_hub_polkadot_session_keys( + keys: AssetHubPolkadotAuraId, +) -> asset_hub_polkadot_runtime::SessionKeys { + asset_hub_polkadot_runtime::SessionKeys { aura: keys } +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn asset_hub_kusama_session_keys(keys: AuraId) -> asset_hub_kusama_runtime::SessionKeys { + asset_hub_kusama_runtime::SessionKeys { aura: keys } +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn collectives_polkadot_session_keys( + keys: AuraId, +) -> collectives_polkadot_runtime::SessionKeys { + collectives_polkadot_runtime::SessionKeys { aura: keys } +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn bridge_hub_polkadot_session_keys(keys: AuraId) -> bridge_hub_polkadot_runtime::SessionKeys { + bridge_hub_polkadot_runtime::SessionKeys { aura: keys } +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn bridge_hub_kusama_session_keys(keys: AuraId) -> bridge_hub_kusama_runtime::SessionKeys { + bridge_hub_kusama_runtime::SessionKeys { aura: keys } +} + +// AssetHubPolkadot +fn asset_hub_polkadot_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { + asset_hub_polkadot_runtime::RuntimeGenesisConfig { + system: asset_hub_polkadot_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: asset_hub_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, + ..Default::default() + }, + session: asset_hub_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn asset_hub_polkadot_local_genesis( + wasm_binary: &[u8], +) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { + asset_hub_polkadot_genesis( + // initial collators. + wasm_binary, + invulnerables_asset_hub_polkadot(), + testnet_accounts(), + 1000.into(), + ) +} + +pub fn asset_hub_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + let wasm_binary = + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + + Ok(Box::new(AssetHubPolkadotChainSpec::from_genesis( + // Name + "Polkadot Asset Hub Local", + // ID + "asset-hub-polkadot-local", + ChainType::Local, + move || asset_hub_polkadot_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, + ))) +} + +// AssetHubKusama +fn asset_hub_kusama_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { + asset_hub_kusama_runtime::RuntimeGenesisConfig { + system: asset_hub_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: asset_hub_kusama_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, ASSET_HUB_KUSAMA_ED * 4096)) + .collect(), + }, + parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ASSET_HUB_KUSAMA_ED * 16, + ..Default::default() + }, + session: asset_hub_kusama_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_kusama_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn asset_hub_kusama_local_genesis( + wasm_binary: &[u8], +) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { + asset_hub_kusama_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1000.into(), + ) +} + +pub fn asset_hub_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + asset_hub_kusama_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; + + Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( + // Name + "Kusama Asset Hub Local", + // ID + "asset-hub-kusama-local", + ChainType::Local, + move || asset_hub_kusama_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, + ))) +} + +// CollectivesPolkadot +fn collectives_polkadot_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> collectives_polkadot_runtime::RuntimeGenesisConfig { + collectives_polkadot_runtime::RuntimeGenesisConfig { + system: collectives_polkadot_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: collectives_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: COLLECTIVES_POLKADOT_ED * 16, + ..Default::default() + }, + session: collectives_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + collectives_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + alliance: Default::default(), + alliance_motion: Default::default(), + } +} + +fn collectives_polkadot_local_genesis( + wasm_binary: &[u8], +) -> collectives_polkadot_runtime::RuntimeGenesisConfig { + collectives_polkadot_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1001.into(), + ) +} + +pub fn collectives_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + let wasm_binary = collectives_polkadot_runtime::WASM_BINARY + .ok_or("CollectivesPolkadot wasm not available")?; + + Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( + // Name + "Polkadot Collectives Local", + // ID + "collectives-polkadot-local", + ChainType::Local, + move || collectives_polkadot_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1001 }, + ))) +} + +// BridgeHubPolkadot +fn bridge_hub_polkadot_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + system: bridge_hub_polkadot_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: bridge_hub_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: BRIDGE_HUB_POLKADOT_ED * 16, + ..Default::default() + }, + session: bridge_hub_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + bridge_kusama_grandpa: Default::default(), + bridge_kusama_messages: Default::default(), + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn bridge_hub_polkadot_local_genesis( + wasm_binary: &[u8], +) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + bridge_hub_polkadot_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1002.into(), + ) +} + +pub fn bridge_hub_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + let wasm_binary = + bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubPolkadot wasm not available")?; + + Ok(Box::new(BridgeHubPolkadotChainSpec::from_genesis( + // Name + "Polkadot Bridge Hub Local", + // ID + "bridge-hub-polkadot-local", + ChainType::Local, + move || bridge_hub_polkadot_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, + ))) +} + +// BridgeHubKusama +fn bridge_hub_kusama_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { + bridge_hub_kusama_runtime::RuntimeGenesisConfig { + system: bridge_hub_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: bridge_hub_kusama_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 4096)) + .collect(), + }, + parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: BRIDGE_HUB_KUSAMA_ED * 16, + ..Default::default() + }, + session: bridge_hub_kusama_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_kusama_session_keys(aura), // session keys + ) + }) + .collect(), + }, + bridge_polkadot_grandpa: Default::default(), + bridge_polkadot_messages: Default::default(), + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn bridge_hub_kusama_local_genesis( + wasm_binary: &[u8], +) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { + bridge_hub_kusama_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1002.into(), + ) +} + +pub fn bridge_hub_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + bridge_hub_kusama_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; + + Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( + // Name + "Kusama Bridge Hub Local", + // ID + "bridge-hub-kusama-local", + ChainType::Local, + move || bridge_hub_kusama_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, + ))) +} + +// GluttonKusama +fn glutton_kusama_genesis( + wasm_binary: &[u8], + id: ParaId, +) -> glutton_kusama_runtime::RuntimeGenesisConfig { + glutton_kusama_runtime::RuntimeGenesisConfig { + system: glutton_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + glutton: Default::default(), + sudo: Default::default(), + parachain_system: Default::default(), + parachain_info: glutton_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + } +} + +fn glutton_kusama_local_genesis( + wasm_binary: &[u8], +) -> glutton_kusama_runtime::RuntimeGenesisConfig { + glutton_kusama_genesis(wasm_binary, 1002.into()) +} + +pub fn glutton_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + glutton_kusama_runtime::WASM_BINARY.ok_or("GluttonKusama wasm not available")?; + + Ok(Box::new(GluttonKusamaChainSpec::from_genesis( + // Name + "Glutton Kusama Local", + // ID + "glutton-kusama-local", + ChainType::Local, + move || glutton_kusama_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, + ))) +} + +// EncointerKusama +fn encointer_kusama_genesis( + wasm_binary: &[u8], + endowed_accounts: Vec, + id: ParaId, +) -> encointer_kusama_runtime::RuntimeGenesisConfig { + encointer_kusama_runtime::RuntimeGenesisConfig { + system: encointer_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: encointer_kusama_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, ENCOINTER_KUSAMA_ED * 4096)) + .collect(), + }, + parachain_info: encointer_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collective: Default::default(), + encointer_balances: Default::default(), + encointer_ceremonies: Default::default(), + encointer_communities: Default::default(), + encointer_faucet: Default::default(), + encointer_scheduler: Default::default(), + membership: Default::default(), + treasury: Default::default(), + aura: encointer_kusama_runtime::AuraConfig { + authorities: vec![get_from_seed::("Alice").into()], + }, + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: encointer_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn encointer_kusama_local_genesis( + wasm_binary: &[u8], +) -> encointer_kusama_runtime::RuntimeGenesisConfig { + encointer_kusama_genesis( + // initial collators. + wasm_binary, + testnet_accounts(), + 1001.into(), + ) +} + +pub fn encointer_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + encointer_kusama_runtime::WASM_BINARY.ok_or("EncointerKusama wasm not available")?; + + Ok(Box::new(EncointerKusamaChainSpec::from_genesis( + // Name + "Kusama Encointer Local", + // ID + "encointer-kusama-local", + ChainType::Local, + move || encointer_kusama_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1001 }, + ))) +} diff --git a/docs/weight-generation.md b/docs/weight-generation.md new file mode 100644 index 0000000000..9a1eae34e7 --- /dev/null +++ b/docs/weight-generation.md @@ -0,0 +1,88 @@ +# Weight Generation + +To generate weights for a runtime + +1. Build `chain-spec-generator` with `--profile production --features runtime-benchmarks` +2. Use it to build a chain spec for your runtime, e.g. `./target/production/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` +3. Create `file_header.txt` + +```text +// 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. +``` + +4. `rsync` chain spec/s and the file header to a benchmark machine + +5. Build `polkadot` binary from the latest release of `polkadot-sdk` with `--profile production --features runtime-benchmarks --bin polkadot` on the benchmark machine + +6. Run on the benchmark machine: + +```bash +#!/bin/bash + +# Default value is 'polkadot', but you can override it by passing a different value as an argument +CHAIN=${1:-polkadot} + +pallets=($( + ./target/production/polkadot benchmark pallet --list \ + --chain=./$CHAIN-chain-spec.json | + tail -n+2 | + cut -d',' -f1 | + sort | + uniq +)); + +mkdir -p ./$CHAIN-weights +for pallet in "${pallets[@]}"; do + output_file=./$CHAIN-weights/ + # a little hack for pallet_xcm_benchmarks - we want to output them to a nested directory + if [[ "$pallet" == "pallet_xcm_benchmarks::generic" ]] || [[ "$pallet" == "pallet_xcm_benchmarks::fungible" ]]; then + mkdir -p ./$CHAIN-weights/xcm + output_file="${output_file}xcm/${pallet//::/_}.rs" + fi + echo "Running benchmarks for $pallet to $output_file" + ./target/production/polkadot benchmark pallet \ + --chain=./$CHAIN-chain-spec.json \ + --steps=50 \ + --repeat=20 \ + --pallet=$pallet \ + --extrinsic=* \ + --wasm-execution=compiled \ + --heap-pages=4096 \ + --output="$output_file" \ + --header=./file_header.txt +done +``` + +You probably want to do this inside a `tmux` session or similar, as it will take a while. + +7. `rsync` the weights back to your local machine, replacing the existing weights. + +8. Manually fix XCM weights by +- Replacing `impl xxx::yyy::WeightInfo for WeightInfo {` with `impl WeightInfo {` +- Marking all functions `pub(crate)` +- Removing any unused functions + +9. Commit the weight changes. + +10. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./**/weights/*.rs" --method asymptotic --ignore-errors HEAD origin/main`. Ensure the changes are reasonable. + +## FAQ + +### What benchmark machine spec should I use? + +See the [Polkadot Wiki Reference Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware). +