From e8599339b6cea3f69307c9b81d378735c5f5eb08 Mon Sep 17 00:00:00 2001 From: Ankan <10196091+Ank4n@users.noreply.github.com> Date: Tue, 21 May 2024 12:12:24 +0200 Subject: [PATCH 01/20] Bump staking and nomination pools (#318) Changes: - Fixes the issue [preventing nomination pools from getting destroyed](https://github.com/paritytech/polkadot-sdk/issues/4440). - Adds a new staking runtime api to Kusama and Polkadot to help with checking if era rewards are pending for a validator. Refer https://github.com/paritytech/polkadot-sdk/pull/4301. --- CHANGELOG.md | 10 ++++++++++ Cargo.lock | 12 ++++++------ Cargo.toml | 6 +++--- relay/kusama/src/lib.rs | 4 ++++ relay/polkadot/src/lib.rs | 4 ++++ 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de9faf665..e88e80691e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ 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 + +- Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) + +### Fixed + +- Handle extra erroneous consumer reference when a nomination pool is destroying ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) + ## [1.2.4] 20.05.2024 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 98cd39b3c7..fecbd67910 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7897,9 +7897,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "26.0.0" +version = "26.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f14519c1c613d2f8c95c27015864c11a37969a23deeba9f6dbaff4276e1b81c" +checksum = "b62091305ec7426e71c3da2b0944c2df5a804109ee4d2e8f4fe34865e049f8ac" dependencies = [ "frame-support", "frame-system", @@ -8182,9 +8182,9 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "29.0.2" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668b7d28c499f0d9f295fad26cf6c342472e21842e3b13bcaaac8536358b2d6c" +checksum = "061b00814eb794a40df4eca7972a7c67b26473cd85cc7c54f5816ae49ad6e11b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8228,9 +8228,9 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "15.0.0" +version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237d7b5a10cb6cba727c3e957fb241776302aa3cce589e6759ba53f50129c1a5" +checksum = "e47c73850103db30b61ef170107afe1ef0dab6905c495bd6dfb57b3c1dd81bc7" dependencies = [ "parity-scale-codec", "sp-api", diff --git a/Cargo.toml b/Cargo.toml index 37d5374525..931205d088 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -128,7 +128,7 @@ pallet-nft-fractionalization = { version = "11.0.0", default-features = false } pallet-nfts = { version = "23.0.0", default-features = false } pallet-nfts-runtime-api = { version = "15.0.0", default-features = false } pallet-nis = { version = "29.0.0", default-features = false } -pallet-nomination-pools = { version = "26.0.0", default-features = false } +pallet-nomination-pools = { version = "26.0.1", default-features = false } pallet-nomination-pools-benchmarking = { version = "27.0.0", default-features = false } pallet-nomination-pools-runtime-api = { version = "24.0.0", default-features = false } pallet-offences = { version = "28.0.0", default-features = false } @@ -143,10 +143,10 @@ pallet-scheduler = { version = "30.0.0", default-features = false } pallet-session = { version = "29.0.0", default-features = false } pallet-session-benchmarking = { version = "29.0.0", default-features = false } pallet-society = { version = "29.0.0", default-features = false } -pallet-staking = { version = "29.0.2", default-features = false } +pallet-staking = { version = "29.0.3", default-features = false } pallet-staking-reward-curve = { version = "11.0.0" } pallet-staking-reward-fn = { version = "20.0.0", default-features = false } -pallet-staking-runtime-api = { version = "15.0.0", default-features = false } +pallet-staking-runtime-api = { version = "15.0.1", default-features = false } pallet-state-trie-migration = { version = "30.0.0", default-features = false } pallet-sudo = { version = "29.0.0", default-features = false } pallet-timestamp = { version = "28.0.0", default-features = false } diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index bdbe026674..fe078da685 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2565,6 +2565,10 @@ sp_api::impl_runtime_apis! { fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { Staking::api_eras_stakers_page_count(era, account) } + + fn pending_rewards(era: sp_staking::EraIndex, account: AccountId) -> bool { + Staking::api_pending_rewards(era, account) + } } impl sp_genesis_builder::GenesisBuilder for Runtime { diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 387727b54f..694dc4c527 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2037,6 +2037,10 @@ sp_api::impl_runtime_apis! { fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { Staking::api_eras_stakers_page_count(era, account) } + + fn pending_rewards(era: sp_staking::EraIndex, account: AccountId) -> bool { + Staking::api_pending_rewards(era, account) + } } impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { From 2fe6f5631a41e1814c3fccb2818cfeebbcc1bb6e Mon Sep 17 00:00:00 2001 From: brenzi Date: Tue, 21 May 2024 15:19:14 +0200 Subject: [PATCH 02/20] [encointer] introduce collator selection and send fees to authors instead of treasury (#270) closes #183 closes #176 closes #146 (should be closed already, but this PR adds more) This PR aligns collator selection and fee distribution logic of Encointer with other system chains and thereby is a small step towards [self-sustainability of infrastructure](https://forum.polkadot.network/t/towards-encointer-self-sustainability/4195) * [x] remove treasury (and leave negligible funds on trsry account) * [x] add collator-selection, session and authorship pallets * [x] instead of burning fees in community currency , send them to block authors like native KSM * [x] remove DMP queue pallet (pure cleanup, no change in functionality) * [x] add migration to inject existing collators as invulnerables * [x] remove applied migrations from release 1.2.0 steps to reproduce the new fee logic: https://gist.github.com/brenzi/ca9e0c326198c73ff2dd0a2e74468053 --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- CHANGELOG.md | 4 +- Cargo.lock | 10 +- Cargo.toml | 2 +- .../src/system_parachains_specs.rs | 17 ++ system-parachains/encointer/Cargo.toml | 22 +- .../encointer/src/deal_with_fees.rs | 45 --- system-parachains/encointer/src/lib.rs | 192 ++++++------ .../encointer/src/migrations_fix.rs | 277 ++++++++--------- .../encointer/src/weights/mod.rs | 3 +- .../src/weights/pallet_collator_selection.rs | 281 ++++++++++++++++++ .../encointer/src/weights/pallet_session.rs | 77 +++++ .../encointer/src/weights/pallet_treasury.rs | 211 ------------- system-parachains/encointer/src/xcm_config.rs | 14 +- 13 files changed, 641 insertions(+), 514 deletions(-) delete mode 100644 system-parachains/encointer/src/deal_with_fees.rs create mode 100644 system-parachains/encointer/src/weights/pallet_collator_selection.rs create mode 100644 system-parachains/encointer/src/weights/pallet_session.rs delete mode 100644 system-parachains/encointer/src/weights/pallet_treasury.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index e88e80691e..c85b89f7a1 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/). ### Fixed - Handle extra erroneous consumer reference when a nomination pool is destroying ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) +- Introduce [Encointer](https://encointer.org) collator selection and send fees to authors instead of treasury ([polkadot-fellows/runtimes#270](https://github.com/polkadot-fellows/runtimes/pull/270)) ## [1.2.4] 20.05.2024 @@ -69,8 +70,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Remove state-trie-migration pallet from kusama, add state trie migration to V1 on polkadot ([polkadot-fellows/runtimes#170](https://github.com/polkadot-fellows/runtimes/pull/170)) - 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)) +- 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)) - Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85)) - Added new "Wish for Change" track ([polkadot-fellows/runtimes#184](https://github.com/polkadot-fellows/runtimes/pull/184)) - Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) diff --git a/Cargo.lock b/Cargo.lock index fecbd67910..f9a124c27a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3551,6 +3551,7 @@ version = "1.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", @@ -3571,7 +3572,9 @@ dependencies = [ "log", "pallet-asset-tx-payment", "pallet-aura", + "pallet-authorship", "pallet-balances", + "pallet-collator-selection", "pallet-collective", "pallet-encointer-balances", "pallet-encointer-bazaar", @@ -3588,10 +3591,10 @@ dependencies = [ "pallet-message-queue", "pallet-proxy", "pallet-scheduler", + "pallet-session", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -7557,9 +7560,9 @@ dependencies = [ [[package]] name = "pallet-encointer-faucet" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef912a2cdd0f586054d5df1078037ef324fd64515671d6630cfbd1787c4ebe2a" +checksum = "3024bc49c1fd7fffa68f4aa636b199c7a0772690049d0471a6b60d17080024d8" dependencies = [ "approx", "encointer-primitives", @@ -7569,7 +7572,6 @@ dependencies = [ "log", "pallet-encointer-communities", "pallet-encointer-reputation-commitments", - "pallet-treasury", "parity-scale-codec", "scale-info", "sp-core", diff --git a/Cargo.toml b/Cargo.toml index 931205d088..feaa1e5d57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,7 +111,7 @@ pallet-encointer-ceremonies = { version = "~6.1.0", default-features = false } pallet-encointer-ceremonies-rpc-runtime-api = { version = "~6.1.0", default-features = false } pallet-encointer-communities = { version = "~6.1.0", default-features = false } pallet-encointer-communities-rpc-runtime-api = { version = "~6.1.0", default-features = false } -pallet-encointer-faucet = { version = "~6.1.0", default-features = false } +pallet-encointer-faucet = { version = "~6.2.0", default-features = false } pallet-encointer-reputation-commitments = { version = "~6.1.0", default-features = false } pallet-encointer-scheduler = { version = "~6.1.0", default-features = false } pallet-fast-unstake = { version = "28.0.0", default-features = false } diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 3c2f0c40d2..965b56f9de 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -562,6 +562,23 @@ fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_ parachain_id: id.into(), ..Default::default() }, + "collatorSelection": encointer_kusama_runtime::CollatorSelectionConfig { + invulnerables: invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ENCOINTER_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(), + }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index a36eba2f53..2bbe1e188d 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -10,7 +10,7 @@ version.workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -hex-literal = { optional = true, workspace = true } +hex-literal = { workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } smallvec = { workspace = true } @@ -50,6 +50,7 @@ frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } pallet-asset-tx-payment = { workspace = true } pallet-aura = { features = ["experimental"], workspace = true } +pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-collective = { workspace = true } pallet-insecure-randomness-collective-flip = { workspace = true } @@ -57,15 +58,16 @@ pallet-membership = { workspace = true } pallet-message-queue = { workspace = true } pallet-proxy = { workspace = true } pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } pallet-utility = { workspace = true } sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } @@ -73,7 +75,6 @@ sp-session = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } -sp-genesis-builder = { workspace = true } # Polkadot dependencies pallet-xcm = { workspace = true } @@ -88,11 +89,13 @@ cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-parachain-system = { features = [ "parameterized-consensus-hook", ], workspace = true } +cumulus-pallet-session-benchmarking = { optional = true, workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-utility = { workspace = true } +pallet-collator-selection = { workspace = true } parachain-info = { workspace = true } parachains-common = { workspace = true } polkadot-core-primitives = { workspace = true } @@ -113,6 +116,7 @@ system-parachains-constants = { workspace = true, default-features = true } default = ["std"] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", "cumulus-primitives-utility/runtime-benchmarks", @@ -122,9 +126,9 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "hex-literal", "pallet-asset-tx-payment/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-encointer-balances/runtime-benchmarks", "pallet-encointer-bazaar/runtime-benchmarks", @@ -138,7 +142,6 @@ runtime-benchmarks = [ "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", @@ -153,6 +156,7 @@ std = [ "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking?/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", @@ -172,7 +176,9 @@ std = [ "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", + "pallet-authorship/std", "pallet-balances/std", + "pallet-collator-selection/std", "pallet-collective/std", "pallet-encointer-balances/std", "pallet-encointer-bazaar-rpc-runtime-api/std", @@ -189,10 +195,10 @@ std = [ "pallet-message-queue/std", "pallet-proxy/std", "pallet-scheduler/std", + "pallet-session/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", @@ -234,7 +240,9 @@ try-runtime = [ "frame-try-runtime/try-runtime", "pallet-asset-tx-payment/try-runtime", "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", "pallet-encointer-balances/try-runtime", "pallet-encointer-bazaar/try-runtime", @@ -248,9 +256,9 @@ try-runtime = [ "pallet-message-queue/try-runtime", "pallet-proxy/try-runtime", "pallet-scheduler/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", diff --git a/system-parachains/encointer/src/deal_with_fees.rs b/system-parachains/encointer/src/deal_with_fees.rs deleted file mode 100644 index 3abe942713..0000000000 --- a/system-parachains/encointer/src/deal_with_fees.rs +++ /dev/null @@ -1,45 +0,0 @@ -// 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 index a5aee56894..ad12dc9882 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -31,15 +31,17 @@ #[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 core::marker::PhantomData; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; -use deal_with_fees::FeesToTreasury; -use encointer_balances_tx_payment::{AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance}; +use encointer_balances_tx_payment::{ + AccountIdOf, AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance, +}; pub use encointer_primitives::{ balances::{BalanceEntry, BalanceType, Demurrage}, bazaar::{BusinessData, BusinessIdentifier, OfferingData}, @@ -48,17 +50,16 @@ pub use encointer_primitives::{ communities::{CommunityIdentifier, Location}, scheduler::CeremonyPhaseType, }; -use frame_support::traits::TransformOrigin; -use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; - use frame_support::{ construct_runtime, dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - tokens::{pay::PayFromAccount, ConversionFromAssetBalance, ConversionToAssetBalance}, + fungibles::{Balanced, Credit}, + tokens::ConversionToAssetBalance, ConstBool, ConstU64, Contains, EitherOfDiverse, EqualPrivilegeOnly, InstanceFilter, + TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -67,6 +68,7 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, }; +use pallet_asset_tx_payment::HandleCredit; pub use pallet_encointer_balances::Call as EncointerBalancesCall; pub use pallet_encointer_bazaar::Call as EncointerBazaarCall; pub use pallet_encointer_ceremonies::Call as EncointerCeremoniesCall; @@ -75,6 +77,7 @@ 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}; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; pub use parachains_common::{ impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, @@ -86,9 +89,9 @@ use sp_core::{crypto::KeyTypeId, ConstU32, OpaqueMetadata}; pub use sp_runtime::BuildStorage; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentityLookup, Verify}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, Perbill, Permill, RuntimeDebug, + ApplyExtrinsicResult, Perbill, RuntimeDebug, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -172,6 +175,7 @@ impl Default for ProxyType { Self::Any } } + impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { @@ -239,6 +243,7 @@ parameter_types! { } pub struct BaseFilter; + impl Contains for BaseFilter { fn contains(_c: &RuntimeCall) -> bool { true @@ -318,67 +323,14 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // `FeesToTreasury is an encointer adaptation. type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + 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; - 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 { - 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; @@ -590,6 +542,7 @@ type MoreThanHalfCouncil = EitherOfDiverse< >; pub type CouncilCollective = pallet_collective::Instance1; + impl pallet_collective::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; @@ -617,16 +570,92 @@ impl pallet_membership::Config for Runtime { type WeightInfo = weights::pallet_membership::WeightInfo; } +/// A `HandleCredit` implementation that naively transfers the fees to the block author. +/// Will drop and burn the assets in case the transfer fails. +pub struct AssetsToBlockAuthor(PhantomData); + +impl HandleCredit, pallet_encointer_balances::Pallet> + for AssetsToBlockAuthor +where + R: pallet_authorship::Config + pallet_encointer_balances::Config, + AccountIdOf: From + + Into + + From<[u8; 32]>, +{ + fn handle_credit(credit: Credit, pallet_encointer_balances::Pallet>) { + if let Some(author) = pallet_authorship::Pallet::::author() { + // This only affects fees paid in CC! + + // We will only grant 50% of CC fees to the current block author + // reasoning: If you send 100% to the author, then the author can attempt to increase + // the fee rate by making transactions up to the block limit at zero cost + // (since they pocket the fees). + // In the future, fees might be collected in community treasuries instead of being + // "burned" to dead account 0x00 = 5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM + // See: https://forum.polkadot.network/t/towards-encointer-self-sustainability/4195 + + let half_amount = credit.peek() / 2; + let community_pot = AccountIdOf::::from([0u8; 32]); + + let (author_credit, community_credit) = credit.split(half_amount); + // In case of error: Will drop the result triggering the `OnDrop` of the imbalance. + let _ = pallet_encointer_balances::Pallet::::resolve(&author, author_credit); + let _ = + pallet_encointer_balances::Pallet::::resolve(&community_pot, community_credit); + } + } +} + // 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, + AssetsToBlockAuthor, >; } +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const SessionLength: BlockNumber = 6 * HOURS; +} + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = MoreThanHalfCouncil; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = Period; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = weights::pallet_collator_selection::WeightInfo; +} + construct_runtime! { pub enum Runtime { // System support stuff. @@ -641,6 +670,10 @@ construct_runtime! { TransactionPayment: pallet_transaction_payment = 11, AssetTxPayment: pallet_asset_tx_payment = 12, + // Collator support. the order of these 5 are important and shall not change. + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, Aura: pallet_aura = 23, AuraExt: cumulus_pallet_aura_ext = 24, @@ -653,7 +686,6 @@ construct_runtime! { // Handy utilities. Utility: pallet_utility = 40, - Treasury: pallet_treasury = 43, Proxy: pallet_proxy = 44, Scheduler: pallet_scheduler = 48, @@ -703,14 +735,7 @@ parameter_types! { /// Migrations to apply on runtime upgrade. pub type Migrations = ( frame_support::migrations::RemovePallet, - // 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, + migrations_fix::collator_selection_init::v0::InitInvulnerables, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -733,9 +758,9 @@ mod benches { [pallet_collective, Collective] [pallet_message_queue, MessageQueue] [pallet_membership, Membership] + [pallet_session, SessionBench::] + [pallet_collator_selection, CollatorSelection] [pallet_timestamp, Timestamp] - // todo: treasury will be removed in separate PR, so no need to fix broken benchmarks: https://github.com/polkadot-fellows/runtimes/issues/176 - //[pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_proxy, Proxy] [pallet_encointer_balances, EncointerBalances] @@ -968,6 +993,7 @@ impl_runtime_apis! { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -981,7 +1007,8 @@ impl_runtime_apis! { ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; use frame_support::traits::TrackedStorageKey; - + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + impl cumulus_pallet_session_benchmarking::Config for Runtime {} use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { @@ -1005,8 +1032,6 @@ impl_runtime_apis! { 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(); @@ -1043,17 +1068,6 @@ pub fn aura_config_for_chain_spec(seeds: &[&str]) -> AuraConfig { } } -#[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); - } -} - #[test] fn test_ed_is_one_tenth_of_relay() { let relay_ed = kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT; diff --git a/system-parachains/encointer/src/migrations_fix.rs b/system-parachains/encointer/src/migrations_fix.rs index f5992de5a1..472fbd5852 100644 --- a/system-parachains/encointer/src/migrations_fix.rs +++ b/system-parachains/encointer/src/migrations_fix.rs @@ -17,174 +17,153 @@ // 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 { +pub mod collator_selection_init { use frame_support::traits::OnRuntimeUpgrade; - use pallet_balances::*; #[cfg(feature = "try-runtime")] use sp_runtime::TryRuntimeError; /// The log target. - const TARGET: &str = "runtime::fix::balances::migration"; - pub mod v1 { + const TARGET: &str = "runtime::fix::collator_selection_init"; + pub mod v0 { use super::*; - use frame_support::pallet_prelude::*; - pub struct BruteForceToV1(sp_std::marker::PhantomData); - - impl OnRuntimeUpgrade for BruteForceToV1 { + use crate::SessionKeys; + use codec::EncodeLike; + use frame_support::{pallet_prelude::*, traits::Currency}; + use hex_literal::hex; + use log::info; + use parachains_common::impls::BalanceOf; + use sp_core::{crypto::key_types::AURA, sr25519}; + use sp_std::{vec, vec::Vec}; + + const INVULNERABLE_AURA_A: [u8; 32] = + hex!("5e962096da68302d5c47fce0178d72fab503c4f00a3f1df64856748f0d9dd51e"); + const INVULNERABLE_AURA_B: [u8; 32] = + hex!("0cecb8d1c2c744ca4c5cea57f5d6c40238f4dad17afa213672b8b7d43b80a659"); + const INVULNERABLE_AURA_C: [u8; 32] = + hex!("ca1951a3c4e100fb5a899e7bae3ea124491930a72000c5e4b2775fea27ecf05d"); + const INVULNERABLE_AURA_D: [u8; 32] = + hex!("484b443bd95068b860c92b0f66487b78f58234eca0f88e2adbe80bae4807b809"); + const INVULNERABLE_AURA_E: [u8; 32] = + hex!("6c642fb4b571a5685a869cd291fafd575be47a918b231ba28165e5c0cd0cfa15"); + + const INVULNERABLE_ACCOUNT_A: [u8; 32] = + hex!("920534bf448645557bae98bc7f681bd3ebed13d39bee28e10b193d4073357572"); + const INVULNERABLE_ACCOUNT_B: [u8; 32] = + hex!("76bff5abc7a4fce647fab172c9f016af8f5b5f8c3da56a92b619bbc02989fb71"); + const INVULNERABLE_ACCOUNT_C: [u8; 32] = + hex!("c0e021ab805fa956f29661c4380377e5296c5fa5fc16be26ffd516675a66bf6d"); + const INVULNERABLE_ACCOUNT_D: [u8; 32] = + hex!("9c17e9b360d9ca3cf8e42ce015ab649281d42484e7240020a12f5b16acc0d718"); + const INVULNERABLE_ACCOUNT_E: [u8; 32] = + hex!("2c3b7e77d0a8db2e3389669c4bc8112c34d5d1619cf20edc79c12c57a75f8c19"); + + pub struct InitInvulnerables(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for InitInvulnerables + where + T: frame_system::Config + + pallet_collator_selection::Config + + pallet_session::Config + + pallet_balances::Config, + ::AccountId: From<[u8; 32]>, + ::ValidatorId: From<[u8; 32]>, + ::Keys: From, + ::Balance: From, + ::Balance: EncodeLike< + <::Currency as Currency< + ::AccountId, + >>::Balance, + >, + { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, TryRuntimeError> { - Ok(().encode()) + let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); + Ok((invulnerables_len as u32).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." + let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); + if invulnerables_len > 0 { + info!(target: TARGET, "no need to initialize invulnerables"); + return T::DbWeight::get().reads_writes(1, 0) + } + info!(target: TARGET, "initializing the set of invulnerables"); + + let raw_aura_keys: Vec<[u8; 32]> = vec![ + INVULNERABLE_AURA_A, + INVULNERABLE_AURA_B, + INVULNERABLE_AURA_C, + INVULNERABLE_AURA_D, + INVULNERABLE_AURA_E, + ]; + let raw_account_keys: Vec<[u8; 32]> = vec![ + INVULNERABLE_ACCOUNT_A, + INVULNERABLE_ACCOUNT_B, + INVULNERABLE_ACCOUNT_C, + INVULNERABLE_ACCOUNT_D, + INVULNERABLE_ACCOUNT_E, + ]; + + let validatorids: Vec<::ValidatorId> = + raw_account_keys.iter().map(|&pk| pk.into()).collect(); + + pallet_session::Validators::::put(validatorids); + + let queued_keys: Vec<( + ::ValidatorId, + ::Keys, + )> = raw_account_keys + .iter() + .zip(raw_aura_keys.iter()) + .map(|(&account, &aura)| { + ( + account.into(), + SessionKeys { aura: sr25519::Public::from_raw(aura).into() }.into(), + ) + }) + .collect(); + + pallet_session::QueuedKeys::::put(queued_keys); + + for (&account, &aura) in raw_account_keys.iter().zip(raw_aura_keys.iter()) { + pallet_session::NextKeys::::insert::< + ::ValidatorId, + ::Keys, + >( + account.into(), + SessionKeys { aura: sr25519::Public::from_raw(aura).into() }.into(), ); - return T::DbWeight::get().reads(1) + pallet_session::KeyOwner::::insert::< + _, + ::ValidatorId, + >((AURA, aura.encode()), account.into()); } - 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: sp_std::vec::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: &str = "runtime::fix::scheduler::migration"; + let mut invulnerables: Vec<::AccountId> = + raw_account_keys.iter().map(|&pk| pk.into()).collect(); + invulnerables.sort(); + let invulnerables: BoundedVec<_, T::MaxInvulnerables> = + invulnerables.try_into().unwrap(); + pallet_collator_selection::Invulnerables::::put(invulnerables); - 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>, - } + pallet_collator_selection::CandidacyBond::::put::>( + 5_000_000_000_000u128.into(), + ); - #[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, - >; - - #[cfg(feature = "try-runtime")] - pub(crate) type TaskName = [u8; 32]; - - #[cfg(feature = "try-runtime")] - #[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. - #[allow(dead_code)] - 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) + T::DbWeight::get().reads_writes(0, 4 + 5 * 2) } #[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"); - + fn post_upgrade(state: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { + let invulnerables_len = + pallet_collator_selection::Invulnerables::::get().len() as u32; + let apriori_invulnerables_len: u32 = Decode::decode(&mut state.as_slice()).expect( + "the state parameter should be something that was generated by pre_upgrade", + ); + ensure!( + invulnerables_len > 0, + "invulnerables are empty after initialization. that should not happen" + ); + info!(target: TARGET, "apriori invulnerables: {}, aposteriori: {}", apriori_invulnerables_len, invulnerables_len); Ok(()) } } diff --git a/system-parachains/encointer/src/weights/mod.rs b/system-parachains/encointer/src/weights/mod.rs index a04c849297..321d486ed6 100644 --- a/system-parachains/encointer/src/weights/mod.rs +++ b/system-parachains/encointer/src/weights/mod.rs @@ -25,6 +25,7 @@ pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; pub mod pallet_balances; +pub mod pallet_collator_selection; pub mod pallet_collective; pub mod pallet_encointer_balances; pub mod pallet_encointer_bazaar; @@ -36,8 +37,8 @@ pub mod pallet_encointer_scheduler; pub mod pallet_membership; pub mod pallet_message_queue; pub mod pallet_proxy; +pub mod pallet_session; pub mod pallet_timestamp; -pub mod pallet_treasury; pub mod pallet_utility; pub mod paritydb_weights; pub mod rocksdb_weights; diff --git a/system-parachains/encointer/src/weights/pallet_collator_selection.rs b/system-parachains/encointer/src/weights/pallet_collator_selection.rs new file mode 100644 index 0000000000..bae142fdca --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_collator_selection.rs @@ -0,0 +1,281 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//! Autogenerated weights for `pallet_collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_collator_selection +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights/ +// --header=./file_header.txt + +#![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_collator_selection`. +pub struct WeightInfo(PhantomData); +impl pallet_collator_selection::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:20 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 20]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `196 + b * (79 ±0)` + // Estimated: `1187 + b * (2555 ±0)` + // Minimum execution time: 11_226_000 picoseconds. + Weight::from_parts(8_468_753, 0) + .saturating_add(Weight::from_parts(0, 1187)) + // Standard Error: 5_521 + .saturating_add(Weight::from_parts(3_196_761, 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())) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, 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 `b` is `[1, 19]`. + /// The range of component `c` is `[1, 99]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `794 + b * (32 ±0) + c * (53 ±0)` + // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 38_853_000 picoseconds. + Weight::from_parts(38_821_751, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 10_642 + .saturating_add(Weight::from_parts(102_671, 0).saturating_mul(b.into())) + // Standard Error: 2_017 + .saturating_add(Weight::from_parts(158_479, 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())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[5, 20]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `119 + b * (32 ±0)` + // Estimated: `6287` + // Minimum execution time: 11_265_000 picoseconds. + Weight::from_parts(11_014_480, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_214 + .saturating_add(Weight::from_parts(161_950, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn set_desired_candidates() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_093_000 picoseconds. + Weight::from_parts(4_325_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 100]`. + /// The range of component `k` is `[0, 100]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + c * (182 ±0) + k * (115 ±0)` + // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` + // Minimum execution time: 9_449_000 picoseconds. + Weight::from_parts(9_513_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 155_542 + .saturating_add(Weight::from_parts(5_194_785, 0).saturating_mul(c.into())) + // Standard Error: 155_542 + .saturating_add(Weight::from_parts(4_961_103, 0).saturating_mul(k.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(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `319 + c * (49 ±0)` + // Estimated: `6287` + // Minimum execution time: 23_774_000 picoseconds. + Weight::from_parts(26_546_147, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 1_740 + .saturating_add(Weight::from_parts(123_165, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, 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 `[1, 99]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `764 + c * (52 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 31_024_000 picoseconds. + Weight::from_parts(35_079_112, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_113 + .saturating_add(Weight::from_parts(136_243, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `904 + c * (53 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 48_643_000 picoseconds. + Weight::from_parts(53_241_186, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_631 + .saturating_add(Weight::from_parts(156_227, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// 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 `[3, 100]`. + fn leave_intent(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `347 + c * (48 ±0)` + // Estimated: `6287` + // Minimum execution time: 26_974_000 picoseconds. + Weight::from_parts(30_461_854, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_180 + .saturating_add(Weight::from_parts(134_254, 0).saturating_mul(c.into())) + .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: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + fn note_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `155` + // Estimated: `6196` + // Minimum execution time: 39_365_000 picoseconds. + Weight::from_parts(39_875_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:97 w:97) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + /// The range of component `c` is `[1, 100]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` + // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` + // Minimum execution time: 18_553_000 picoseconds. + Weight::from_parts(18_854_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 280_994 + .saturating_add(Weight::from_parts(12_419_756, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into())) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_session.rs b/system-parachains/encointer/src/weights/pallet_session.rs new file mode 100644 index 0000000000..e3579d5aaf --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_session.rs @@ -0,0 +1,77 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//! Autogenerated weights for `pallet_session` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_session +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights/ +// --header=./file_header.txt + +#![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_session`. +pub struct WeightInfo(PhantomData); +impl pallet_session::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:1 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_keys() -> Weight { + // Proof Size summary in bytes: + // Measured: `297` + // Estimated: `3762` + // Minimum execution time: 15_064_000 picoseconds. + Weight::from_parts(15_441_000, 0) + .saturating_add(Weight::from_parts(0, 3762)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn purge_keys() -> Weight { + // Proof Size summary in bytes: + // Measured: `279` + // Estimated: `3744` + // Minimum execution time: 10_865_000 picoseconds. + Weight::from_parts(11_276_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/encointer/src/weights/pallet_treasury.rs b/system-parachains/encointer/src/weights/pallet_treasury.rs deleted file mode 100644 index 52b59a25cd..0000000000 --- a/system-parachains/encointer/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,211 +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_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/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 6639eecfb3..4ace23f012 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -16,8 +16,8 @@ //! Almost identical to ../asset-hubs/asset-hub-kusama use super::{ - AccountId, Balances, FeesToTreasury, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, @@ -25,7 +25,10 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::xcm_config::{ConcreteAssetFromSystem, ParentRelayOrSiblingParachains}; +use parachains_common::{ + impls::ToStakingPot, + xcm_config::{ConcreteAssetFromSystem, ParentRelayOrSiblingParachains}, +}; use polkadot_parachain_primitives::primitives::Sibling; use sp_core::ConstU32; @@ -111,6 +114,7 @@ parameter_types! { } pub struct ParentOrParentsPlurality; + impl Contains for ParentOrParentsPlurality { fn contains(location: &Location) -> bool { matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) @@ -153,6 +157,7 @@ parameter_types! { pub type TrustedTeleporters = ConcreteAssetFromSystem; pub struct XcmConfig; + impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; @@ -163,9 +168,8 @@ impl xcm_executor::Config for XcmConfig { type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; - // `FeesToTreasury` is an encointer adaptation type Trader = - UsingComponents>; + UsingComponents>; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; From c401ada3b3dc39119baa26a62468592fa5267e13 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 22 May 2024 13:59:05 +0200 Subject: [PATCH 03/20] `up-to-date`: Removed subscription to `auto-merge-bot` (#321) As explained in https://github.com/paritytech/up-to-date-action/issues/18#issuecomment-2122673176, the issue is caused because the `skipped` event is treated as `completed`. Until a better solution is generated, let's remove this event and trigger it only in pushes. This reverts #272 - [x] Does not require a CHANGELOG entry --- .github/workflows/up-to-date.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/up-to-date.yml b/.github/workflows/up-to-date.yml index ccf3277aca..a660979a8a 100644 --- a/.github/workflows/up-to-date.yml +++ b/.github/workflows/up-to-date.yml @@ -4,9 +4,6 @@ on: push: branches: - main - workflow_run: - workflows: [Auto Merge Bot] - types: [completed] jobs: updatePullRequests: @@ -16,7 +13,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: actions/create-github-app-token@v1.9.3 + uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.MERGE_APP_ID }} private-key: ${{ secrets.MERGE_APP_KEY }} From dd8cb5db86a944b7abb4aaef5318b10dbe6eca8b Mon Sep 17 00:00:00 2001 From: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com> Date: Wed, 22 May 2024 15:20:25 +0200 Subject: [PATCH 04/20] Filter out credit purchase call (#312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR aims to filter out credit purchase calls until the credit system is implemented. Otherwise, users may have a chance of locking their funds forever on purchased credits they cannot use. Closes paritytech/polkadot-sdk#4454 --------- Co-authored-by: Bastian Köcher --- CHANGELOG.md | 1 + .../coretime/coretime-kusama/src/lib.rs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c85b89f7a1..3a90bc1708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Kusama chains: allow arbitrary XCM execution ([polkadot-fellows/runtimes#261](https://github.com/polkadot-fellows/runtimes/pull/261)) - Allow everything through XCM SafeCallFilter ([polkadot-fellows/runtimes#285](https://github.com/polkadot-fellows/runtimes/pull/285)) +- Disable Coretime credit purchasing until we have the credit system implemented ([polkadot-fellows/runtimes#312](https://github.com/polkadot-fellows/runtimes/pull/312)) ### Added diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 2236d41a0f..e6b293b9a7 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -37,7 +37,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, TransformOrigin, + ConstBool, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, EverythingBut, + InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -170,9 +171,19 @@ parameter_types! { pub const SS58Prefix: u8 = 2; } +/// Filter out credit purchase calls until the credit system is implemented. Otherwise, users +/// may have chance of locking their funds forever on purchased credits they cannot use. +pub struct IsBrokerCreditPurchaseCall; +impl Contains for IsBrokerCreditPurchaseCall { + fn contains(c: &RuntimeCall) -> bool { + matches!(c, RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. })) + } +} + // Configure FRAME pallets to include in runtime. #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { + type BaseCallFilter = EverythingBut; /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The nonce type for storing how many extrinsics an account has signed. From 65e23d88179c803f60ec3bb4afc3ab89a1e1176a Mon Sep 17 00:00:00 2001 From: Javier Viola <363911+pepoviola@users.noreply.github.com> Date: Wed, 22 May 2024 16:37:30 +0200 Subject: [PATCH 05/20] Add zombienet integration (#307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - [x] Does not require a CHANGELOG entry Hi 👋 , this pr add a very small smoke test as PoC of using [zombienet-sdk](https://github.com/paritytech/zombienet-sdk) with the _runtimes_ repo. The idea is to explore the integration and add more assertions (metrics, logs, etc) and complex scenarios in the future (e.g: test upgrades, mix node's versions, etc). This test use a set of _env vars_ that allow you to specify the images and the provider to use: `POLKADOT_IMAGE` (_default_: docker.io/parity/polkadot:latest) `CUMULUS_IMAGE` (_default_: docker.io/parity/polkadot-parachain:latest) `ZOMBIE_PROVIDER`(_default_: Docker) And needs to have the `chain-spec-generator` binary as part of your `PATH`, any feedback is welcome :) --- Also worth notice that the `chain-spec-generator` tool is compiling all the runtimes, and would be good to only compile the needed ones (polkadot in this case), we can add some feature-gate logic or we can also move _ presets_ to runtimes (ping @michalkucharczyk ). Thanks! --------- Co-authored-by: Bastian Köcher --- .github/workflows/test.yml | 51 + Cargo.lock | 5555 ++++++++++++++--- Cargo.toml | 5 + integration-tests/zombienet/Cargo.toml | 12 + .../zombienet/src/environment.rs | 51 + integration-tests/zombienet/src/lib.rs | 70 + integration-tests/zombienet/tests/smoke.rs | 39 + 7 files changed, 4763 insertions(+), 1020 deletions(-) create mode 100644 integration-tests/zombienet/Cargo.toml create mode 100644 integration-tests/zombienet/src/environment.rs create mode 100644 integration-tests/zombienet/src/lib.rs create mode 100644 integration-tests/zombienet/tests/smoke.rs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2a1a53d8a..647f89dedd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -189,3 +189,54 @@ jobs: env: RUSTFLAGS: "-C debug-assertions -D warnings" SKIP_WASM_BUILD: 1 + + zombienet-smoke: + needs: [build-chain-spec-generator] + runs-on: ubuntu-latest + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # v0.11.0 + with: + access_token: ${{ github.token }} + + - name: Install updates and protobuf-compiler + run: sudo apt update && sudo apt install --assume-yes cmake protobuf-compiler + + - name: Free space on the runner + run: | + df -h + sudo apt -y autoremove --purge + sudo apt -y autoclean + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + df -h + + - name: Checkout + uses: actions/checkout@v3 + + - name: Set rust version via common env file + run: cat .github/env >> $GITHUB_ENV + + - name: Install stable toolchain + run: | + rustup install $RUST_STABLE_VERSION + rustup default $RUST_STABLE_VERSION + rustup target add wasm32-unknown-unknown + rustup component add rust-src + + - name: Fetch cache + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + with: + shared-key: "fellowship-cache-integration-tests" + + - name: Build + run: | + cargo build -p chain-spec-generator --features fast-runtime --release --locked + + - name: Zombienet smoke test + timeout-minutes: 20 + run: | + export PATH=$(pwd)/target/release:$PATH + cargo test --manifest-path integration-tests/zombienet/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index f9a124c27a..b4be08509a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,6 +71,15 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "aes-kw" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fa2b352dcefb5f7f3a5fb840e02665d311d878955380515e4fd50095dd3d8c" +dependencies = [ + "aes", +] + [[package]] name = "ahash" version = "0.7.8" @@ -104,6 +113,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "allocator-api2" version = "0.2.16" @@ -261,9 +285,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "approx" @@ -495,6 +519,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -562,7 +595,7 @@ dependencies = [ "frame-support", "kusama-emulated-chain", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -588,7 +621,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime", + "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -661,18 +694,18 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", "sp-transaction-pool", "sp-version", - "sp-weights", + "sp-weights 28.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -691,7 +724,7 @@ dependencies = [ "frame-support", "parachains-common", "polkadot-emulated-chain", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -718,7 +751,7 @@ dependencies = [ "polkadot-runtime", "polkadot-runtime-common", "polkadot-system-emulated-network", - "sp-runtime", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -788,18 +821,18 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", "sp-transaction-pool", "sp-version", - "sp-weights", + "sp-weights 28.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -828,8 +861,8 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-parachain-info", "staging-xcm", @@ -854,7 +887,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -862,6 +895,19 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "ast_node" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c09c69dffe06d222d072c878c3afe86eee2179806f20503faec97250268b4c24" +dependencies = [ + "pmutil", + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.52", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -873,6 +919,57 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f2776ead772134d55b62dd45e59a79e21612d85d0af729b8b7d3967d601a62a" +dependencies = [ + "concurrent-queue", + "event-listener 5.3.0", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "async-compression" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c90a406b4495d129f00461241616194cb8a032c8d1c53c657f0961d5f8e0498" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite 0.2.13", + "tokio", +] + +[[package]] +name = "async-executor" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock 3.2.0", + "blocking", + "futures-lite", +] + [[package]] name = "async-io" version = "2.2.1" @@ -908,10 +1005,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" dependencies = [ "event-listener 4.0.0", - "event-listener-strategy", + "event-listener-strategy 0.4.0", "pin-project-lite 0.2.13", ] +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +dependencies = [ + "async-channel 2.3.0", + "async-io", + "async-lock 3.2.0", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.3.0", + "futures-lite", + "rustix 0.38.31", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.31", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.74" @@ -936,6 +1088,18 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" version = "1.2.0" @@ -953,6 +1117,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "getrandom 0.2.12", + "instant", + "rand", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -980,6 +1155,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + [[package]] name = "base64" version = "0.13.1" @@ -992,6 +1173,31 @@ version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-simd" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" +dependencies = [ + "simd-abstraction", +] + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref 0.5.1", + "vsimd", +] + [[package]] name = "base64ct" version = "1.6.0" @@ -1007,6 +1213,15 @@ dependencies = [ "serde", ] +[[package]] +name = "better_scoped_tls" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" +dependencies = [ + "scoped-tls", +] + [[package]] name = "binary-merkle-tree" version = "14.0.0" @@ -1053,7 +1268,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.11.0", "rand", "rand_core 0.6.4", "serde", @@ -1075,12 +1290,28 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +[[package]] +name = "bitcoin_hashes" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -1127,6 +1358,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.2" @@ -1135,7 +1376,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1146,7 +1387,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1159,7 +1400,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1168,7 +1409,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding", + "block-padding 0.1.5", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -1201,6 +1442,29 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "blocking" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +dependencies = [ + "async-channel 2.3.0", + "async-lock 3.2.0", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "bounded-collections" version = "0.2.0" @@ -1276,7 +1540,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1294,7 +1558,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1313,8 +1577,8 @@ dependencies = [ "scale-info", "serde", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -1344,7 +1608,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -1361,8 +1625,8 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -1394,8 +1658,8 @@ dependencies = [ "parity-util-mem", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -1410,7 +1674,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -1429,12 +1693,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "trie-db", ] @@ -1451,12 +1715,12 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -1476,8 +1740,8 @@ checksum = "86ff4abe93be7bc1663adc41817b1aa3476fbec953ce361537419924310d5dd4" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -1492,8 +1756,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -1507,7 +1771,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -1540,8 +1804,8 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1626,13 +1890,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -1656,7 +1920,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -1689,8 +1953,8 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1774,13 +2038,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -1824,10 +2088,10 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-keyring", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", "staging-xcm", @@ -1862,16 +2126,37 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "staging-xcm", "staging-xcm-builder", "static_assertions", ] +[[package]] +name = "brotli" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bs58" version = "0.4.0" @@ -1985,6 +2270,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "cc" version = "1.0.83" @@ -2088,8 +2382,8 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm", ] @@ -2104,6 +2398,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -2180,7 +2475,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", "terminal_size", ] @@ -2202,6 +2497,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] + [[package]] name = "coarsetime" version = "0.1.34" @@ -2232,7 +2536,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -2263,8 +2567,8 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-system-emulated-network", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -2323,14 +2627,14 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "sp-api", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -2432,6 +2736,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -2523,11 +2833,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -2806,9 +3116,9 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-aura", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -2825,8 +3135,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -2854,14 +3164,14 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "staging-xcm", "trie-db", @@ -2890,7 +3200,7 @@ dependencies = [ "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -2905,8 +3215,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -2929,9 +3239,9 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -2948,7 +3258,7 @@ dependencies = [ "polkadot-primitives", "sp-api", "sp-consensus-aura", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -2964,9 +3274,9 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "staging-xcm", ] @@ -2980,10 +3290,10 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-inherents", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -2992,9 +3302,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b74f9141190b9f4bf96a947ade46da64097b77f1ebfa8d611c81724250e119" dependencies = [ - "sp-externalities", - "sp-runtime-interface", - "sp-trie", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -3010,8 +3320,8 @@ dependencies = [ "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -3027,10 +3337,10 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -3132,63 +3442,427 @@ dependencies = [ ] [[package]] -name = "data-encoding" -version = "2.5.0" +name = "darling" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] [[package]] -name = "data-encoding-macro" -version = "0.1.14" +name = "darling" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ - "data-encoding", - "data-encoding-macro-internal", + "darling_core 0.20.8", + "darling_macro 0.20.8", ] [[package]] -name = "data-encoding-macro-internal" -version = "0.1.12" +name = "darling_core" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ - "data-encoding", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", "syn 1.0.109", ] [[package]] -name = "der" -version = "0.7.8" +name = "darling_core" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ - "const-oid", - "zeroize", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.52", ] [[package]] -name = "der-parser" -version = "8.2.0" +name = "darling_macro" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "asn1-rs", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "darling_core 0.14.4", + "quote", + "syn 1.0.109", ] [[package]] -name = "deranged" -version = "0.3.10" +name = "darling_macro" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ - "powerfmt", -] + "darling_core 0.20.8", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core 0.9.9", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "data-encoding-macro" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + +[[package]] +name = "data-url" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid", +] + +[[package]] +name = "deno_ast" +version = "0.31.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7b09db895527a94de1305455338926cd2a7003231ba589b7b7b57e8da344f2" +dependencies = [ + "anyhow", + "base64 0.13.1", + "deno_media_type", + "dprint-swc-ext", + "serde", + "swc_atoms", + "swc_common", + "swc_config", + "swc_config_macro", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_codegen_macros", + "swc_ecma_loader", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_transforms_proposal", + "swc_ecma_transforms_react", + "swc_ecma_transforms_typescript", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_eq_ignore_macros", + "swc_macros_common", + "swc_visit", + "swc_visit_macros", + "text_lines", + "url", +] + +[[package]] +name = "deno_console" +version = "0.123.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d2c95a58acd6924e1a6fd2fd250168d72a33829560e2d16503601dea483b986" +dependencies = [ + "deno_core", +] + +[[package]] +name = "deno_core" +version = "0.229.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bba7ed998f57ecd03640a82e6ddef281328b6d4c48c55e9e17cd906bab08020" +dependencies = [ + "anyhow", + "bytes", + "deno_ops", + "deno_unsync", + "futures", + "libc", + "log", + "parking_lot 0.12.1", + "pin-project", + "serde", + "serde_json", + "serde_v8", + "smallvec", + "sourcemap 7.1.1", + "tokio", + "url", + "v8", +] + +[[package]] +name = "deno_crypto" +version = "0.137.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2ec7c7d3e3f8d420ca5f4b0f2c306f69f2659546ce8c0bca75cada741c2d00" +dependencies = [ + "aes", + "aes-gcm", + "aes-kw", + "base64 0.21.6", + "cbc", + "const-oid", + "ctr", + "curve25519-dalek 4.1.2", + "deno_core", + "deno_web", + "elliptic-curve", + "num-traits", + "once_cell", + "p256", + "p384", + "rand", + "ring 0.17.7", + "rsa", + "serde", + "serde_bytes", + "sha1", + "sha2 0.10.8", + "signature", + "spki", + "tokio", + "uuid", + "x25519-dalek 2.0.0", +] + +[[package]] +name = "deno_fetch" +version = "0.147.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a3d87a2ada23581784bf3dc24d9aa693592a3b8c32529709c9b7c1f0f32757f" +dependencies = [ + "bytes", + "data-url", + "deno_core", + "deno_tls", + "dyn-clone", + "http", + "reqwest", + "serde", + "tokio", + "tokio-util", +] + +[[package]] +name = "deno_media_type" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8978229b82552bf8457a0125aa20863f023619cfc21ebb007b1e571d68fd85b" +dependencies = [ + "data-url", + "serde", + "url", +] + +[[package]] +name = "deno_native_certs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4785d0bdc13819b665b71e4fb7e119d859568471e4c245ec5610857e70c9345" +dependencies = [ + "dlopen2", + "dlopen2_derive", + "once_cell", + "rustls-native-certs 0.6.3", + "rustls-pemfile 1.0.4", +] + +[[package]] +name = "deno_net" +version = "0.115.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c046d001c269ecca9e26614247b41c05309b2698c6999c6506e8d73fa0b4cc" +dependencies = [ + "deno_core", + "deno_tls", + "enum-as-inner", + "log", + "pin-project", + "serde", + "socket2 0.5.5", + "tokio", + "trust-dns-proto", + "trust-dns-resolver", +] + +[[package]] +name = "deno_ops" +version = "0.105.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32976e42a50a1ac64d065a9219f5daf82a3ad6938da9d4aa3071890c08e1cd97" +dependencies = [ + "proc-macro-rules", + "proc-macro2", + "quote", + "strum 0.25.0", + "strum_macros 0.25.3", + "syn 2.0.52", + "thiserror", +] + +[[package]] +name = "deno_tls" +version = "0.110.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6e0d8e5f5f8b7458a07ecb36f46c7faf2ba096f34bb758e48d2adfcfaa8669" +dependencies = [ + "deno_core", + "deno_native_certs", + "once_cell", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", + "rustls-webpki 0.101.7", + "serde", + "webpki-roots 0.25.4", +] + +[[package]] +name = "deno_unsync" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d79c7af81e0a5ac75cff7b2fff4d1896e2bff694c688258edf21ef8a519736" +dependencies = [ + "tokio", +] + +[[package]] +name = "deno_url" +version = "0.123.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c59b8d04724435e5df8d7b35149ec4035b059f3f23bf7fd2edadaed3c13b2f" +dependencies = [ + "deno_core", + "serde", + "urlpattern", +] + +[[package]] +name = "deno_web" +version = "0.154.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a054195576d4629bb1dde11756d8ba980f6a7c2805d3f21c83dfde8d0d4bd6f6" +dependencies = [ + "async-trait", + "base64-simd 0.8.0", + "bytes", + "deno_core", + "encoding_rs", + "flate2", + "futures", + "serde", + "tokio", + "uuid", + "windows-sys 0.48.0", +] + +[[package]] +name = "deno_webidl" +version = "0.123.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32dfb321f1b1f48faef5e2ffa94c870204b29c4aa86a37d1b1eb6c7921448286" +dependencies = [ + "deno_core", +] + +[[package]] +name = "deno_websocket" +version = "0.128.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962904d08031473676e5ce303e8181fc3bab91a06bb27795242619667edc11f4" +dependencies = [ + "bytes", + "deno_core", + "deno_net", + "deno_tls", + "fastwebsockets", + "h2", + "http", + "hyper", + "once_cell", + "rustls-tokio-stream", + "serde", + "tokio", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -3314,6 +3988,29 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "dlopen2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bc2c7ed06fd72a8513ded8d0d2f6fd2655a85d6885c48cae8625d80faf28c03" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "docify" version = "0.2.7" @@ -3347,6 +4044,28 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dprint-swc-ext" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2f24ce6b89a06ae3eb08d5d4f88c05d0aef1fa58e2eba8dd92c97b84210c25" +dependencies = [ + "bumpalo", + "num-bigint", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "text_lines", +] + [[package]] name = "dtoa" version = "1.0.9" @@ -3396,6 +4115,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -3439,11 +4159,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.2", + "ed25519", + "hashbrown 0.14.3", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "elliptic-curve" @@ -3457,9 +4192,12 @@ dependencies = [ "ff", "generic-array 0.14.7", "group", + "hkdf", + "pem-rfc7468", "pkcs8", "rand_core 0.6.4", "sec1", + "serdect", "subtle 2.5.0", "zeroize", ] @@ -3491,8 +4229,8 @@ dependencies = [ "sc-consensus-grandpa", "sp-authority-discovery", "sp-consensus-babe", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "xcm-emulator", ] @@ -3503,6 +4241,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + [[package]] name = "encointer-balances-tx-payment" version = "6.1.0" @@ -3517,7 +4264,7 @@ dependencies = [ "pallet-encointer-balances", "pallet-encointer-ceremonies", "pallet-transaction-payment", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -3541,7 +4288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06fb1e51610f1aedf130a9909977943e75de4d44218c60fc73f78b8b410ef872" dependencies = [ "encointer-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -3608,11 +4355,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-transaction-pool", @@ -3635,7 +4382,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -3653,9 +4400,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "substrate-geohash", ] @@ -3733,9 +4480,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "substrate-fixed", ] @@ -3814,6 +4561,17 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "event-listener-strategy" version = "0.4.0" @@ -3824,6 +4582,16 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -3887,6 +4655,23 @@ dependencies = [ "bytes", ] +[[package]] +name = "fastwebsockets" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c35f166afb94b7f8e9449d0ad866daca111ba4053f3b1960bb480ca4382c63" +dependencies = [ + "base64 0.21.6", + "hyper", + "pin-project", + "rand", + "sha1", + "simdutf8", + "thiserror", + "tokio", + "utf-8", +] + [[package]] name = "fatality" version = "0.0.6" @@ -4001,6 +4786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", + "libz-ng-sys", "libz-sys", "miniz_oxide", ] @@ -4020,6 +4806,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "fork-tree" version = "12.0.0" @@ -4060,11 +4861,11 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-std", "sp-storage", "static_assertions", @@ -4104,16 +4905,16 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-database", - "sp-externalities", + "sp-externalities 0.26.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-storage", - "sp-trie", + "sp-trie 30.0.0", "sp-wasm-interface", "thiserror", "thousands", @@ -4142,10 +4943,10 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -4161,13 +4962,24 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", ] +[[package]] +name = "frame-metadata" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "frame-metadata" version = "16.0.0" @@ -4188,15 +5000,15 @@ checksum = "360bfdb6821372164a65933d9a6d5998f38c722360b59b69d2bf78a87ef58b2a" dependencies = [ "futures", "indicatif", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "serde", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "spinners", "substrate-rpc-client", "tokio", @@ -4214,7 +5026,7 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata", + "frame-metadata 16.0.0", "frame-support-procedural", "impl-trait-for-tuples", "k256", @@ -4227,20 +5039,20 @@ dependencies = [ "serde_json", "smallvec", "sp-api", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-crypto-hashing-proc-macro", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-metadata-ir", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-std", "sp-tracing", - "sp-weights", + "sp-weights 28.0.0", "static_assertions", "tt-call", ] @@ -4302,12 +5114,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-version", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -4321,8 +5133,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -4345,10 +5157,22 @@ dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] +[[package]] +name = "from_variant" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ec5dc38ee19078d84a692b1c41181ff9f94331c76cee66ff0208c770b5e54f" +dependencies = [ + "pmutil", + "proc-macro2", + "swc_macros_common", + "syn 2.0.52", +] + [[package]] name = "fs-err" version = "2.11.0" @@ -4368,6 +5192,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fslock" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57eafdd0c16f57161105ae1b98a1238f97645f2f588438b2949c99a2af9616bf" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "funty" version = "2.0.0" @@ -4376,9 +5210,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -4407,9 +5241,9 @@ checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -4429,7 +5263,10 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ + "fastrand", "futures-core", + "futures-io", + "parking", "pin-project-lite 0.2.13", ] @@ -4617,11 +5454,11 @@ dependencies = [ "scale-info", "sp-api", "sp-block-builder", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -4658,7 +5495,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -4720,6 +5557,7 @@ checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash 0.8.8", "allocator-api2", + "serde", ] [[package]] @@ -4749,6 +5587,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + [[package]] name = "hex-literal" version = "0.4.1" @@ -4824,6 +5668,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "hstr" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" +dependencies = [ + "hashbrown 0.14.3", + "new_debug_unreachable", + "once_cell", + "phf", + "rustc-hash", + "triomphe", +] + [[package]] name = "http" version = "0.2.11" @@ -4905,9 +5763,34 @@ dependencies = [ "hyper", "log", "rustls 0.21.10", - "rustls-native-certs", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite 0.2.13", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", "tokio", - "tokio-rustls", + "tokio-native-tls", ] [[package]] @@ -4933,6 +5816,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.2.3" @@ -4983,6 +5872,12 @@ dependencies = [ "windows", ] +[[package]] +name = "if_chain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" + [[package]] name = "impl-codec" version = "0.6.0" @@ -5064,14 +5959,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" version = "0.17.7" @@ -5091,6 +5992,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ + "block-padding 0.3.3", "generic-array 0.14.7", ] @@ -5167,6 +6069,18 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "is-terminal" version = "0.4.9" @@ -5205,6 +6119,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -5229,22 +6152,58 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json-patch" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" +dependencies = [ + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "jsonpath-rust" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06cc127b7c3d270be504572364f9569761a180b981919dd0d87693a7f5fb7829" +dependencies = [ + "pest", + "pest_derive", + "regex", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ - "jsonrpsee-core", - "jsonrpsee-http-client", + "jsonrpsee-core 0.20.3", + "jsonrpsee-http-client 0.20.3", "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types", + "jsonrpsee-types 0.20.3", "jsonrpsee-ws-client", "tokio", "tracing", ] +[[package]] +name = "jsonrpsee" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad" +dependencies = [ + "jsonrpsee-client-transport 0.22.5", + "jsonrpsee-core 0.22.5", + "jsonrpsee-http-client 0.22.5", + "jsonrpsee-types 0.22.5", +] + [[package]] name = "jsonrpsee-client-transport" version = "0.20.3" @@ -5253,13 +6212,34 @@ checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", - "jsonrpsee-core", + "jsonrpsee-core 0.20.3", + "pin-project", + "rustls-native-certs 0.6.3", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa" +dependencies = [ + "futures-util", + "http", + "jsonrpsee-core 0.22.5", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.7.0", + "rustls-pki-types", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-util", "tracing", "url", @@ -5278,7 +6258,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.20.3", "parking_lot 0.12.1", "rand", "rustc-hash", @@ -5290,6 +6270,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-core" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" +dependencies = [ + "anyhow", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.22.5", + "pin-project", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + [[package]] name = "jsonrpsee-http-client" version = "0.20.3" @@ -5299,8 +6302,28 @@ dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ccf93fc4a0bfe05d851d37d7c32b7f370fe94336b52a2f0efc5f1981895c2e5" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.22.5", + "jsonrpsee-types 0.22.5", "serde", "serde_json", "thiserror", @@ -5332,8 +6355,8 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", "route-recognizer", "serde", "serde_json", @@ -5361,31 +6384,59 @@ dependencies = [ ] [[package]] -name = "jsonrpsee-ws-client" -version = "0.20.3" +name = "jsonrpsee-types" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +checksum = "150d6168405890a7a3231a3c74843f58b8959471f6df76078db2619ddee1d07d" dependencies = [ - "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", - "url", -] - + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +dependencies = [ + "http", + "jsonrpsee-client-transport 0.20.3", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "url", +] + [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2 0.10.8", ] +[[package]] +name = "k8s-openapi" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc3606fd16aca7989db2f84bb25684d0270c6d6fa1dbcd0025af7b4130523a6" +dependencies = [ + "base64 0.21.6", + "bytes", + "chrono", + "serde", + "serde-value", + "serde_json", +] + [[package]] name = "keccak" version = "0.1.4" @@ -5401,6 +6452,99 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" +[[package]] +name = "kube" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3499c8d60c763246c7a213f51caac1e9033f46026904cb89bc8951ae8601f26e" +dependencies = [ + "k8s-openapi", + "kube-client", + "kube-core", + "kube-runtime", +] + +[[package]] +name = "kube-client" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "033450dfa0762130565890dadf2f8835faedf749376ca13345bcd8ecd6b5f29f" +dependencies = [ + "base64 0.21.6", + "bytes", + "chrono", + "either", + "futures", + "home", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-timeout", + "jsonpath-rust", + "k8s-openapi", + "kube-core", + "pem 3.0.4", + "pin-project", + "rand", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", + "secrecy", + "serde", + "serde_json", + "serde_yaml", + "thiserror", + "tokio", + "tokio-tungstenite", + "tokio-util", + "tower", + "tower-http", + "tracing", +] + +[[package]] +name = "kube-core" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5bba93d054786eba7994d03ce522f368ef7d48c88a1826faa28478d85fb63ae" +dependencies = [ + "chrono", + "form_urlencoded", + "http", + "json-patch", + "k8s-openapi", + "once_cell", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "kube-runtime" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d8893eb18fbf6bb6c80ef6ee7dd11ec32b1dc3c034c988ac1b3a84d46a230ae" +dependencies = [ + "ahash 0.8.8", + "async-trait", + "backoff", + "derivative", + "futures", + "hashbrown 0.14.3", + "json-patch", + "k8s-openapi", + "kube-client", + "parking_lot 0.12.1", + "pin-project", + "serde", + "serde_json", + "smallvec", + "thiserror", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "kusama-emulated-chain" version = "1.0.0" @@ -5413,7 +6557,7 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "staging-kusama-runtime", ] @@ -5439,9 +6583,9 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", "staging-xcm-builder", ] @@ -5506,6 +6650,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "lazycell" @@ -5546,12 +6693,12 @@ dependencies = [ "futures-timer", "getrandom 0.2.12", "instant", - "libp2p-allow-block-list", - "libp2p-connection-limits", - "libp2p-core", + "libp2p-allow-block-list 0.1.1", + "libp2p-connection-limits 0.1.0", + "libp2p-core 0.39.2", "libp2p-dns", "libp2p-identify", - "libp2p-identity", + "libp2p-identity 0.1.3", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", @@ -5559,24 +6706,59 @@ dependencies = [ "libp2p-ping", "libp2p-quic", "libp2p-request-response", - "libp2p-swarm", + "libp2p-swarm 0.42.2", "libp2p-tcp", "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "multiaddr", + "multiaddr 0.17.1", "pin-project", ] +[[package]] +name = "libp2p" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94495eb319a85b70a68b85e2389a95bb3555c71c49025b78c691a854a7e6464" +dependencies = [ + "bytes", + "either", + "futures", + "futures-timer", + "getrandom 0.2.12", + "instant", + "libp2p-allow-block-list 0.2.0", + "libp2p-connection-limits 0.2.1", + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.43.7", + "multiaddr 0.18.1", + "pin-project", + "rw-stream-sink 0.4.0", + "thiserror", +] + [[package]] name = "libp2p-allow-block-list" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b46558c5c0bf99d3e2a1a38fd54ff5476ca66dd1737b12466a1824dd219311" +dependencies = [ + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.43.7", "void", ] @@ -5586,9 +6768,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f5107ad45cb20b2f6c3628c7b6014b996fcb13a88053f4569c872c6e30abf58" +dependencies = [ + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.43.7", "void", ] @@ -5603,17 +6797,45 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", - "multiaddr", + "multiaddr 0.17.1", "multihash 0.17.0", - "multistream-select", + "multistream-select 0.12.1", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand", + "rw-stream-sink 0.3.0", + "smallvec", + "thiserror", + "unsigned-varint", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd44289ab25e4c9230d9246c475a22241e301b23e8f4061d3bdef304a1a99713" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-identity 0.2.8", + "log", + "multiaddr 0.18.1", + "multihash 0.19.1", + "multistream-select 0.13.0", "once_cell", "parking_lot 0.12.1", "pin-project", "quick-protobuf", "rand", - "rw-stream-sink", + "rw-stream-sink 0.4.0", "smallvec", "thiserror", "unsigned-varint", @@ -5627,7 +6849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core", + "libp2p-core 0.39.2", "log", "parking_lot 0.12.1", "smallvec", @@ -5644,9 +6866,9 @@ dependencies = [ "either", "futures", "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "log", "lru 0.10.1", "quick-protobuf", @@ -5665,7 +6887,7 @@ dependencies = [ "bs58 0.4.0", "ed25519-dalek", "log", - "multiaddr", + "multiaddr 0.17.1", "multihash 0.17.0", "quick-protobuf", "rand", @@ -5674,6 +6896,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "libp2p-identity" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +dependencies = [ + "bs58 0.5.0", + "ed25519-dalek", + "hkdf", + "multihash 0.19.1", + "quick-protobuf", + "rand", + "sha2 0.10.8", + "thiserror", + "tracing", + "zeroize", +] + [[package]] name = "libp2p-kad" version = "0.43.3" @@ -5688,9 +6928,9 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "log", "quick-protobuf", "rand", @@ -5711,9 +6951,9 @@ dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "log", "rand", "smallvec", @@ -5729,11 +6969,11 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core", + "libp2p-core 0.39.2", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-swarm", + "libp2p-swarm 0.42.2", "prometheus-client", ] @@ -5746,8 +6986,8 @@ dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "log", "once_cell", "quick-protobuf", @@ -5770,8 +7010,8 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-swarm 0.42.2", "log", "rand", "void", @@ -5787,8 +7027,8 @@ dependencies = [ "futures", "futures-timer", "if-watch", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -5808,9 +7048,9 @@ dependencies = [ "async-trait", "futures", "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "rand", "smallvec", ] @@ -5826,8 +7066,8 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "libp2p-swarm-derive", "log", "rand", @@ -5836,6 +7076,27 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-swarm" +version = "0.43.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580189e0074af847df90e75ef54f3f30059aedda37ea5a1659e8b9fca05c0141" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "log", + "multistream-select 0.13.0", + "once_cell", + "rand", + "smallvec", + "void", +] + [[package]] name = "libp2p-swarm-derive" version = "0.32.0" @@ -5857,7 +7118,7 @@ dependencies = [ "futures-timer", "if-watch", "libc", - "libp2p-core", + "libp2p-core 0.39.2", "log", "socket2 0.4.10", "tokio", @@ -5871,8 +7132,8 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "rcgen", "ring 0.16.20", "rustls 0.20.9", @@ -5890,7 +7151,7 @@ checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core", + "libp2p-core 0.39.2", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -5905,14 +7166,14 @@ dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core", + "libp2p-core 0.39.2", "log", "parking_lot 0.12.1", "quicksink", - "rw-stream-sink", + "rw-stream-sink 0.3.0", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -5922,7 +7183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core", + "libp2p-core 0.39.2", "log", "thiserror", "yamux", @@ -6002,6 +7263,16 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "libz-ng-sys" +version = "1.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6409efc61b12687963e602df8ecf70e8ddacf95bc6576bcf16e3ac6328083c5" +dependencies = [ + "cmake", + "libc", +] + [[package]] name = "libz-sys" version = "1.1.14" @@ -6104,6 +7375,15 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.3", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -6313,6 +7593,12 @@ dependencies = [ "thrift", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -6379,9 +7665,9 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -6390,14 +7676,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2634b45039e064c343a0a77ed45e03ca027c84e1b250b2f3988af7cde9b7e79e" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -6446,6 +7732,25 @@ dependencies = [ "url", ] +[[package]] +name = "multiaddr" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity 0.2.8", + "multibase", + "multihash 0.19.1", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", +] + [[package]] name = "multibase" version = "0.9.1" @@ -6576,6 +7881,20 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint", +] + [[package]] name = "nalgebra" version = "0.32.3" @@ -6618,6 +7937,24 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -6684,6 +8021,12 @@ dependencies = [ "tokio", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + [[package]] name = "nix" version = "0.24.3" @@ -6706,6 +8049,18 @@ dependencies = [ "libc", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -6729,14 +8084,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "num-bigint" -version = "0.4.4" +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", "num-traits", + "rand", + "serde", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", ] [[package]] @@ -6768,6 +8152,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-rational" version = "0.4.1" @@ -6854,12 +8249,50 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -6890,7 +8323,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ "expander 2.0.0", - "indexmap 2.1.0", + "indexmap 2.2.6", "itertools 0.11.0", "petgraph", "proc-macro-crate 1.3.1", @@ -6908,6 +8341,57 @@ dependencies = [ "num-traits", ] +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "outref" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" + +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + [[package]] name = "pallet-alliance" version = "28.0.0" @@ -6923,10 +8407,10 @@ dependencies = [ "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -6942,10 +8426,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -6961,7 +8445,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -6976,8 +8460,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -6994,9 +8478,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7012,8 +8496,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7029,9 +8513,9 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-aura", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7046,9 +8530,9 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-authority-discovery", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7063,7 +8547,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7082,11 +8566,11 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -7108,9 +8592,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", ] @@ -7128,7 +8612,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7147,7 +8631,7 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -7172,10 +8656,10 @@ dependencies = [ "serde", "sp-api", "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", ] @@ -7192,9 +8676,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7215,9 +8699,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -7235,7 +8719,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7256,9 +8740,9 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -7277,8 +8761,8 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7294,9 +8778,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7314,9 +8798,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7336,7 +8820,7 @@ dependencies = [ "parity-scale-codec", "rand", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7353,9 +8837,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7372,8 +8856,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7390,10 +8874,10 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7412,11 +8896,11 @@ dependencies = [ "parity-scale-codec", "rand", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "strum 0.24.1", ] @@ -7432,7 +8916,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7452,7 +8936,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7470,7 +8954,7 @@ dependencies = [ "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -7506,10 +8990,10 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7541,8 +9025,8 @@ dependencies = [ "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7574,8 +9058,8 @@ dependencies = [ "pallet-encointer-reputation-commitments", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7597,8 +9081,8 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7617,7 +9101,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7635,8 +9119,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7654,9 +9138,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7674,11 +9158,11 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -7697,8 +9181,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7715,10 +9199,10 @@ dependencies = [ "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7734,10 +9218,10 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-keyring", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7752,7 +9236,7 @@ dependencies = [ "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7768,9 +9252,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7787,12 +9271,12 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -7807,10 +9291,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7826,8 +9310,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7845,7 +9329,7 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7862,9 +9346,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7891,9 +9375,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7909,9 +9393,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", "sp-tracing", @@ -7932,8 +9416,8 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-runtime-interface", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-staking", "sp-std", ] @@ -7963,7 +9447,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7988,7 +9472,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -8005,9 +9489,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8022,8 +9506,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8040,10 +9524,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8058,8 +9542,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8077,9 +9561,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8096,10 +9580,10 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8116,10 +9600,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -8135,14 +9619,14 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -8158,7 +9642,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "rand", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", ] @@ -8176,9 +9660,9 @@ dependencies = [ "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8199,9 +9683,9 @@ dependencies = [ "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -8225,7 +9709,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" dependencies = [ "log", - "sp-arithmetic", + "sp-arithmetic 24.0.0", ] [[package]] @@ -8251,9 +9735,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8269,8 +9753,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8288,8 +9772,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-storage", "sp-timestamp", @@ -8306,9 +9790,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8318,15 +9802,15 @@ version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08ef209d2d5d077e325bf49b024fd2eff109a5c2ca0d84ce0d50a65839e6b026" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", - "sp-weights", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -8338,8 +9822,8 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime", - "sp-weights", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -8357,8 +9841,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8374,7 +9858,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -8389,9 +9873,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8407,7 +9891,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -8423,7 +9907,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -8442,9 +9926,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8463,8 +9947,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8487,8 +9971,8 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8508,8 +9992,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8537,9 +10021,9 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-parachain-info", "staging-xcm", @@ -8567,9 +10051,9 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", "staging-parachain-info", @@ -8578,6 +10062,19 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes 0.13.0", + "rand", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + [[package]] name = "parity-bytes" version = "0.1.2" @@ -8600,7 +10097,7 @@ dependencies = [ "memmap2 0.5.10", "parking_lot 0.12.1", "rand", - "siphasher", + "siphasher 0.3.11", "snap", "winapi", ] @@ -8733,12 +10230,29 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle 2.5.0", +] + [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "pbkdf2" version = "0.8.0" @@ -8748,6 +10262,16 @@ dependencies = [ "crypto-mac 0.11.0", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "password-hash", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -8763,6 +10287,25 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "penpal-emulated-chain" version = "1.0.0" @@ -8774,7 +10317,7 @@ dependencies = [ "parachains-common", "penpal-runtime", "polkadot-emulated-chain", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -8822,11 +10365,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -8849,7 +10392,7 @@ dependencies = [ "kusama-emulated-chain", "parachains-common", "people-kusama-runtime", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -8869,7 +10412,7 @@ dependencies = [ "parity-scale-codec", "people-kusama-runtime", "polkadot-runtime-common", - "sp-runtime", + "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -8922,11 +10465,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -8998,7 +10541,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher 0.3.11", ] [[package]] @@ -9039,6 +10624,48 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pjs-rs" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b067cdd22927cb66388a62e37435dd1127b657c06144ce6fcb0fcd810c6abf97" +dependencies = [ + "deno_ast", + "deno_console", + "deno_core", + "deno_crypto", + "deno_fetch", + "deno_tls", + "deno_url", + "deno_web", + "deno_webidl", + "deno_websocket", + "log", + "tokio", +] + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -9061,6 +10688,17 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" +[[package]] +name = "pmutil" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "polkadot-approval-distribution" version = "8.0.0" @@ -9117,8 +10755,8 @@ dependencies = [ "polkadot-primitives", "rand", "schnellru", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9162,9 +10800,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "thiserror", "tokio-util", "tracing-gum", @@ -9178,8 +10816,8 @@ checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -9193,7 +10831,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.1.0", + "indexmap 2.2.6", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9203,8 +10841,8 @@ dependencies = [ "polkadot-primitives", "sc-network", "schnellru", - "sp-application-crypto", - "sp-keystore", + "sp-application-crypto 31.0.0", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9223,8 +10861,8 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -9237,8 +10875,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core", - "sp-trie", + "sp-core 29.0.0", + "sp-trie 30.0.0", "thiserror", ] @@ -9258,10 +10896,10 @@ dependencies = [ "rand_chacha 0.3.1", "sc-network", "sc-network-common", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-keystore", + "sp-keystore 0.35.0", "tracing-gum", ] @@ -9302,7 +10940,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core", + "sp-core 29.0.0", "sp-maybe-compressed-blob", "thiserror", "tracing-gum", @@ -9334,10 +10972,10 @@ dependencies = [ "sc-keystore", "schnellru", "schnorrkel 0.11.4", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus", "sp-consensus-slots", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", "tracing-gum", ] @@ -9381,7 +11019,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "schnellru", - "sp-keystore", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9396,7 +11034,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", "wasm-timer", @@ -9556,7 +11194,7 @@ dependencies = [ "polkadot-primitives", "rand", "slotmap", - "sp-core", + "sp-core 29.0.0", "sp-maybe-compressed-blob", "sp-wasm-interface", "tempfile", @@ -9577,7 +11215,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9601,10 +11239,10 @@ dependencies = [ "sc-executor-common", "sc-executor-wasmtime", "seccompiler", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-externalities", - "sp-io", + "sp-externalities 0.26.0", + "sp-io 31.0.0", "sp-tracing", "thiserror", "tracing-gum", @@ -9640,7 +11278,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "sc-network", - "sp-core", + "sp-core 29.0.0", "thiserror", "tokio", ] @@ -9671,7 +11309,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07f9e67b0f25d695947a15b6fe8ee6f8e83f3dfcbca124a13281c0edd0dc4703" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-trait", "bitvec", "derive_more", @@ -9704,12 +11342,12 @@ dependencies = [ "polkadot-primitives", "schnorrkel 0.11.4", "serde", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-babe", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "sp-maybe-compressed-blob", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", "zstd 0.12.4", ] @@ -9749,7 +11387,7 @@ dependencies = [ "sp-authority-discovery", "sp-blockchain", "sp-consensus-babe", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -9783,9 +11421,9 @@ dependencies = [ "rand", "sc-client-api", "schnellru", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9808,7 +11446,7 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sp-api", - "sp-core", + "sp-core 29.0.0", "tikv-jemalloc-ctl", "tracing-gum", ] @@ -9825,10 +11463,10 @@ dependencies = [ "polkadot-core-primitives", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -9846,15 +11484,15 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-authority-discovery", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -9865,7 +11503,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb4747cb8faa532e8446b38b74266fd626d6b660fe6b00776dd6c4543cc0457f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", @@ -9887,8 +11525,8 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -9962,28 +11600,28 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", "sp-storage", "sp-tracing", "sp-transaction-pool", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -10030,11 +11668,11 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -10052,9 +11690,9 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", "staging-xcm-builder", ] @@ -10107,13 +11745,13 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -10219,21 +11857,21 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", - "sp-keystore", + "sp-keystore 0.35.0", "sp-mmr-primitives", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-storage", "sp-timestamp", "sp-transaction-pool", "sp-version", - "sp-weights", + "sp-weights 28.0.0", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -10250,14 +11888,14 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.1.0", + "indexmap 2.2.6", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.35.0", "sp-staking", "thiserror", "tracing-gum", @@ -10271,7 +11909,7 @@ checksum = "de5e010da3c6a65d8f263d0f825a04d995ffc8a37f886f674fcbbc73bf158d01" dependencies = [ "parity-scale-codec", "polkadot-primitives", - "sp-core", + "sp-core 29.0.0", "tracing-gum", ] @@ -10287,6 +11925,80 @@ dependencies = [ "polkadot-emulated-chain", ] +[[package]] +name = "polkavm-common" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" + +[[package]] +name = "polkavm-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" + +[[package]] +name = "polkavm-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" +dependencies = [ + "polkavm-derive-impl-macro 0.8.0", +] + +[[package]] +name = "polkavm-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" +dependencies = [ + "polkavm-derive-impl-macro 0.9.0", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" +dependencies = [ + "polkavm-common 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" +dependencies = [ + "polkavm-common 0.9.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" +dependencies = [ + "polkavm-derive-impl 0.8.0", + "syn 2.0.52", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" +dependencies = [ + "polkavm-derive-impl 0.9.0", + "syn 2.0.52", +] + [[package]] name = "polling" version = "3.5.0" @@ -10393,8 +12105,17 @@ dependencies = [ ] [[package]] -name = "primitive-types" -version = "0.12.2" +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ @@ -10475,6 +12196,29 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-rules" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" +dependencies = [ + "proc-macro-rules-macros", + "proc-macro2", + "syn 2.0.52", +] + +[[package]] +name = "proc-macro-rules-macros" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "207fffb0fe655d1d47f6af98cc2793405e85929bdbc420d685554ff07be27ac7" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "proc-macro-warning" version = "1.0.0" @@ -10488,9 +12232,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] @@ -10819,7 +12563,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ - "pem", + "pem 1.1.1", "ring 0.16.20", "time", "yasna", @@ -10900,13 +12644,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -10921,9 +12665,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -10942,6 +12686,54 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "async-compression", + "base64 0.21.6", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite 0.2.13", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.24.1", + "tokio-socks", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + [[package]] name = "resolv-conf" version = "0.7.0" @@ -11037,6 +12829,26 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "rtnetlink" version = "0.10.1" @@ -11193,10 +13005,24 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.7", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -11204,7 +13030,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.2", + "rustls-pki-types", "schannel", "security-framework", ] @@ -11218,6 +13057,33 @@ dependencies = [ "base64 0.21.6", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-tokio-stream" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cae64d5219dfdd7f2d18dda421a2137ebdd63be6d0dc53d7836003f224f3d0" +dependencies = [ + "futures", + "rustls 0.21.10", + "tokio", +] + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -11228,6 +13094,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -11246,6 +13123,17 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "ruzstd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" +dependencies = [ + "byteorder", + "derive_more", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -11257,12 +13145,29 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + [[package]] name = "ryu" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +[[package]] +name = "ryu-js" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" + [[package]] name = "safe-mix" version = "1.0.1" @@ -11297,7 +13202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357127c91373ed6d1ae582f6e3300ab5b13bcde43bbf270a891f44194ef48b70" dependencies = [ "log", - "sp-core", + "sp-core 29.0.0", "sp-wasm-interface", "thiserror", ] @@ -11312,7 +13217,7 @@ dependencies = [ "futures", "futures-timer", "ip_network", - "libp2p", + "libp2p 0.51.4", "log", "multihash 0.18.1", "multihash-codetable", @@ -11325,9 +13230,9 @@ dependencies = [ "sp-api", "sp-authority-discovery", "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11349,9 +13254,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", ] @@ -11365,10 +13270,10 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", - "sp-trie", + "sp-runtime 32.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -11390,12 +13295,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", "sp-genesis-builder", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", ] [[package]] @@ -11423,7 +13328,7 @@ dependencies = [ "fdlimit", "futures", "itertools 0.10.5", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "names", "parity-scale-codec", @@ -11442,11 +13347,11 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-keyring", - "sp-keystore", + "sp-keystore 0.35.0", "sp-panic-handler", - "sp-runtime", + "sp-runtime 32.0.0", "sp-version", "thiserror", "tokio", @@ -11469,14 +13374,14 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 29.0.0", "sp-database", - "sp-externalities", - "sp-runtime", - "sp-state-machine", + "sp-externalities 0.26.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-statement-store", "sp-storage", - "sp-trie", + "sp-trie 30.0.0", "substrate-prometheus-endpoint", ] @@ -11498,13 +13403,13 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-trie 30.0.0", ] [[package]] @@ -11516,7 +13421,7 @@ dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "mockall", "parking_lot 0.12.1", @@ -11526,9 +13431,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11555,17 +13460,17 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool-api", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11577,19 +13482,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf2b3004672f9eea0d9af6c9b944fa3ef0bc72fd88cea9075cdf6dc96d1439ac" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "sc-consensus-babe", "sc-consensus-epochs", "sc-rpc-api", "serde", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11600,7 +13505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9ce3ee15eff7fa642791966d427f185184df3c7f4e58893705f3e7781da8ef5" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "async-trait", "fnv", "futures", @@ -11614,16 +13519,16 @@ dependencies = [ "sc-network-sync", "sc-utils", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-keystore", + "sp-keystore 0.35.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -11637,7 +13542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a1ed5e8ac2cb53c6a248c8f469353f55bd23c72f23fe371ac19c1d46618de1a" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11645,8 +13550,8 @@ dependencies = [ "sc-rpc", "serde", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11661,7 +13566,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -11695,15 +13600,15 @@ dependencies = [ "sc-utils", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11716,7 +13621,7 @@ checksum = "697cbd528516561dbc818a8990d5477169e86d9335a0b29207cf6f6a90269e7c" dependencies = [ "finality-grandpa", "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "sc-client-api", @@ -11724,8 +13629,8 @@ dependencies = [ "sc-rpc", "serde", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11743,14 +13648,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", ] [[package]] @@ -11765,12 +13670,12 @@ dependencies = [ "sc-executor-wasmtime", "schnellru", "sp-api", - "sp-core", - "sp-externalities", - "sp-io", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-io 31.0.0", "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", + "sp-runtime-interface 25.0.0", + "sp-trie 30.0.0", "sp-version", "sp-wasm-interface", "tracing", @@ -11803,7 +13708,7 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", + "sp-runtime-interface 25.0.0", "sp-wasm-interface", "wasmtime", ] @@ -11823,7 +13728,7 @@ dependencies = [ "sc-network-common", "sc-network-sync", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -11835,9 +13740,9 @@ dependencies = [ "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "thiserror", ] @@ -11853,10 +13758,10 @@ dependencies = [ "bytes", "futures", "futures-timer", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "mixnet", - "multiaddr", + "multiaddr 0.17.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -11864,10 +13769,10 @@ dependencies = [ "sc-transaction-pool-api", "sp-api", "sp-consensus", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "sp-mixnet", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", ] @@ -11878,7 +13783,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f231c7d5e749ec428b4cfa669d759ae76cd3da4f50d7352a2d711acdc7532891" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", @@ -11887,7 +13792,7 @@ dependencies = [ "futures", "futures-timer", "ip_network", - "libp2p", + "libp2p 0.51.4", "linked_hash_set", "log", "mockall", @@ -11902,10 +13807,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -11921,17 +13826,17 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2f89b0134738cb3d982b6e625ca93ae8dbe83ce2a06e4b6a396e4df09ed3499" dependencies = [ - "async-channel", + "async-channel 1.9.0", "cid", "futures", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "prost 0.12.3", "prost-build", "sc-client-api", "sc-network", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", "unsigned-varint", ] @@ -11945,13 +13850,13 @@ dependencies = [ "async-trait", "bitflags 1.3.2", "futures", - "libp2p-identity", + "libp2p-identity 0.1.3", "parity-scale-codec", "prost-build", "sc-consensus", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -11963,13 +13868,13 @@ dependencies = [ "ahash 0.8.8", "futures", "futures-timer", - "libp2p", + "libp2p 0.51.4", "log", "sc-network", "sc-network-common", "sc-network-sync", "schnellru", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "tracing", ] @@ -11981,9 +13886,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84ef0b212c775f58e0304ec09166089f6b09afddf559b7c2b5702933b3be4" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "futures", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "parity-scale-codec", "prost 0.12.3", @@ -11991,8 +13896,8 @@ dependencies = [ "sc-client-api", "sc-network", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -12003,12 +13908,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aa9377059deece4e7d419d9ec456f657268c0c603e1cf98df4a920f6da83461" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "async-trait", "fork-tree", "futures", "futures-timer", - "libp2p", + "libp2p 0.51.4", "log", "mockall", "parity-scale-codec", @@ -12021,12 +13926,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12041,7 +13946,7 @@ checksum = "16c9cad4baf348725bd82eadcd1747fc112ec49c76b863755ce79c588fa73fe4" dependencies = [ "array-bytes 6.2.2", "futures", - "libp2p", + "libp2p 0.51.4", "log", "parity-scale-codec", "sc-network", @@ -12049,7 +13954,7 @@ dependencies = [ "sc-network-sync", "sc-utils", "sp-consensus", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", ] @@ -12066,7 +13971,7 @@ dependencies = [ "futures-timer", "hyper", "hyper-rustls", - "libp2p", + "libp2p 0.51.4", "log", "num_cpus", "once_cell", @@ -12079,11 +13984,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "sp-api", - "sp-core", - "sp-externalities", - "sp-keystore", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "threadpool", "tracing", ] @@ -12105,7 +14010,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5acf6d89f062d1334a0c5b67e9dea97666cd47a49acb2696eab55ff1a1bf74" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12120,11 +14025,11 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "sp-offchain", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-statement-store", "sp-version", @@ -12137,7 +14042,7 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9db6aaabfa7e0c27ec15d0f0a11b994cd4bcf86e362f0d9732b4a414d793f0f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "sc-chain-spec", "sc-mixnet", @@ -12145,9 +14050,9 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-version", "thiserror", ] @@ -12159,7 +14064,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "691440bbaddd3bc2675309c965cc75f8bf694f51e0a28039bfc9658299fbc394" dependencies = [ "http", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "serde_json", "substrate-prometheus-endpoint", @@ -12178,7 +14083,7 @@ dependencies = [ "futures", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12190,9 +14095,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-version", "thiserror", "tokio", @@ -12210,7 +14115,7 @@ dependencies = [ "exit-future", "futures", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12243,16 +14148,16 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-session", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "static_init", "substrate-prometheus-endpoint", @@ -12272,7 +14177,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -12281,7 +14186,7 @@ version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bc382c7d997f4531eee5e5d57f970eaf2761d722298d7747385a4ad69fa6b12" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "sc-chain-spec", "sc-client-api", @@ -12291,7 +14196,7 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", ] @@ -12311,9 +14216,9 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", + "sp-io 31.0.0", "sp-std", ] @@ -12325,7 +14230,7 @@ checksum = "0673a93aa0684b606abfc5fce6c882ada7bb5fad8a2ddc66a09a42bcc9664d91" dependencies = [ "chrono", "futures", - "libp2p", + "libp2p 0.51.4", "log", "parking_lot 0.12.1", "pin-project", @@ -12358,14 +14263,14 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-tracing", "thiserror", "tracing", - "tracing-log", - "tracing-subscriber", + "tracing-log 0.1.4", + "tracing-subscriber 0.2.25", ] [[package]] @@ -12399,9 +14304,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-runtime", + "sp-runtime 32.0.0", "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", @@ -12420,8 +14325,8 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -12431,21 +14336,88 @@ version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b1a238f5baa56405db4e440e2d2f697583736fa2e2f1aac345c438a42975f1" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic", + "sp-arithmetic 24.0.0", +] + +[[package]] +name = "scale-bits" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "662d10dcd57b1c2a3c41c9cf68f71fb09747ada1ea932ad961aca7e2ca28315f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "scale-type-resolver", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc79ba56a1c742f5aeeed1f1801f3edf51f7e818f0a54582cac6f131364ea7b" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode-derive", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-decode-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5398fdb3c7bea3cb419bac4983aadacae93fe1a7b5f693f4ebd98c3821aad7a5" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628800925a33794fb5387781b883b5e14d130fece9af5a63613867b8de07c5c7" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-encode-derive", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-encode-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a304e1af7cdfbe7a24e08b012721456cc8cecdedadc14b3d10513eada63233c" +dependencies = [ + "darling 0.14.4", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "bitvec", "cfg-if", @@ -12457,16 +14429,60 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "scale-type-resolver" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10b800069bfd43374e0f96f653e0d46882a2cb16d6d961ac43bea80f26c76843" +dependencies = [ + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-typegen" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d470fa75e71b12b3244a4113adc4bc49891f3daba2054703cacd06256066397e" +dependencies = [ + "proc-macro2", + "quote", + "scale-info", + "syn 2.0.52", + "thiserror", +] + +[[package]] +name = "scale-value" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07ccfee963104335c971aaf8b7b0e749be8569116322df23f1f75c4ca9e4a28" +dependencies = [ + "base58", + "blake2 0.10.6", + "derive_more", + "either", + "frame-metadata 15.1.0", + "parity-scale-codec", + "scale-bits", + "scale-decode", + "scale-encode", + "scale-info", + "scale-type-resolver", + "serde", + "yap", +] + [[package]] name = "schannel" version = "0.1.22" @@ -12522,6 +14538,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -12554,6 +14576,7 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", + "serdect", "subtle 2.5.0", "zeroize", ] @@ -12569,9 +14592,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.28.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "secp256k1-sys", ] @@ -12591,6 +14614,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ + "serde", "zeroize", ] @@ -12692,6 +14716,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float 2.10.1", + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -12718,6 +14752,7 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -12733,25 +14768,86 @@ dependencies = [ ] [[package]] -name = "sha-1" -version = "0.9.8" +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", + "form_urlencoded", + "itoa", + "ryu", + "serde", ] [[package]] -name = "sha1" -version = "0.10.6" +name = "serde_v8" +version = "0.138.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "add36cea4acc8cbfa4a1614a9e985e1057fd6748b672c8b4c4496f889d25e539" dependencies = [ - "cfg-if", + "bytes", + "derive_more", + "num-bigint", + "serde", + "smallvec", + "thiserror", + "v8", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.2.6", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha-1" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -12849,6 +14945,21 @@ dependencies = [ "wide", ] +[[package]] +name = "simd-abstraction" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" +dependencies = [ + "outref 0.1.0", +] + +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "simple-mermaid" version = "0.1.1" @@ -12861,6 +14972,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "slab" version = "0.4.9" @@ -12885,7 +15002,7 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -12904,6 +15021,125 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] + +[[package]] +name = "smol" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e635339259e51ef85ac7aa29a1cd991b957047507288697a690e80ab97d07cad" +dependencies = [ + "async-channel 2.3.0", + "async-executor", + "async-fs", + "async-io", + "async-lock 3.2.0", + "async-net", + "async-process", + "blocking", + "futures-lite", +] + +[[package]] +name = "smoldot" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d1eaa97d77be4d026a1e7ffad1bb3b78448763b357ea6f8188d3e6f736a9b9" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 3.2.0", + "atomic-take", + "base64 0.21.6", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 4.0.0", + "fnv", + "futures-lite", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.12.1", + "libm", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305", + "rand", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.11.4", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher 1.0.1", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.0", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5496f2d116b7019a526b1039ec2247dd172b8670633b1a64a614c9ea12c9d8c7" +dependencies = [ + "async-channel 2.3.0", + "async-lock 3.2.0", + "base64 0.21.6", + "blake2-rfc", + "derive_more", + "either", + "event-listener 4.0.0", + "fnv", + "futures-channel", + "futures-lite", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.12.1", + "log", + "lru 0.12.3", + "no-std-net", + "parking_lot 0.12.1", + "pin-project", + "rand", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher 1.0.1", + "slab", + "smol", + "smoldot", + "zeroize", +] + [[package]] name = "snap" version = "1.1.1" @@ -12953,9 +15189,9 @@ dependencies = [ "serde", "snowbridge-ethereum", "snowbridge-milagro-bls", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "ssz_rs", "ssz_rs_derive", @@ -12977,10 +15213,10 @@ dependencies = [ "scale-info", "serde", "snowbridge-beacon-primitives", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13003,9 +15239,9 @@ dependencies = [ "scale-info", "serde", "serde-big-array", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13032,8 +15268,8 @@ checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -13047,7 +15283,7 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-std", "staging-xcm", ] @@ -13074,9 +15310,9 @@ dependencies = [ "snowbridge-core", "snowbridge-ethereum", "snowbridge-pallet-ethereum-client-fixtures", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "ssz_rs", "ssz_rs_derive", @@ -13095,7 +15331,7 @@ dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -13123,9 +15359,9 @@ dependencies = [ "snowbridge-ethereum", "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-router-primitives", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13144,7 +15380,7 @@ dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -13165,10 +15401,10 @@ dependencies = [ "serde", "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -13187,9 +15423,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13211,9 +15447,9 @@ dependencies = [ "scale-info", "serde", "snowbridge-core", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13231,7 +15467,7 @@ dependencies = [ "log", "parity-scale-codec", "snowbridge-core", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13296,13 +15532,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -13323,7 +15559,7 @@ dependencies = [ "parity-scale-codec", "snowbridge-core", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-std", "staging-xcm", ] @@ -13362,7 +15598,40 @@ dependencies = [ "httparse", "log", "rand", - "sha-1", + "sha-1 0.9.8", +] + +[[package]] +name = "sourcemap" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" +dependencies = [ + "data-encoding", + "debugid", + "if_chain", + "rustc_version 0.2.3", + "serde", + "serde_json", + "unicode-id", + "url", +] + +[[package]] +name = "sourcemap" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7768edd06c02535e0d50653968f46e1e0d3aa54742190d35dd9466f59de9c71" +dependencies = [ + "base64-simd 0.7.0", + "data-encoding", + "debugid", + "if_chain", + "rustc_version 0.2.3", + "serde", + "serde_json", + "unicode-id-start", + "url", ] [[package]] @@ -13376,13 +15645,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-metadata-ir", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "thiserror", ] @@ -13411,8 +15680,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std", +] + +[[package]] +name = "sp-application-crypto" +version = "33.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13ca6121c22c8bd3d1dce1f05c479101fd0d7b159bef2a3e8c834138d839c75c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 31.0.0", + "sp-io 33.0.0", "sp-std", ] @@ -13431,6 +15714,21 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-arithmetic" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "910c07fa263b20bf7271fdd4adcb5d3217dfdac14270592e0780223542e7e114" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "static_assertions", +] + [[package]] name = "sp-authority-discovery" version = "27.0.0" @@ -13440,8 +15738,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13453,7 +15751,7 @@ checksum = "1b36ce171caa7eb2bbe682c089f755fdefa71d3702e4fb1ba30d10146aef99d5" dependencies = [ "sp-api", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -13471,8 +15769,8 @@ dependencies = [ "sp-api", "sp-consensus", "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "thiserror", ] @@ -13485,10 +15783,10 @@ dependencies = [ "async-trait", "futures", "log", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "thiserror", ] @@ -13502,10 +15800,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-timestamp", ] @@ -13521,11 +15819,11 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-timestamp", ] @@ -13541,12 +15839,12 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", + "sp-io 31.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "strum 0.24.1", ] @@ -13563,10 +15861,10 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13596,15 +15894,62 @@ dependencies = [ "bounded-collections", "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "libsecp256k1", + "log", + "merlin 3.0.0", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1", + "secrecy", + "serde", + "sp-crypto-hashing", + "sp-debug-derive", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39 0.4.5", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d7a0fd8f16dcc3761198fc83be12872f823b37b749bc72a3a6a1f702509366" +dependencies = [ + "array-bytes 6.2.2", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra 3.1.0", "futures", "hash-db", "hash256-std-hasher", "impl-serde", "itertools 0.10.5", + "k256", "libsecp256k1", "log", "merlin 3.0.0", + "parity-bip39", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -13617,12 +15962,12 @@ dependencies = [ "serde", "sp-crypto-hashing", "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", + "sp-externalities 0.27.0", + "sp-runtime-interface 26.0.0", "sp-std", "sp-storage", "ss58-registry", - "substrate-bip39", + "substrate-bip39 0.5.0", "thiserror", "tracing", "w3f-bls", @@ -13687,6 +16032,18 @@ dependencies = [ "sp-storage", ] +[[package]] +name = "sp-externalities" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d6a4572eadd4a63cff92509a210bf425501a0c5e76574b30a366ac77653787" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + [[package]] name = "sp-genesis-builder" version = "0.8.0" @@ -13695,7 +16052,7 @@ checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" dependencies = [ "serde_json", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -13709,7 +16066,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "thiserror", ] @@ -13727,27 +16084,54 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime-interface 25.0.0", + "sp-state-machine 0.36.0", "sp-std", "sp-tracing", - "sp-trie", + "sp-trie 30.0.0", "tracing", "tracing-core", ] [[package]] -name = "sp-keyring" -version = "32.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "sp-io" +version = "33.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e09bba780b55bd9e67979cd8f654a31e4a6cf45426ff371394a65953d2177f2" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.9.1", + "rustversion", + "secp256k1", + "sp-core 31.0.0", + "sp-crypto-hashing", + "sp-externalities 0.27.0", + "sp-keystore 0.37.0", + "sp-runtime-interface 26.0.0", + "sp-state-machine 0.38.0", + "sp-std", + "sp-tracing", + "sp-trie 32.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keyring" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cf0a2f881958466fc92bc9b39bbc2c0d815ded4a21f8f953372b0ac2e11b02" dependencies = [ - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "strum 0.24.1", ] @@ -13759,11 +16143,23 @@ checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "thiserror", ] +[[package]] +name = "sp-keystore" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbab8b61bd61d5f8625a0c75753b5d5a23be55d3445419acd42caf59cf6236b" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 31.0.0", + "sp-externalities 0.27.0", +] + [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" @@ -13780,7 +16176,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", "sp-std", @@ -13795,7 +16191,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-std", ] @@ -13811,9 +16207,9 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-debug-derive", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "thiserror", ] @@ -13827,9 +16223,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13840,8 +16236,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d83b955dce0b6d143bec3f60571311168f362b1c16cf044da7037a407b66c19" dependencies = [ "sp-api", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -13863,7 +16259,7 @@ checksum = "9af4b73fe7ddd88b1641cca90048c4e525e721763199e6fd29c4f590884f4d16" dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -13883,12 +16279,37 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std", + "sp-weights 28.0.0", +] + +[[package]] +name = "sp-runtime" +version = "34.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3cb126971e7db2f0fcf8053dce740684c438c7180cfca1959598230f342c58" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 33.0.0", + "sp-arithmetic 25.0.0", + "sp-core 31.0.0", + "sp-io 33.0.0", "sp-std", - "sp-weights", + "sp-weights 30.0.0", ] [[package]] @@ -13901,8 +16322,28 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", + "sp-externalities 0.26.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a675ea4858333d4d755899ed5ed780174aa34fec15953428d516af5452295" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.8.0", + "primitive-types", + "sp-externalities 0.27.0", + "sp-runtime-interface-proc-macro 18.0.0", "sp-std", "sp-storage", "sp-tracing", @@ -13924,6 +16365,20 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "sp-session" version = "28.0.0" @@ -13933,9 +16388,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -13950,8 +16405,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13967,11 +16422,33 @@ dependencies = [ "parking_lot 0.12.1", "rand", "smallvec", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-panic-handler", + "sp-std", + "sp-trie 30.0.0", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eae0eac8034ba14437e772366336f579398a46d101de13dbb781ab1e35e67c5" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand", + "smallvec", + "sp-core 31.0.0", + "sp-externalities 0.27.0", "sp-panic-handler", "sp-std", - "sp-trie", + "sp-trie 32.0.0", "thiserror", "tracing", "trie-db", @@ -13992,12 +16469,12 @@ dependencies = [ "scale-info", "sha2 0.10.8", "sp-api", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", + "sp-externalities 0.26.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-std", "thiserror", "x25519-dalek 2.0.0", @@ -14032,7 +16509,7 @@ dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "thiserror", ] @@ -14047,7 +16524,7 @@ dependencies = [ "sp-std", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.2.25", ] [[package]] @@ -14057,7 +16534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9742861c5330bdcb42856a6eed3d3745b58ee1c92ca4c9260032ff4e6c387165" dependencies = [ "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -14069,11 +16546,11 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -14092,8 +16569,33 @@ dependencies = [ "rand", "scale-info", "schnellru", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-std", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1aa91ad26c62b93d73e65f9ce7ebd04459c4bad086599348846a81988d6faa4" +dependencies = [ + "ahash 0.8.8", + "hash-db", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand", + "scale-info", + "schnellru", + "sp-core 31.0.0", + "sp-externalities 0.27.0", "sp-std", "thiserror", "tracing", @@ -14113,7 +16615,7 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-version-proc-macro", "thiserror", @@ -14156,7 +16658,23 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic", + "sp-arithmetic 24.0.0", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-weights" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9af6c661fe3066b29f9e1d258000f402ff5cc2529a9191972d214e5871d0ba87" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 25.0.0", "sp-debug-derive", "sp-std", ] @@ -14238,6 +16756,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + [[package]] name = "staging-kusama-runtime" version = "1.0.0" @@ -14309,28 +16840,28 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", "sp-storage", "sp-tracing", "sp-transaction-pool", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -14350,7 +16881,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -14369,7 +16900,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights", + "sp-weights 28.0.0", "xcm-procedural", ] @@ -14387,11 +16918,11 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -14409,12 +16940,12 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", "staging-xcm", ] @@ -14453,207 +16984,709 @@ dependencies = [ ] [[package]] -name = "strobe-rs" -version = "0.8.1" +name = "string_enum" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fa4d4f81d7c05b9161f8de839975d3326328b8ba2831164b465524cc2f55252" +dependencies = [ + "pmutil", + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.52", +] + +[[package]] +name = "strobe-rs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "keccak", + "subtle 2.5.0", + "zeroize", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros 0.25.3", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.52", +] + +[[package]] +name = "substrate-bip39" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel 0.9.1", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "substrate-bip39" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b564c293e6194e8b222e52436bcb99f60de72043c7f845cf6c4406db4df121" +dependencies = [ + "hmac 0.12.1", + "pbkdf2 0.12.2", + "schnorrkel 0.11.4", + "sha2 0.10.8", + "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-frame-rpc-system" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332f903d2f34703204f0003136c9abbc569d691028279996a1daf8f248a7369f" +dependencies = [ + "frame-system-rpc-runtime-api", + "futures", + "jsonrpsee 0.20.3", + "log", + "parity-scale-codec", + "sc-rpc-api", + "sc-transaction-pool-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core 29.0.0", + "sp-runtime 32.0.0", +] + +[[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.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8fe06b03b8a291c09507c42f92a2c2c10dd3d62975d02c7f64a92d87bfe09b" +dependencies = [ + "hyper", + "log", + "prometheus", + "thiserror", + "tokio", +] + +[[package]] +name = "substrate-rpc-client" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40e5235d8460ec81e9a382345aa80d75e2943f224a332559847344bb62fa13b3" +dependencies = [ + "async-trait", + "jsonrpsee 0.20.3", + "log", + "sc-rpc-api", + "serde", + "sp-runtime 32.0.0", +] + +[[package]] +name = "substrate-state-trie-migration-rpc" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5768a5d3c76eebfdf94c23a3fde6c832243a043d60561e5ac1a2b475b9ad09f3" +dependencies = [ + "jsonrpsee 0.20.3", + "parity-scale-codec", + "sc-client-api", + "sc-rpc-api", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-trie 30.0.0", + "trie-db", +] + +[[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 = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" +dependencies = [ + "build-helper", + "cargo_metadata", + "console", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob", + "strum 0.24.1", + "tempfile", + "toml 0.8.10", + "walkdir", + "wasm-opt", +] + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subxt" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd68bef23f4de5e513ab4c29af69053e232b098f9c87ab552d7ea153b4a1fbc5" +dependencies = [ + "async-trait", + "base58", + "blake2 0.10.6", + "derivative", + "either", + "frame-metadata 16.0.0", + "futures", + "hex", + "impl-serde", + "instant", + "jsonrpsee 0.22.5", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode", + "scale-encode", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-core 31.0.0", + "sp-crypto-hashing", + "sp-runtime 34.0.0", + "subxt-lightclient", + "subxt-macro", + "subxt-metadata", + "thiserror", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "subxt-codegen" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d9e2b256b71d31a2629e44eb9cbfd944eb7d577c9e0c8e9802cc3c3943af2d9" +dependencies = [ + "frame-metadata 16.0.0", + "heck", + "hex", + "jsonrpsee 0.22.5", + "parity-scale-codec", + "proc-macro2", + "quote", + "scale-info", + "scale-typegen", + "subxt-metadata", + "syn 2.0.52", + "thiserror", + "tokio", +] + +[[package]] +name = "subxt-lightclient" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d51f1ac12e3be7aafea4d037730a57da4f22f2e9c73955666081ffa2697c6f1" +dependencies = [ + "futures", + "futures-util", + "serde", + "serde_json", + "smoldot-light", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "subxt-macro" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98dc84d7e6a0abd7ed407cce0bf60d7d58004f699460cffb979640717d1ab506" +dependencies = [ + "darling 0.20.8", + "parity-scale-codec", + "proc-macro-error", + "quote", + "scale-typegen", + "subxt-codegen", + "syn 2.0.52", +] + +[[package]] +name = "subxt-metadata" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc10c54028d079a9f1be65188707cd29e5ffd8d0031a2b1346a0941d57b7ab7e" +dependencies = [ + "derive_more", + "frame-metadata 16.0.0", + "hashbrown 0.14.3", + "parity-scale-codec", + "scale-info", + "sp-crypto-hashing", +] + +[[package]] +name = "subxt-signer" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ccb59a38fe357fab55247756174435e8626b93929864e8a498635a15e779df8" +dependencies = [ + "bip39", + "cfg-if", + "derive_more", + "hex", + "hmac 0.12.1", + "parity-scale-codec", + "pbkdf2 0.12.2", + "regex", + "schnorrkel 0.11.4", + "secp256k1", + "secrecy", + "sha2 0.10.8", + "sp-crypto-hashing", + "subxt", + "zeroize", +] + +[[package]] +name = "swc_atoms" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a9e1b6d97f27b6abe5571f8fe3bdbd2fa987299fc2126450c7cde6214896ef" +dependencies = [ + "hstr", + "once_cell", + "rustc-hash", + "serde", +] + +[[package]] +name = "swc_common" +version = "0.33.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ccb656cd57c93614e4e8b33a60e75ca095383565c1a8d2bbe6a1103942831e0" +dependencies = [ + "ast_node", + "better_scoped_tls", + "cfg-if", + "either", + "from_variant", + "new_debug_unreachable", + "num-bigint", + "once_cell", + "rustc-hash", + "serde", + "siphasher 0.3.11", + "sourcemap 6.4.1", + "swc_atoms", + "swc_eq_ignore_macros", + "swc_visit", + "tracing", + "unicode-width", + "url", +] + +[[package]] +name = "swc_config" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba1c7a40d38f9dd4e9a046975d3faf95af42937b34b2b963be4d8f01239584b" +dependencies = [ + "indexmap 1.9.3", + "serde", + "serde_json", + "swc_config_macro", +] + +[[package]] +name = "swc_config_macro" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5b5aaca9a0082be4515f0fbbecc191bf5829cd25b5b9c0a2810f6a2bb0d6829" +dependencies = [ + "pmutil", + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.52", +] + +[[package]] +name = "swc_ecma_ast" +version = "0.110.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3d416121da2d56bcbd1b1623725a68890af4552fef0c6d1e4bfa92776ccd6a" +dependencies = [ + "bitflags 2.4.1", + "is-macro", + "num-bigint", + "phf", + "scoped-tls", + "serde", + "string_enum", + "swc_atoms", + "swc_common", + "unicode-id", +] + +[[package]] +name = "swc_ecma_codegen" +version = "0.146.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b7b37ef40385cc2e294ece3d42048dcda6392838724dd5f02ff8da3fa105271" +dependencies = [ + "memchr", + "num-bigint", + "once_cell", + "rustc-hash", + "serde", + "sourcemap 6.4.1", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_codegen_macros", + "tracing", +] + +[[package]] +name = "swc_ecma_codegen_macros" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" +checksum = "dcdff076dccca6cc6a0e0b2a2c8acfb066014382bc6df98ec99e755484814384" dependencies = [ - "bitflags 1.3.2", - "byteorder", - "keccak", - "subtle 2.5.0", - "zeroize", + "pmutil", + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.52", ] [[package]] -name = "strsim" -version = "0.11.0" +name = "swc_ecma_loader" +version = "0.45.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "31cf7549feec3698d0110a0a71ae547f31ae272dc92db3285ce126d6dcbdadf3" +dependencies = [ + "anyhow", + "pathdiff", + "serde", + "swc_common", + "tracing", +] [[package]] -name = "strum" -version = "0.24.1" +name = "swc_ecma_parser" +version = "0.141.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "9590deff1b29aafbff8901b9d38d00211393f6b17b5cab878562db89a8966d88" dependencies = [ - "strum_macros 0.24.3", + "either", + "new_debug_unreachable", + "num-bigint", + "num-traits", + "phf", + "serde", + "smallvec", + "smartstring", + "stacker", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "tracing", + "typed-arena", ] [[package]] -name = "strum" -version = "0.25.0" +name = "swc_ecma_transforms_base" +version = "0.134.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "d74ca42a400257d8563624122813c1849c3d87e7abe3b9b2ed7514c76f64ad2f" +dependencies = [ + "better_scoped_tls", + "bitflags 2.4.1", + "indexmap 1.9.3", + "once_cell", + "phf", + "rustc-hash", + "serde", + "smallvec", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_utils", + "swc_ecma_visit", + "tracing", +] [[package]] -name = "strum_macros" -version = "0.24.3" +name = "swc_ecma_transforms_classes" +version = "0.123.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "7e68880cf7d65b93e0446b3ee079f33d94e0eddac922f75b736a6ea7669517c0" dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] -name = "strum_macros" -version = "0.25.3" +name = "swc_ecma_transforms_macros" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "8188eab297da773836ef5cf2af03ee5cca7a563e1be4b146f8141452c28cc690" dependencies = [ - "heck", + "pmutil", "proc-macro2", "quote", - "rustversion", + "swc_macros_common", "syn 2.0.52", ] [[package]] -name = "substrate-bip39" -version = "0.4.5" +name = "swc_ecma_transforms_proposal" +version = "0.168.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +checksum = "c17e1f409e026be953fabb327923ebc5fdc7c664bcac036b76107834798640ed" dependencies = [ - "hmac 0.11.0", - "pbkdf2", - "schnorrkel 0.9.1", - "sha2 0.9.9", - "zeroize", + "either", + "rustc-hash", + "serde", + "smallvec", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] -name = "substrate-fixed" -version = "0.5.9" +name = "swc_ecma_transforms_react" +version = "0.180.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e83ba2b4f68f12ec6b0f55bac0a23a5bcaaf2676f1109c7a5ead6121c7f0622" +checksum = "9fa7f368a80f28eeaa0f529cff6fb5d7578ef10a60be25bfd2582cb3f8ff5c9e" dependencies = [ - "parity-scale-codec", - "scale-info", + "base64 0.13.1", + "dashmap", + "indexmap 1.9.3", + "once_cell", "serde", - "substrate-typenum", + "sha-1 0.10.0", + "string_enum", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] -name = "substrate-frame-rpc-system" -version = "29.0.0" +name = "swc_ecma_transforms_typescript" +version = "0.185.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f903d2f34703204f0003136c9abbc569d691028279996a1daf8f248a7369f" +checksum = "daa2950c85abb4d555e092503ad2fa4f6dec0ee36a719273fb7a7bb29ead9ab6" dependencies = [ - "frame-system-rpc-runtime-api", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-rpc-api", - "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-runtime", + "ryu-js", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_react", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] -name = "substrate-geohash" -version = "0.13.0" +name = "swc_ecma_utils" +version = "0.124.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa2aad67d4ac1b37d97338ab6fd18fd5ec79c35a24112028e6feda0d67142e9a" +checksum = "e4a4a0baf6cfa490666a9fe23a17490273f843d19ebc1d6ec89d64c3f8ccdb80" dependencies = [ - "parity-scale-codec", - "scale-info", - "substrate-fixed", + "indexmap 1.9.3", + "num_cpus", + "once_cell", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_visit", + "tracing", + "unicode-id", ] [[package]] -name = "substrate-prometheus-endpoint" -version = "0.17.0" +name = "swc_ecma_visit" +version = "0.96.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8fe06b03b8a291c09507c42f92a2c2c10dd3d62975d02c7f64a92d87bfe09b" +checksum = "ba962f0becf83bab12a17365dface5a4f636c9e1743d479e292b96910a753743" dependencies = [ - "hyper", - "log", - "prometheus", - "thiserror", - "tokio", + "num-bigint", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_visit", + "tracing", ] [[package]] -name = "substrate-rpc-client" -version = "0.34.0" +name = "swc_eq_ignore_macros" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40e5235d8460ec81e9a382345aa80d75e2943f224a332559847344bb62fa13b3" +checksum = "05a95d367e228d52484c53336991fdcf47b6b553ef835d9159db4ba40efb0ee8" dependencies = [ - "async-trait", - "jsonrpsee", - "log", - "sc-rpc-api", - "serde", - "sp-runtime", + "pmutil", + "proc-macro2", + "quote", + "syn 2.0.52", ] [[package]] -name = "substrate-state-trie-migration-rpc" -version = "28.0.0" +name = "swc_macros_common" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5768a5d3c76eebfdf94c23a3fde6c832243a043d60561e5ac1a2b475b9ad09f3" +checksum = "7a273205ccb09b51fabe88c49f3b34c5a4631c4c00a16ae20e03111d6a42e832" dependencies = [ - "jsonrpsee", - "parity-scale-codec", - "sc-client-api", - "sc-rpc-api", - "serde", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-trie", - "trie-db", + "pmutil", + "proc-macro2", + "quote", + "syn 2.0.52", ] [[package]] -name = "substrate-typenum" -version = "1.16.0" +name = "swc_visit" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f0091e93c2c75b233ae39424c52cb8a662c0811fb68add149e20e5d7e8a788" +checksum = "e87c337fbb2d191bf371173dea6a957f01899adb8f189c6c31b122a6cfc98fc3" dependencies = [ - "parity-scale-codec", - "scale-info", + "either", + "swc_visit_macros", ] [[package]] -name = "substrate-wasm-builder" -version = "18.0.0" +name = "swc_visit_macros" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" +checksum = "0f322730fb82f3930a450ac24de8c98523af7d34ab8cb2f46bcb405839891a99" dependencies = [ - "build-helper", - "cargo_metadata", - "console", - "filetime", - "parity-wasm", - "sp-maybe-compressed-blob", - "strum 0.24.1", - "tempfile", - "toml 0.8.10", - "walkdir", - "wasm-opt", + "Inflector", + "pmutil", + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.52", ] -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - [[package]] name = "syn" version = "1.0.109" @@ -14688,6 +17721,12 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" version = "0.12.6" @@ -14732,7 +17771,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-constants", "smallvec", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -14741,6 +17780,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "target-lexicon" version = "0.12.12" @@ -14785,20 +17835,29 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +[[package]] +name = "text_lines" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd5828de7deaa782e1dd713006ae96b3bee32d3279b79eb67ecf8072c059bcf" +dependencies = [ + "serde", +] + [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" dependencies = [ "proc-macro2", "quote", @@ -14839,7 +17898,7 @@ dependencies = [ "byteorder", "integer-encoding", "log", - "ordered-float", + "ordered-float 1.1.1", "threadpool", ] @@ -14936,6 +17995,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite 0.2.13", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.2.0" @@ -14947,6 +18016,16 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-retry" version = "0.3.0" @@ -14968,6 +18047,29 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-socks" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" +dependencies = [ + "either", + "futures-util", + "thiserror", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -14980,6 +18082,18 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + [[package]] name = "tokio-util" version = "0.7.10" @@ -14991,6 +18105,7 @@ dependencies = [ "futures-io", "futures-sink", "pin-project-lite 0.2.13", + "slab", "tokio", "tracing", ] @@ -15004,6 +18119,18 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml" version = "0.8.10" @@ -15031,7 +18158,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow 0.5.33", ] @@ -15042,7 +18171,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.33", ] @@ -15053,7 +18182,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.33", ] @@ -15064,7 +18193,7 @@ version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -15081,6 +18210,8 @@ dependencies = [ "futures-util", "pin-project", "pin-project-lite 0.2.13", + "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -15092,6 +18223,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ + "base64 0.21.6", "bitflags 2.4.1", "bytes", "futures-core", @@ -15099,9 +18231,11 @@ dependencies = [ "http", "http-body", "http-range-header", + "mime", "pin-project-lite 0.2.13", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -15188,7 +18322,18 @@ dependencies = [ name = "tracing-log" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ "log", "once_cell", @@ -15224,10 +18369,24 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-serde", ] +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log 0.2.0", +] + [[package]] name = "trie-db" version = "0.28.0" @@ -15250,6 +18409,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "trust-dns-proto" version = "0.22.0" @@ -15267,6 +18436,7 @@ dependencies = [ "ipnet", "lazy_static", "rand", + "serde", "smallvec", "socket2 0.4.10", "thiserror", @@ -15289,6 +18459,7 @@ dependencies = [ "lru-cache", "parking_lot 0.12.1", "resolv-conf", + "serde", "smallvec", "thiserror", "tokio", @@ -15308,6 +18479,25 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "twox-hash" version = "1.6.3" @@ -15320,6 +18510,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.17.0" @@ -15350,12 +18546,65 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicode-bidi" version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +[[package]] +name = "unicode-id" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" + +[[package]] +name = "unicode-id-start" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8f73150333cb58412db36f2aca8f2875b013049705cc77b94ded70a1ab1f5da" + [[package]] name = "unicode-ident" version = "1.0.12" @@ -15393,6 +18642,12 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "unsigned-varint" version = "0.7.2" @@ -15426,14 +18681,56 @@ dependencies = [ "form_urlencoded", "idna 0.5.0", "percent-encoding", + "serde", ] +[[package]] +name = "urlpattern" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" +dependencies = [ + "derive_more", + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom 0.2.12", + "serde", +] + +[[package]] +name = "v8" +version = "0.81.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75f5f378b9b54aff3b10da8170d26af4cfd217f644cf671badcd13af5db4beb" +dependencies = [ + "bitflags 1.3.2", + "fslock", + "once_cell", + "which", +] + [[package]] name = "valuable" version = "0.1.0" @@ -15458,6 +18755,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "w3f-bls" version = "0.1.3" @@ -15646,6 +18949,19 @@ dependencies = [ "cxx-build", ] +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasm-timer" version = "0.2.5" @@ -15661,6 +18977,37 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" +dependencies = [ + "smallvec", + "spin 0.9.8", + "wasmi_arena", + "wasmi_core", + "wasmparser-nostd", +] + +[[package]] +name = "wasmi_arena" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" + +[[package]] +name = "wasmi_core" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -15671,6 +19018,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -15895,6 +19251,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "which" version = "4.4.2" @@ -16249,6 +19611,17 @@ dependencies = [ "time", ] +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys 0.4.12", + "rustix 0.38.31", +] + [[package]] name = "xcm-emulator" version = "0.6.0" @@ -16273,11 +19646,11 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", "staging-xcm", @@ -16310,6 +19683,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "yap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" + [[package]] name = "yasna" version = "0.5.2" @@ -16359,6 +19738,142 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "zombienet-configuration" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dbe5721cebe0be12db36d5efd8c6f0dd473137dc0e3442b81bc79bd64507f70" +dependencies = [ + "anyhow", + "lazy_static", + "multiaddr 0.18.1", + "regex", + "serde", + "serde_json", + "thiserror", + "toml 0.7.8", + "url", + "zombienet-support", +] + +[[package]] +name = "zombienet-orchestrator" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d936c875d7e5c19751711b9e211408950f114444b0ed7d2155e552a239a2419" +dependencies = [ + "anyhow", + "futures", + "hex", + "libp2p 0.52.4", + "multiaddr 0.18.1", + "pjs-rs", + "rand", + "reqwest", + "serde_json", + "sha2 0.10.8", + "sp-core 31.0.0", + "subxt", + "subxt-signer", + "thiserror", + "tokio", + "tracing", + "uuid", + "zombienet-configuration", + "zombienet-prom-metrics-parser", + "zombienet-provider", + "zombienet-support", +] + +[[package]] +name = "zombienet-prom-metrics-parser" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b10ecce0d2ae02fb65d9003e961e18c3337a1e9e9dc431499b7b6d1dab984d0" +dependencies = [ + "pest", + "pest_derive", + "thiserror", +] + +[[package]] +name = "zombienet-provider" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b6fedfcadd090def727cd626b26c26d1072c44ea516fe781d7c60baf7f4a16" +dependencies = [ + "anyhow", + "async-trait", + "flate2", + "futures", + "hex", + "k8s-openapi", + "kube", + "nix 0.27.1", + "regex", + "reqwest", + "serde", + "serde_json", + "serde_yaml", + "sha2 0.10.8", + "tar", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "url", + "uuid", + "zombienet-configuration", + "zombienet-support", +] + +[[package]] +name = "zombienet-sdk" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76345c48a6ca7694935c8e3af91eea71d8950debfa6e61353dbd3f603522cd09" +dependencies = [ + "async-trait", + "futures", + "lazy_static", + "subxt", + "tokio", + "zombienet-configuration", + "zombienet-orchestrator", + "zombienet-provider", + "zombienet-support", +] + +[[package]] +name = "zombienet-sdk-tests" +version = "0.1.0" +dependencies = [ + "anyhow", + "log", + "subxt", + "tokio", + "tracing-subscriber 0.3.18", + "zombienet-sdk", +] + +[[package]] +name = "zombienet-support" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90b5dbc58de99a397b096acf8f520f547880017e5bea9dc5e5c1ee7719274373" +dependencies = [ + "anyhow", + "async-trait", + "futures", + "nix 0.27.1", + "rand", + "regex", + "reqwest", + "thiserror", + "tokio", + "uuid", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index feaa1e5d57..68871b7eb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -229,6 +229,10 @@ xcm = { version = "8.0.1", default-features = false, package = "staging-xcm" } xcm-builder = { version = "8.0.1", default-features = false, package = "staging-xcm-builder" } xcm-emulator = { version = "0.6.0" } xcm-executor = { version = "8.0.1", default-features = false, package = "staging-xcm-executor" } +anyhow = { version = "1.0.82" } +subxt = { version = "0.35.0", default-features = false } +tracing-subscriber = { version = "0.3.18" } +zombienet-sdk = { version = "0.2" } [workspace] resolver = "2" @@ -273,6 +277,7 @@ members = [ "system-parachains/encointer", "system-parachains/gluttons/glutton-kusama", "system-parachains/people/people-kusama", + "integration-tests/zombienet", ] [profile.release] diff --git a/integration-tests/zombienet/Cargo.toml b/integration-tests/zombienet/Cargo.toml new file mode 100644 index 0000000000..d72ed9b9e2 --- /dev/null +++ b/integration-tests/zombienet/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "zombienet-sdk-tests" +version = "0.1.0" +edition = "2021" + +[dependencies] +subxt = { features = ["native"] , workspace = true } +tokio = { workspace = true } +tracing-subscriber = { workspace = true } +zombienet-sdk = { workspace = true } +log = { workspace = true, default-features = true } +anyhow = { workspace = true } diff --git a/integration-tests/zombienet/src/environment.rs b/integration-tests/zombienet/src/environment.rs new file mode 100644 index 0000000000..b060b8e20f --- /dev/null +++ b/integration-tests/zombienet/src/environment.rs @@ -0,0 +1,51 @@ +//! Helpers functions to get configuration (e.g. Provider and images) from the env vars +use std::{env, future::Future, pin::Pin}; + +use zombienet_sdk::{LocalFileSystem, Network, NetworkConfig, NetworkConfigExt, OrchestratorError}; + +const DEFAULT_POLKADOT_IMAGE: &str = "docker.io/parity/polkadot:latest"; +const DEFAULT_CUMULUS_IMAGE: &str = "docker.io/parity/polkadot-parachain:latest"; + +#[derive(Debug, Default)] +pub struct Images { + pub polkadot: String, + pub cumulus: String, +} + +pub enum Provider { + Native, + K8s, + Docker, +} + +// Use `docker` as default provider +impl From for Provider { + fn from(value: String) -> Self { + match value.to_ascii_lowercase().as_ref() { + "native" => Provider::Native, + "k8s" => Provider::K8s, + _ => Provider::Docker, // default provider + } + } +} + +pub fn get_images_from_env() -> Images { + let polkadot = env::var("POLKADOT_IMAGE").unwrap_or(DEFAULT_POLKADOT_IMAGE.into()); + let cumulus = env::var("CUMULUS_IMAGE").unwrap_or(DEFAULT_CUMULUS_IMAGE.into()); + Images { polkadot, cumulus } +} + +pub fn get_provider_from_env() -> Provider { + env::var("ZOMBIE_PROVIDER").unwrap_or_default().into() +} + +type SpawnResult = Result, OrchestratorError>; +pub fn get_spawn_fn() -> fn(NetworkConfig) -> Pin + Send>> { + let provider = get_provider_from_env(); + + match provider { + Provider::Native => zombienet_sdk::NetworkConfig::spawn_native, + Provider::K8s => zombienet_sdk::NetworkConfig::spawn_k8s, + Provider::Docker => zombienet_sdk::NetworkConfig::spawn_docker, + } +} diff --git a/integration-tests/zombienet/src/lib.rs b/integration-tests/zombienet/src/lib.rs new file mode 100644 index 0000000000..3da344c952 --- /dev/null +++ b/integration-tests/zombienet/src/lib.rs @@ -0,0 +1,70 @@ +use anyhow::anyhow; +use subxt::{OnlineClient, PolkadotConfig}; +use zombienet_sdk::{NetworkConfig, NetworkConfigBuilder, NetworkNode}; + +pub mod environment; + +pub type Error = Box; + +// Chain generator command template +const CMD_TPL: &str = "chain-spec-generator {{chainName}}"; + +// Relaychain nodes +const ALICE: &str = "alice"; +const BOB: &str = "bob"; +// Collator +const COLLATOR: &str = "collator"; + +pub fn small_network() -> Result { + let images = environment::get_images_from_env(); + let config = NetworkConfigBuilder::new() + .with_relaychain(|r| { + r.with_chain("polkadot-local") + .with_default_command("polkadot") + .with_default_image(images.polkadot.as_str()) + .with_chain_spec_command(CMD_TPL) + .chain_spec_command_is_local(true) + .with_node(|node| node.with_name(ALICE)) + .with_node(|node| node.with_name(BOB)) + }) + .with_parachain(|p| { + p.with_id(2000).cumulus_based(true).with_collator(|n| { + n.with_name(COLLATOR) + .with_command("polkadot-parachain") + .with_image(images.cumulus.as_str()) + }) + }) + .build() + .map_err(|errs| { + let e = errs.iter().fold("".to_string(), |memo, err| format!("{memo} \n {err}")); + anyhow!(e) + })?; + + Ok(config) +} + +pub async fn wait_subxt_client( + node: &NetworkNode, +) -> Result, anyhow::Error> { + log::info!("trying to connect to: {}", node.ws_uri()); + loop { + match node.client::().await { + Ok(cli) => { + log::info!("returning client for: {}", node.ws_uri()); + return Ok(cli); + }, + Err(e) => { + log::trace!("{e:?}"); + if let subxt::Error::Rpc(subxt::error::RpcError::ClientError(ref inner)) = e { + log::trace!("inner: {inner}"); + if inner.to_string().contains("i/o error") { + // The node is not ready to accept connections yet + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + continue; + } + } + return Err(anyhow!("Cannot connect to node : {e:?}")); + }, + }; + } +} diff --git a/integration-tests/zombienet/tests/smoke.rs b/integration-tests/zombienet/tests/smoke.rs new file mode 100644 index 0000000000..7614d3ea0a --- /dev/null +++ b/integration-tests/zombienet/tests/smoke.rs @@ -0,0 +1,39 @@ +use std::time::Instant; +use subxt::ext::futures::StreamExt; +use zombienet_sdk_tests::{environment::get_spawn_fn, small_network, wait_subxt_client}; + +#[tokio::test(flavor = "multi_thread")] +async fn smoke() { + tracing_subscriber::fmt::init(); + + // config and env + let spawn_fn = get_spawn_fn(); + let config = small_network().unwrap(); + + // spawn + let now = Instant::now(); + let network = spawn_fn(config).await.unwrap(); + let elapsed = now.elapsed(); + log::info!("🚀🚀🚀🚀 network deployed in {:.2?}", elapsed); + + let alice = network.get_node("alice").unwrap(); + // wait until the subxt client is ready + let client = wait_subxt_client(alice).await.unwrap(); + + // wait 10 blocks + let mut blocks = client.blocks().subscribe_finalized().await.unwrap().take(10); + + while let Some(block) = blocks.next().await { + log::info!("Block #{}", block.unwrap().header().number); + } + + // wait 10 blocks on the parachain + let collator = network.get_node("collator").unwrap(); + let collator_client = wait_subxt_client(collator).await.unwrap(); + + let mut blocks = collator_client.blocks().subscribe_finalized().await.unwrap().take(10); + + while let Some(block) = blocks.next().await { + log::info!("Parachain Block #{}", block.unwrap().header().number); + } +} From a611c19299627dcf686e47b3d96aa10c2c735fd7 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Thu, 23 May 2024 09:52:00 +0200 Subject: [PATCH 06/20] Update Identity Patch (#323) Updates Identity to latest patch to support enabling usernames on Polkadot. - [x] Does not require a CHANGELOG entry --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b4be08509a..0d72442359 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9170,9 +9170,9 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "29.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e1cae19e30e7dc822c419988b30bb1318d79a8d5da92733822d0e84fe760ca" +checksum = "452bba25325b7f0148eeecbde13e7c26dfb677ad46b3f160b359d7643b44c94b" dependencies = [ "enumflags2", "frame-benchmarking", diff --git a/Cargo.toml b/Cargo.toml index 68871b7eb1..7cbb0430df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,7 +117,7 @@ pallet-encointer-scheduler = { version = "~6.1.0", default-features = false } pallet-fast-unstake = { version = "28.0.0", default-features = false } pallet-glutton = { version = "15.0.0", default-features = false } pallet-grandpa = { version = "29.0.0", default-features = false } -pallet-identity = { version = "29.0.0", default-features = false } +pallet-identity = { version = "29.0.1", default-features = false } pallet-indices = { version = "29.0.0", default-features = false } pallet-insecure-randomness-collective-flip = { version = "17.0.0", default-features = false } pallet-membership = { version = "29.0.0", default-features = false } From 8f44f910d487ad6bce06750bc6df10716df223c8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 29 May 2024 10:36:02 +0200 Subject: [PATCH 07/20] Add `establish_channel_with_system` to the HRMP pallet (#329) Allows any parachain to have bidirectional channel with any system parachains. Relates to: https://github.com/polkadot-fellows/RFCs/issues/82 Relates to: https://github.com/paritytech/polkadot-sdk/pull/3721 Relates to: https://github.com/paritytech/polkadot-sdk/pull/4332 - [x] regenerate weights for `runtime_parachains::hrmp` - [ ] Does not require a CHANGELOG entry ## Polkadot weights (the threshold moved from the default 5 to 0.1 to see some differences) ``` subweight compare commits --path-pattern "./relay/polkadot/**/weights/**/*.rs" --format markdown --no-color --change added changed --method asymptotic --ignore-errors --threshold 0.1 remotes/polkadot-fellows/main origin/bko-hrmp-patch ``` | File | Extrinsic | Old | New | Change [%] | |-------------------------------------------------------|-------------------------------|----------|----------|------------| | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | poke_channel_deposits | 137.20us | 140.03us | +2.06 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | hrmp_accept_open_channel | 555.89us | 563.03us | +1.28 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | hrmp_close_channel | 556.97us | 563.79us | +1.22 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | hrmp_init_open_channel | 732.03us | 740.10us | +1.10 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | force_open_hrmp_channel | 1.16ms | 1.17ms | +0.98 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | establish_system_channel | 1.15ms | 1.16ms | +0.69 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | force_process_hrmp_open | 102.05ms | 102.47ms | +0.42 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | force_clean_hrmp | 91.52ms | 91.86ms | +0.37 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | clean_open_channel_requests | 16.56ms | 16.61ms | +0.35 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | force_process_hrmp_close | 75.41ms | 75.65ms | +0.33 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | hrmp_cancel_open_request | 422.12us | 415.03us | -1.68 | | relay/polkadot/src/weights/runtime_parachains_hrmp.rs | establish_channel_with_system | | 1.67ms | Added | ## Kusama weights (the threshold moved from the default 5 to 0.1 to see some differences) ``` subweight compare commits --path-pattern "./relay/kusama/**/weights/**/*.rs" --format markdown --no-color --change added changed --method asymptotic --ignore-errors --threshold 0.1 remotes/polkadot-fellows/main origin/bko-hrmp-patch ``` | File | Extrinsic | Old | New | Change [%] | |-----------------------------------------------------|-------------------------------|----------|----------|------------| | relay/kusama/src/weights/runtime_parachains_hrmp.rs | poke_channel_deposits | 137.23us | 140.25us | +2.20 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | hrmp_close_channel | 557.39us | 564.18us | +1.22 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | hrmp_accept_open_channel | 556.49us | 563.23us | +1.21 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | hrmp_init_open_channel | 735.26us | 743.59us | +1.13 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | force_open_hrmp_channel | 1.16ms | 1.17ms | +0.97 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | establish_system_channel | 1.15ms | 1.16ms | +0.84 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | hrmp_cancel_open_request | 413.79us | 416.03us | +0.54 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | force_process_hrmp_open | 101.96ms | 102.43ms | +0.46 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | clean_open_channel_requests | 16.54ms | 16.61ms | +0.45 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | force_clean_hrmp | 91.43ms | 91.82ms | +0.43 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | force_process_hrmp_close | 75.34ms | 75.63ms | +0.40 | | relay/kusama/src/weights/runtime_parachains_hrmp.rs | establish_channel_with_system | | 1.67ms | Added | --- CHANGELOG.md | 1 + Cargo.lock | 4 +- relay/kusama/src/lib.rs | 12 ++ .../src/weights/runtime_parachains_hrmp.rs | 106 +++++++---- relay/polkadot/src/lib.rs | 15 +- .../src/weights/runtime_parachains_hrmp.rs | 172 ++++++++++-------- 6 files changed, 198 insertions(+), 112 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a90bc1708..f67e9e8a90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) +- Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 0d72442359..738c3bfda4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11712,9 +11712,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "8.0.1" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bcfd672be236fd1c38c702e7e99fe3f3e54df0ddb8127e542423221d1f50669" +checksum = "b8d37cd3e014b06daf396d1483b5327782a0ebadc816423419665166b75b3e3e" dependencies = [ "bitflags 1.3.2", "bitvec", diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index fe078da685..a26ebd9975 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -48,6 +48,7 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ assigner_coretime as parachains_assigner_coretime, assigner_on_demand as parachains_assigner_on_demand, configuration as parachains_configuration, + configuration::ActiveConfigHrmpChannelSizeAndCapacityRatio, coretime, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, @@ -1341,11 +1342,22 @@ impl pallet_message_queue::Config for Runtime { impl parachains_dmp::Config for Runtime {} +parameter_types! { + pub const HrmpChannelSizeAndCapacityWithSystemRatio: Percent = Percent::from_percent(100); +} + impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; type ChannelManager = EitherOf, GeneralAdmin>; type Currency = Balances; + // Use the `HrmpChannelSizeAndCapacityWithSystemRatio` ratio from the actual active + // `HostConfiguration` configuration for `hrmp_channel_max_message_size` and + // `hrmp_channel_max_capacity`. + type DefaultChannelSizeAndCapacityWithSystem = ActiveConfigHrmpChannelSizeAndCapacityRatio< + Runtime, + HrmpChannelSizeAndCapacityWithSystemRatio, + >; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } diff --git a/relay/kusama/src/weights/runtime_parachains_hrmp.rs b/relay/kusama/src/weights/runtime_parachains_hrmp.rs index 0e229ab21d..0f30f1c91c 100644 --- a/relay/kusama/src/weights/runtime_parachains_hrmp.rs +++ b/relay/kusama/src/weights/runtime_parachains_hrmp.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -66,8 +66,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `421` // Estimated: `3886` - // Minimum execution time: 34_128_000 picoseconds. - Weight::from_parts(35_256_000, 0) + // Minimum execution time: 42_630_000 picoseconds. + Weight::from_parts(43_590_000, 0) .saturating_add(Weight::from_parts(0, 3886)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -86,8 +86,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `411` // Estimated: `3876` - // Minimum execution time: 30_651_000 picoseconds. - Weight::from_parts(31_490_000, 0) + // Minimum execution time: 37_370_000 picoseconds. + Weight::from_parts(38_230_000, 0) .saturating_add(Weight::from_parts(0, 3876)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -106,8 +106,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `524` // Estimated: `3989` - // Minimum execution time: 31_244_000 picoseconds. - Weight::from_parts(32_392_000, 0) + // Minimum execution time: 38_720_000 picoseconds. + Weight::from_parts(39_180_000, 0) .saturating_add(Weight::from_parts(0, 3989)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -130,13 +130,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_177_153_000 picoseconds. - Weight::from_parts(1_192_970_000, 0) + // Minimum execution time: 1_398_677_000 picoseconds. + Weight::from_parts(1_404_458_000, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 106_710 - .saturating_add(Weight::from_parts(3_503_154, 0).saturating_mul(i.into())) - // Standard Error: 106_710 - .saturating_add(Weight::from_parts(3_480_995, 0).saturating_mul(e.into())) + // Standard Error: 132_665 + .saturating_add(Weight::from_parts(4_185_824, 0).saturating_mul(i.into())) + // Standard Error: 132_665 + .saturating_add(Weight::from_parts(4_236_545, 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()))) @@ -167,11 +167,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `459 + c * (136 ±0)` // Estimated: `1914 + c * (5086 ±0)` - // Minimum execution time: 5_963_000 picoseconds. - Weight::from_parts(5_228_724, 0) + // Minimum execution time: 7_470_000 picoseconds. + Weight::from_parts(7_620_000, 0) .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 15_470 - .saturating_add(Weight::from_parts(20_514_191, 0).saturating_mul(c.into())) + // Standard Error: 11_220 + .saturating_add(Weight::from_parts(24_184_130, 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)) @@ -195,11 +195,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: 4_969_000 picoseconds. - Weight::from_parts(7_208_744, 0) + // Minimum execution time: 6_500_000 picoseconds. + Weight::from_parts(6_580_000, 0) .saturating_add(Weight::from_parts(0, 1762)) - // Standard Error: 10_032 - .saturating_add(Weight::from_parts(12_527_166, 0).saturating_mul(c.into())) + // Standard Error: 11_719 + .saturating_add(Weight::from_parts(14_859_948, 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)) @@ -217,11 +217,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: 18_800_000 picoseconds. - Weight::from_parts(27_965_586, 0) + // Minimum execution time: 23_070_000 picoseconds. + Weight::from_parts(28_858_348, 0) .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 2_135 - .saturating_add(Weight::from_parts(84_530, 0).saturating_mul(c.into())) + // Standard Error: 1_253 + .saturating_add(Weight::from_parts(95_052, 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())) @@ -235,11 +235,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `210 + c * (63 ±0)` // Estimated: `1689 + c * (2538 ±0)` - // Minimum execution time: 3_642_000 picoseconds. - Weight::from_parts(6_869_380, 0) + // Minimum execution time: 4_760_000 picoseconds. + Weight::from_parts(6_559_187, 0) .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 3_822 - .saturating_add(Weight::from_parts(3_165_608, 0).saturating_mul(c.into())) + // Standard Error: 2_407 + .saturating_add(Weight::from_parts(3_748_834, 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)) @@ -271,11 +271,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `421 + c * (235 ±0)` // Estimated: `6361 + c * (235 ±0)` - // Minimum execution time: 48_286_000 picoseconds. - Weight::from_parts(50_472_132, 0) + // Minimum execution time: 58_270_000 picoseconds. + Weight::from_parts(59_761_806, 0) .saturating_add(Weight::from_parts(0, 6361)) - // Standard Error: 139_702 - .saturating_add(Weight::from_parts(10_844_067, 0).saturating_mul(c.into())) + // Standard Error: 71_483 + .saturating_add(Weight::from_parts(12_836_993, 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())) @@ -304,8 +304,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `421` // Estimated: `6361` - // Minimum execution time: 48_480_000 picoseconds. - Weight::from_parts(49_938_000, 0) + // Minimum execution time: 58_761_000 picoseconds. + Weight::from_parts(59_590_000, 0) .saturating_add(Weight::from_parts(0, 6361)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -316,10 +316,40 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `230` // Estimated: `3695` - // Minimum execution time: 11_525_000 picoseconds. - Weight::from_parts(12_232_000, 0) + // Minimum execution time: 14_750_000 picoseconds. + Weight::from_parts(15_250_000, 0) .saturating_add(Weight::from_parts(0, 3695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Paras::ParaLifecycles` (r:2 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequests` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpChannels` (r:2 w:0) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpEgressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpEgressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestsList` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestsList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpIngressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn establish_channel_with_system() -> Weight { + // Proof Size summary in bytes: + // Measured: `421` + // Estimated: `6361` + // Minimum execution time: 95_251_000 picoseconds. + Weight::from_parts(96_051_000, 0) + .saturating_add(Weight::from_parts(0, 6361)) + .saturating_add(T::DbWeight::get().reads(19)) + .saturating_add(T::DbWeight::get().writes(11)) + } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 694dc4c527..f03839195b 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -32,7 +32,9 @@ use polkadot_runtime_common::{ use runtime_parachains::{ assigner_parachains as parachains_assigner_parachains, - configuration as parachains_configuration, disputes as parachains_disputes, + configuration as parachains_configuration, + configuration::ActiveConfigHrmpChannelSizeAndCapacityRatio, + disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, inclusion::{AggregateMessageOrigin, UmpQueueId}, @@ -1365,11 +1367,22 @@ impl pallet_message_queue::Config for Runtime { impl parachains_dmp::Config for Runtime {} +parameter_types! { + pub const HrmpChannelSizeAndCapacityWithSystemRatio: Percent = Percent::from_percent(100); +} + impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; type ChannelManager = EitherOf, GeneralAdmin>; type Currency = Balances; + // Use the `HrmpChannelSizeAndCapacityWithSystemRatio` ratio from the actual active + // `HostConfiguration` configuration for `hrmp_channel_max_message_size` and + // `hrmp_channel_max_capacity`. + type DefaultChannelSizeAndCapacityWithSystem = ActiveConfigHrmpChannelSizeAndCapacityRatio< + Runtime, + HrmpChannelSizeAndCapacityWithSystemRatio, + >; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } diff --git a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs index f659eabd53..1f5b4b2aed 100644 --- a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs +++ b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -64,11 +64,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) fn hrmp_init_open_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `383` - // Estimated: `3848` - // Minimum execution time: 31_219_000 picoseconds. - Weight::from_parts(32_032_000, 0) - .saturating_add(Weight::from_parts(0, 3848)) + // Measured: `417` + // Estimated: `3882` + // Minimum execution time: 38_921_000 picoseconds. + Weight::from_parts(40_100_000, 0) + .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -84,11 +84,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) fn hrmp_accept_open_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `373` - // Estimated: `3838` - // Minimum execution time: 29_955_000 picoseconds. - Weight::from_parts(30_892_000, 0) - .saturating_add(Weight::from_parts(0, 3838)) + // Measured: `407` + // Estimated: `3872` + // Minimum execution time: 37_190_000 picoseconds. + Weight::from_parts(38_030_000, 0) + .saturating_add(Weight::from_parts(0, 3872)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -104,11 +104,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) fn hrmp_close_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `486` - // Estimated: `3951` - // Minimum execution time: 31_156_000 picoseconds. - Weight::from_parts(31_971_000, 0) - .saturating_add(Weight::from_parts(0, 3951)) + // Measured: `520` + // Estimated: `3985` + // Minimum execution time: 38_180_000 picoseconds. + Weight::from_parts(38_790_000, 0) + .saturating_add(Weight::from_parts(0, 3985)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -128,15 +128,15 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { // 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_206_960_000 picoseconds. - Weight::from_parts(1_214_086_000, 0) - .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 111_558 - .saturating_add(Weight::from_parts(4_003_489, 0).saturating_mul(i.into())) - // Standard Error: 111_558 - .saturating_add(Weight::from_parts(3_533_948, 0).saturating_mul(e.into())) + // Measured: `264 + e * (100 ±0) + i * (100 ±0)` + // Estimated: `3726 + e * (2575 ±0) + i * (2575 ±0)` + // Minimum execution time: 1_415_467_000 picoseconds. + Weight::from_parts(1_423_927_000, 0) + .saturating_add(Weight::from_parts(0, 3726)) + // Standard Error: 134_402 + .saturating_add(Weight::from_parts(4_225_111, 0).saturating_mul(i.into())) + // Standard Error: 134_402 + .saturating_add(Weight::from_parts(4_308_273, 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()))) @@ -165,13 +165,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `459 + c * (136 ±0)` - // Estimated: `1914 + c * (5086 ±0)` - // Minimum execution time: 5_805_000 picoseconds. - Weight::from_parts(5_935_000, 0) - .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 9_326 - .saturating_add(Weight::from_parts(21_220_967, 0).saturating_mul(c.into())) + // Measured: `492 + c * (136 ±0)` + // Estimated: `1947 + c * (5086 ±0)` + // Minimum execution time: 7_460_000 picoseconds. + Weight::from_parts(7_710_000, 0) + .saturating_add(Weight::from_parts(0, 1947)) + // Standard Error: 11_432 + .saturating_add(Weight::from_parts(24_532_037, 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)) @@ -193,13 +193,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `302 + c * (124 ±0)` - // Estimated: `1762 + c * (2600 ±0)` - // Minimum execution time: 4_907_000 picoseconds. - Weight::from_parts(4_991_000, 0) - .saturating_add(Weight::from_parts(0, 1762)) - // Standard Error: 9_039 - .saturating_add(Weight::from_parts(13_113_544, 0).saturating_mul(c.into())) + // Measured: `335 + c * (124 ±0)` + // Estimated: `1795 + c * (2600 ±0)` + // Minimum execution time: 6_510_000 picoseconds. + Weight::from_parts(6_660_000, 0) + .saturating_add(Weight::from_parts(0, 1795)) + // Standard Error: 9_192 + .saturating_add(Weight::from_parts(15_015_541, 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)) @@ -215,13 +215,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `993 + c * (13 ±0)` - // Estimated: `4262 + c * (15 ±0)` - // Minimum execution time: 17_005_000 picoseconds. - Weight::from_parts(26_447_233, 0) - .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 2_609 - .saturating_add(Weight::from_parts(161_489, 0).saturating_mul(c.into())) + // Measured: `1026 + c * (13 ±0)` + // Estimated: `4295 + c * (15 ±0)` + // Minimum execution time: 20_840_000 picoseconds. + Weight::from_parts(28_805_122, 0) + .saturating_add(Weight::from_parts(0, 4295)) + // Standard Error: 1_791 + .saturating_add(Weight::from_parts(87_699, 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())) @@ -233,13 +233,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `210 + c * (63 ±0)` - // Estimated: `1689 + c * (2538 ±0)` - // Minimum execution time: 3_603_000 picoseconds. - Weight::from_parts(3_405_840, 0) - .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 3_380 - .saturating_add(Weight::from_parts(3_332_975, 0).saturating_mul(c.into())) + // Measured: `243 + c * (63 ±0)` + // Estimated: `1722 + c * (2538 ±0)` + // Minimum execution time: 4_760_000 picoseconds. + Weight::from_parts(6_580_900, 0) + .saturating_add(Weight::from_parts(0, 1722)) + // Standard Error: 2_207 + .saturating_add(Weight::from_parts(3_764_182, 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)) @@ -269,13 +269,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 1]`. fn force_open_hrmp_channel(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `383 + c * (235 ±0)` - // Estimated: `6323 + c * (235 ±0)` - // Minimum execution time: 45_605_000 picoseconds. - Weight::from_parts(47_241_226, 0) - .saturating_add(Weight::from_parts(0, 6323)) - // Standard Error: 111_463 - .saturating_add(Weight::from_parts(13_425_473, 0).saturating_mul(c.into())) + // Measured: `417 + c * (235 ±0)` + // Estimated: `6357 + c * (235 ±0)` + // Minimum execution time: 55_481_000 picoseconds. + Weight::from_parts(56_521_438, 0) + .saturating_add(Weight::from_parts(0, 6357)) + // Standard Error: 51_617 + .saturating_add(Weight::from_parts(15_539_561, 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())) @@ -302,11 +302,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: `383` - // Estimated: `6323` - // Minimum execution time: 46_515_000 picoseconds. - Weight::from_parts(47_261_000, 0) - .saturating_add(Weight::from_parts(0, 6323)) + // Measured: `417` + // Estimated: `6357` + // Minimum execution time: 54_501_000 picoseconds. + Weight::from_parts(55_190_000, 0) + .saturating_add(Weight::from_parts(0, 6357)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -314,12 +314,42 @@ 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: `230` - // Estimated: `3695` - // Minimum execution time: 11_836_000 picoseconds. - Weight::from_parts(12_202_000, 0) - .saturating_add(Weight::from_parts(0, 3695)) + // Measured: `263` + // Estimated: `3728` + // Minimum execution time: 14_291_000 picoseconds. + Weight::from_parts(15_030_000, 0) + .saturating_add(Weight::from_parts(0, 3728)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Paras::ParaLifecycles` (r:2 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequests` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpChannels` (r:2 w:0) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpEgressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpEgressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestsList` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestsList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpIngressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn establish_channel_with_system() -> Weight { + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `6357` + // Minimum execution time: 92_531_000 picoseconds. + Weight::from_parts(93_341_000, 0) + .saturating_add(Weight::from_parts(0, 6357)) + .saturating_add(T::DbWeight::get().reads(19)) + .saturating_add(T::DbWeight::get().writes(11)) + } } From aabf6dbda84d1da498d211942e4245695dfb7020 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 30 May 2024 15:28:49 +0200 Subject: [PATCH 08/20] Unpin log (#335) Preparation for updating the SDK version. Closes #333 Changes: - Update zombienet-sdk. - Update log to 0.4.21 to verify.
cargo update output

```pre Updating crates.io index Removing aes-kw v0.2.1 Removing alloc-no-stdlib v2.0.4 Removing alloc-stdlib v0.2.2 Removing ast_node v0.9.5 Removing async-compression v0.4.10 Removing base64-simd v0.7.0 Removing base64-simd v0.8.0 Removing better_scoped_tls v0.1.1 Removing block-padding v0.3.3 Removing brotli v6.0.0 Removing brotli-decompressor v4.0.0 Removing cbc v0.1.2 Removing cmake v0.1.50 Removing dashmap v5.5.3 Removing data-url v0.3.0 Removing debugid v0.8.0 Removing deno_ast v0.31.6 Removing deno_console v0.123.0 Removing deno_core v0.229.0 Removing deno_crypto v0.137.0 Removing deno_fetch v0.147.0 Removing deno_media_type v0.1.4 Removing deno_native_certs v0.2.0 Removing deno_net v0.115.0 Removing deno_ops v0.105.0 Removing deno_tls v0.110.0 Removing deno_unsync v0.3.3 Removing deno_url v0.123.0 Removing deno_web v0.154.0 Removing deno_webidl v0.123.0 Removing deno_websocket v0.128.0 Removing dlopen2 v0.6.1 Removing dlopen2_derive v0.4.0 Removing dprint-swc-ext v0.13.0 Removing fastwebsockets v0.5.0 Removing from_variant v0.1.6 Removing fslock v0.1.8 Removing hstr v0.2.10 Removing if_chain v1.0.2 Removing is-macro v0.3.5 Removing libz-ng-sys v1.1.15 Removing new_debug_unreachable v1.0.6 Removing num-bigint-dig v0.8.4 Removing num-iter v0.1.44 Removing outref v0.1.0 Removing outref v0.5.1 Removing p256 v0.13.2 Removing p384 v0.13.0 Removing pathdiff v0.2.1 Removing pem-rfc7468 v0.7.0 Removing phf v0.11.2 Removing phf_generator v0.11.2 Removing phf_macros v0.11.2 Removing phf_shared v0.11.2 Removing pjs-rs v0.1.2 Removing pkcs1 v0.7.5 Removing pmutil v0.6.1 Removing primeorder v0.13.6 Removing proc-macro-rules v0.4.0 Removing proc-macro-rules-macros v0.4.0 Removing rsa v0.9.6 Removing rustls-tokio-stream v0.2.9 Removing ryu-js v1.0.1 Removing scoped-tls v1.0.1 Removing serde_v8 v0.138.0 Removing sha-1 v0.10.0 Removing simd-abstraction v0.7.1 Removing simdutf8 v0.1.4 Removing smartstring v1.0.1 Removing sourcemap v6.4.1 Removing sourcemap v7.1.1 Removing stacker v0.1.15 Removing string_enum v0.4.1 Removing swc_atoms v0.6.4 Removing swc_common v0.33.9 Removing swc_config v0.1.7 Removing swc_config_macro v0.1.2 Removing swc_ecma_ast v0.110.10 Removing swc_ecma_codegen v0.146.32 Removing swc_ecma_codegen_macros v0.7.3 Removing swc_ecma_loader v0.45.10 Removing swc_ecma_parser v0.141.26 Removing swc_ecma_transforms_base v0.134.42 Removing swc_ecma_transforms_classes v0.123.43 Removing swc_ecma_transforms_macros v0.5.3 Removing swc_ecma_transforms_proposal v0.168.52 Removing swc_ecma_transforms_react v0.180.52 Removing swc_ecma_transforms_typescript v0.185.52 Removing swc_ecma_utils v0.124.32 Removing swc_ecma_visit v0.96.10 Removing swc_eq_ignore_macros v0.1.2 Removing swc_macros_common v0.3.8 Removing swc_visit v0.5.7 Removing swc_visit_macros v0.5.8 Removing text_lines v0.6.0 Removing tokio-socks v0.5.1 Removing triomphe v0.1.11 Removing typed-arena v2.0.2 Removing unic-char-property v0.9.0 Removing unic-char-range v0.9.0 Removing unic-common v0.9.0 Removing unic-ucd-ident v0.9.0 Removing unic-ucd-version v0.9.0 Removing unicode-id v0.3.4 Removing unicode-id-start v1.1.2 Removing urlpattern v0.2.0 Removing v8 v0.81.0 Removing vsimd v0.8.0 Removing wasm-streams v0.4.0 Removing webpki-roots v0.25.4 Updating zombienet-configuration v0.2.2 -> v0.2.3 Updating zombienet-orchestrator v0.2.2 -> v0.2.3 Updating zombienet-prom-metrics-parser v0.2.2 -> v0.2.3 Updating zombienet-provider v0.2.2 -> v0.2.3 Updating zombienet-sdk v0.2.2 -> v0.2.3 Updating zombienet-support v0.2.2 -> v0.2.3 ```

- [x] Does not require a CHANGELOG entry --------- Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 1598 ++++------------------------------------------------ Cargo.toml | 2 +- 2 files changed, 100 insertions(+), 1500 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 738c3bfda4..7e8c4fcb62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,15 +71,6 @@ dependencies = [ "subtle 2.5.0", ] -[[package]] -name = "aes-kw" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fa2b352dcefb5f7f3a5fb840e02665d311d878955380515e4fd50095dd3d8c" -dependencies = [ - "aes", -] - [[package]] name = "ahash" version = "0.7.8" @@ -113,21 +104,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" version = "0.2.16" @@ -895,19 +871,6 @@ dependencies = [ "substrate-wasm-builder", ] -[[package]] -name = "ast_node" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09c69dffe06d222d072c878c3afe86eee2179806f20503faec97250268b4c24" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - [[package]] name = "async-channel" version = "1.9.0" @@ -932,20 +895,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "async-compression" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c90a406b4495d129f00461241616194cb8a032c8d1c53c657f0961d5f8e0498" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite 0.2.13", - "tokio", -] - [[package]] name = "async-executor" version = "1.11.0" @@ -1179,25 +1128,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64-simd" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" -dependencies = [ - "simd-abstraction", -] - -[[package]] -name = "base64-simd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" -dependencies = [ - "outref 0.5.1", - "vsimd", -] - [[package]] name = "base64ct" version = "1.6.0" @@ -1213,15 +1143,6 @@ dependencies = [ "serde", ] -[[package]] -name = "better_scoped_tls" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" -dependencies = [ - "scoped-tls", -] - [[package]] name = "binary-merkle-tree" version = "14.0.0" @@ -1409,7 +1330,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -1442,15 +1363,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "blocking" version = "1.6.0" @@ -2136,27 +2048,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "brotli" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bs58" version = "0.4.0" @@ -2270,15 +2161,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "cc" version = "1.0.83" @@ -2497,15 +2379,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - [[package]] name = "coarsetime" version = "0.1.34" @@ -3511,19 +3384,6 @@ dependencies = [ "syn 2.0.52", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.3", - "lock_api", - "once_cell", - "parking_lot_core 0.9.9", -] - [[package]] name = "data-encoding" version = "2.5.0" @@ -3551,430 +3411,149 @@ dependencies = [ ] [[package]] -name = "data-url" -version = "0.3.0" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] [[package]] -name = "debugid" -version = "0.8.0" +name = "der-parser" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "serde", - "uuid", + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] -name = "deno_ast" -version = "0.31.6" +name = "deranged" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7b09db895527a94de1305455338926cd2a7003231ba589b7b7b57e8da344f2" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ - "anyhow", - "base64 0.13.1", - "deno_media_type", - "dprint-swc-ext", - "serde", - "swc_atoms", - "swc_common", - "swc_config", - "swc_config_macro", - "swc_ecma_ast", - "swc_ecma_codegen", - "swc_ecma_codegen_macros", - "swc_ecma_loader", - "swc_ecma_parser", - "swc_ecma_transforms_base", - "swc_ecma_transforms_classes", - "swc_ecma_transforms_macros", - "swc_ecma_transforms_proposal", - "swc_ecma_transforms_react", - "swc_ecma_transforms_typescript", - "swc_ecma_utils", - "swc_ecma_visit", - "swc_eq_ignore_macros", - "swc_macros_common", - "swc_visit", - "swc_visit_macros", - "text_lines", - "url", + "powerfmt", ] [[package]] -name = "deno_console" -version = "0.123.0" +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2c95a58acd6924e1a6fd2fd250168d72a33829560e2d16503601dea483b986" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "deno_core", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "deno_core" -version = "0.229.0" +name = "derive-syn-parse" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bba7ed998f57ecd03640a82e6ddef281328b6d4c48c55e9e17cd906bab08020" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ - "anyhow", - "bytes", - "deno_ops", - "deno_unsync", - "futures", - "libc", - "log", - "parking_lot 0.12.1", - "pin-project", - "serde", - "serde_json", - "serde_v8", - "smallvec", - "sourcemap 7.1.1", - "tokio", - "url", - "v8", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "deno_crypto" -version = "0.137.0" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e2ec7c7d3e3f8d420ca5f4b0f2c306f69f2659546ce8c0bca75cada741c2d00" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "aes", - "aes-gcm", - "aes-kw", - "base64 0.21.6", - "cbc", - "const-oid", - "ctr", - "curve25519-dalek 4.1.2", - "deno_core", - "deno_web", - "elliptic-curve", - "num-traits", - "once_cell", - "p256", - "p384", - "rand", - "ring 0.17.7", - "rsa", - "serde", - "serde_bytes", - "sha1", - "sha2 0.10.8", - "signature", - "spki", - "tokio", - "uuid", - "x25519-dalek 2.0.0", + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", ] [[package]] -name = "deno_fetch" -version = "0.147.0" +name = "difflib" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3d87a2ada23581784bf3dc24d9aa693592a3b8c32529709c9b7c1f0f32757f" -dependencies = [ - "bytes", - "data-url", - "deno_core", - "deno_tls", - "dyn-clone", - "http", - "reqwest", - "serde", - "tokio", - "tokio-util", -] +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] -name = "deno_media_type" -version = "0.1.4" +name = "digest" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8978229b82552bf8457a0125aa20863f023619cfc21ebb007b1e571d68fd85b" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "data-url", - "serde", - "url", + "generic-array 0.12.4", ] [[package]] -name = "deno_native_certs" -version = "0.2.0" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4785d0bdc13819b665b71e4fb7e119d859568471e4c245ec5610857e70c9345" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "dlopen2", - "dlopen2_derive", - "once_cell", - "rustls-native-certs 0.6.3", - "rustls-pemfile 1.0.4", + "generic-array 0.14.7", ] [[package]] -name = "deno_net" -version = "0.115.0" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18c046d001c269ecca9e26614247b41c05309b2698c6999c6506e8d73fa0b4cc" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "deno_core", - "deno_tls", - "enum-as-inner", - "log", - "pin-project", - "serde", - "socket2 0.5.5", - "tokio", - "trust-dns-proto", - "trust-dns-resolver", + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle 2.5.0", ] [[package]] -name = "deno_ops" -version = "0.105.0" +name = "directories" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32976e42a50a1ac64d065a9219f5daf82a3ad6938da9d4aa3071890c08e1cd97" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ - "proc-macro-rules", - "proc-macro2", - "quote", - "strum 0.25.0", - "strum_macros 0.25.3", - "syn 2.0.52", - "thiserror", + "dirs-sys", ] [[package]] -name = "deno_tls" -version = "0.110.0" +name = "directories-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6e0d8e5f5f8b7458a07ecb36f46c7faf2ba096f34bb758e48d2adfcfaa8669" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "deno_core", - "deno_native_certs", - "once_cell", - "rustls 0.21.10", - "rustls-pemfile 1.0.4", - "rustls-webpki 0.101.7", - "serde", - "webpki-roots 0.25.4", + "cfg-if", + "dirs-sys-next", ] [[package]] -name = "deno_unsync" -version = "0.3.3" +name = "dirs-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d79c7af81e0a5ac75cff7b2fff4d1896e2bff694c688258edf21ef8a519736" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ - "tokio", + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", ] [[package]] -name = "deno_url" -version = "0.123.0" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c59b8d04724435e5df8d7b35149ec4035b059f3f23bf7fd2edadaed3c13b2f" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ - "deno_core", - "serde", - "urlpattern", -] - -[[package]] -name = "deno_web" -version = "0.154.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a054195576d4629bb1dde11756d8ba980f6a7c2805d3f21c83dfde8d0d4bd6f6" -dependencies = [ - "async-trait", - "base64-simd 0.8.0", - "bytes", - "deno_core", - "encoding_rs", - "flate2", - "futures", - "serde", - "tokio", - "uuid", - "windows-sys 0.48.0", -] - -[[package]] -name = "deno_webidl" -version = "0.123.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32dfb321f1b1f48faef5e2ffa94c870204b29c4aa86a37d1b1eb6c7921448286" -dependencies = [ - "deno_core", -] - -[[package]] -name = "deno_websocket" -version = "0.128.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962904d08031473676e5ce303e8181fc3bab91a06bb27795242619667edc11f4" -dependencies = [ - "bytes", - "deno_core", - "deno_net", - "deno_tls", - "fastwebsockets", - "h2", - "http", - "hyper", - "once_cell", - "rustls-tokio-stream", - "serde", - "tokio", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - -[[package]] -name = "der-parser" -version = "8.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" -dependencies = [ - "asn1-rs", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "deranged" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive-syn-parse" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "difflib" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle 2.5.0", -] - -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "directories-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", + "libc", + "redox_users", + "winapi", ] [[package]] @@ -3988,29 +3567,6 @@ dependencies = [ "syn 2.0.52", ] -[[package]] -name = "dlopen2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bc2c7ed06fd72a8513ded8d0d2f6fd2655a85d6885c48cae8625d80faf28c03" -dependencies = [ - "dlopen2_derive", - "libc", - "once_cell", - "winapi", -] - -[[package]] -name = "dlopen2_derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "docify" version = "0.2.7" @@ -4050,22 +3606,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" -[[package]] -name = "dprint-swc-ext" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2f24ce6b89a06ae3eb08d5d4f88c05d0aef1fa58e2eba8dd92c97b84210c25" -dependencies = [ - "bumpalo", - "num-bigint", - "rustc-hash", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_parser", - "text_lines", -] - [[package]] name = "dtoa" version = "1.0.9" @@ -4192,8 +3732,6 @@ dependencies = [ "ff", "generic-array 0.14.7", "group", - "hkdf", - "pem-rfc7468", "pkcs8", "rand_core 0.6.4", "sec1", @@ -4655,23 +4193,6 @@ dependencies = [ "bytes", ] -[[package]] -name = "fastwebsockets" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c35f166afb94b7f8e9449d0ad866daca111ba4053f3b1960bb480ca4382c63" -dependencies = [ - "base64 0.21.6", - "hyper", - "pin-project", - "rand", - "sha1", - "simdutf8", - "thiserror", - "tokio", - "utf-8", -] - [[package]] name = "fatality" version = "0.0.6" @@ -4786,7 +4307,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", - "libz-ng-sys", "libz-sys", "miniz_oxide", ] @@ -5161,18 +4681,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "from_variant" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ec5dc38ee19078d84a692b1c41181ff9f94331c76cee66ff0208c770b5e54f" -dependencies = [ - "pmutil", - "proc-macro2", - "swc_macros_common", - "syn 2.0.52", -] - [[package]] name = "fs-err" version = "2.11.0" @@ -5192,16 +4700,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fslock" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57eafdd0c16f57161105ae1b98a1238f97645f2f588438b2949c99a2af9616bf" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "funty" version = "2.0.0" @@ -5668,20 +5166,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "hstr" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" -dependencies = [ - "hashbrown 0.14.3", - "new_debug_unreachable", - "once_cell", - "phf", - "rustc-hash", - "triomphe", -] - [[package]] name = "http" version = "0.2.11" @@ -5872,12 +5356,6 @@ dependencies = [ "windows", ] -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - [[package]] name = "impl-codec" version = "0.6.0" @@ -5992,7 +5470,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding 0.3.3", "generic-array 0.14.7", ] @@ -6069,18 +5546,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "is-terminal" version = "0.4.9" @@ -6650,9 +6115,6 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] [[package]] name = "lazycell" @@ -7173,7 +6635,7 @@ dependencies = [ "rw-stream-sink 0.3.0", "soketto", "url", - "webpki-roots 0.22.6", + "webpki-roots", ] [[package]] @@ -7263,16 +6725,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "libz-ng-sys" -version = "1.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6409efc61b12687963e602df8ecf70e8ddacf95bc6576bcf16e3ac6328083c5" -dependencies = [ - "cmake", - "libc", -] - [[package]] name = "libz-sys" version = "1.1.14" @@ -7353,9 +6805,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" @@ -8021,12 +7473,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nix" version = "0.24.3" @@ -8102,25 +7548,6 @@ dependencies = [ "autocfg", "num-integer", "num-traits", - "rand", - "serde", -] - -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand", - "smallvec", - "zeroize", ] [[package]] @@ -8152,17 +7579,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -8350,48 +7766,12 @@ dependencies = [ "num-traits", ] -[[package]] -name = "outref" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" - -[[package]] -name = "outref" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" - [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", -] - [[package]] name = "pallet-alliance" version = "28.0.0" @@ -10247,12 +9627,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - [[package]] name = "pbkdf2" version = "0.8.0" @@ -10297,15 +9671,6 @@ dependencies = [ "serde", ] -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - [[package]] name = "penpal-emulated-chain" version = "1.0.0" @@ -10544,48 +9909,6 @@ dependencies = [ "indexmap 2.2.6", ] -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher 0.3.11", -] - [[package]] name = "pin-project" version = "1.1.3" @@ -10635,37 +9958,6 @@ dependencies = [ "futures-io", ] -[[package]] -name = "pjs-rs" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b067cdd22927cb66388a62e37435dd1127b657c06144ce6fcb0fcd810c6abf97" -dependencies = [ - "deno_ast", - "deno_console", - "deno_core", - "deno_crypto", - "deno_fetch", - "deno_tls", - "deno_url", - "deno_web", - "deno_webidl", - "deno_websocket", - "log", - "tokio", -] - -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der", - "pkcs8", - "spki", -] - [[package]] name = "pkcs8" version = "0.10.2" @@ -10688,17 +9980,6 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" -[[package]] -name = "pmutil" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "polkadot-approval-distribution" version = "8.0.0" @@ -12104,15 +11385,6 @@ dependencies = [ "syn 2.0.52", ] -[[package]] -name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" -dependencies = [ - "elliptic-curve", -] - [[package]] name = "primitive-types" version = "0.12.2" @@ -12196,29 +11468,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-rules" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" -dependencies = [ - "proc-macro-rules-macros", - "proc-macro2", - "syn 2.0.52", -] - -[[package]] -name = "proc-macro-rules-macros" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "207fffb0fe655d1d47f6af98cc2793405e85929bdbc420d685554ff07be27ac7" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "proc-macro-warning" version = "1.0.0" @@ -12692,7 +11941,6 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "async-compression", "base64 0.21.6", "bytes", "encoding_rs", @@ -12702,7 +11950,6 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -12712,7 +11959,6 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite 0.2.13", - "rustls 0.21.10", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -12721,16 +11967,11 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.24.1", - "tokio-socks", - "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", - "webpki-roots 0.25.4", "winreg", ] @@ -12829,26 +12070,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rsa" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" -dependencies = [ - "const-oid", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8", - "rand_core 0.6.4", - "signature", - "spki", - "subtle 2.5.0", - "zeroize", -] - [[package]] name = "rtnetlink" version = "0.10.1" @@ -13073,17 +12294,6 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" -[[package]] -name = "rustls-tokio-stream" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cae64d5219dfdd7f2d18dda421a2137ebdd63be6d0dc53d7836003f224f3d0" -dependencies = [ - "futures", - "rustls 0.21.10", - "tokio", -] - [[package]] name = "rustls-webpki" version = "0.101.7" @@ -13162,12 +12372,6 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" -[[package]] -name = "ryu-js" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" - [[package]] name = "safe-mix" version = "1.0.1" @@ -14538,12 +13742,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" @@ -14752,7 +13950,6 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ - "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -14779,21 +13976,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_v8" -version = "0.138.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add36cea4acc8cbfa4a1614a9e985e1057fd6748b672c8b4c4496f889d25e539" -dependencies = [ - "bytes", - "derive_more", - "num-bigint", - "serde", - "smallvec", - "thiserror", - "v8", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -14830,17 +14012,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha-1" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha1" version = "0.10.6" @@ -14945,21 +14116,6 @@ dependencies = [ "wide", ] -[[package]] -name = "simd-abstraction" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" -dependencies = [ - "outref 0.1.0", -] - -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - [[package]] name = "simple-mermaid" version = "0.1.1" @@ -15021,17 +14177,6 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" -[[package]] -name = "smartstring" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" -dependencies = [ - "autocfg", - "static_assertions", - "version_check", -] - [[package]] name = "smol" version = "2.0.0" @@ -15598,40 +14743,7 @@ dependencies = [ "httparse", "log", "rand", - "sha-1 0.9.8", -] - -[[package]] -name = "sourcemap" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" -dependencies = [ - "data-encoding", - "debugid", - "if_chain", - "rustc_version 0.2.3", - "serde", - "serde_json", - "unicode-id", - "url", -] - -[[package]] -name = "sourcemap" -version = "7.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7768edd06c02535e0d50653968f46e1e0d3aa54742190d35dd9466f59de9c71" -dependencies = [ - "base64-simd 0.7.0", - "data-encoding", - "debugid", - "if_chain", - "rustc_version 0.2.3", - "serde", - "serde_json", - "unicode-id-start", - "url", + "sha-1", ] [[package]] @@ -16757,21 +15869,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "staging-kusama-runtime" -version = "1.0.0" +name = "staging-kusama-runtime" +version = "1.0.0" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -16983,19 +16082,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "string_enum" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fa4d4f81d7c05b9161f8de839975d3326328b8ba2831164b465524cc2f55252" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - [[package]] name = "strobe-rs" version = "0.8.1" @@ -17035,9 +16121,6 @@ name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.3", -] [[package]] name = "strum_macros" @@ -17348,345 +16431,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "swc_atoms" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a9e1b6d97f27b6abe5571f8fe3bdbd2fa987299fc2126450c7cde6214896ef" -dependencies = [ - "hstr", - "once_cell", - "rustc-hash", - "serde", -] - -[[package]] -name = "swc_common" -version = "0.33.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccb656cd57c93614e4e8b33a60e75ca095383565c1a8d2bbe6a1103942831e0" -dependencies = [ - "ast_node", - "better_scoped_tls", - "cfg-if", - "either", - "from_variant", - "new_debug_unreachable", - "num-bigint", - "once_cell", - "rustc-hash", - "serde", - "siphasher 0.3.11", - "sourcemap 6.4.1", - "swc_atoms", - "swc_eq_ignore_macros", - "swc_visit", - "tracing", - "unicode-width", - "url", -] - -[[package]] -name = "swc_config" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba1c7a40d38f9dd4e9a046975d3faf95af42937b34b2b963be4d8f01239584b" -dependencies = [ - "indexmap 1.9.3", - "serde", - "serde_json", - "swc_config_macro", -] - -[[package]] -name = "swc_config_macro" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5b5aaca9a0082be4515f0fbbecc191bf5829cd25b5b9c0a2810f6a2bb0d6829" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "swc_ecma_ast" -version = "0.110.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d416121da2d56bcbd1b1623725a68890af4552fef0c6d1e4bfa92776ccd6a" -dependencies = [ - "bitflags 2.4.1", - "is-macro", - "num-bigint", - "phf", - "scoped-tls", - "serde", - "string_enum", - "swc_atoms", - "swc_common", - "unicode-id", -] - -[[package]] -name = "swc_ecma_codegen" -version = "0.146.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7b37ef40385cc2e294ece3d42048dcda6392838724dd5f02ff8da3fa105271" -dependencies = [ - "memchr", - "num-bigint", - "once_cell", - "rustc-hash", - "serde", - "sourcemap 6.4.1", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_codegen_macros", - "tracing", -] - -[[package]] -name = "swc_ecma_codegen_macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcdff076dccca6cc6a0e0b2a2c8acfb066014382bc6df98ec99e755484814384" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "swc_ecma_loader" -version = "0.45.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31cf7549feec3698d0110a0a71ae547f31ae272dc92db3285ce126d6dcbdadf3" -dependencies = [ - "anyhow", - "pathdiff", - "serde", - "swc_common", - "tracing", -] - -[[package]] -name = "swc_ecma_parser" -version = "0.141.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9590deff1b29aafbff8901b9d38d00211393f6b17b5cab878562db89a8966d88" -dependencies = [ - "either", - "new_debug_unreachable", - "num-bigint", - "num-traits", - "phf", - "serde", - "smallvec", - "smartstring", - "stacker", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "tracing", - "typed-arena", -] - -[[package]] -name = "swc_ecma_transforms_base" -version = "0.134.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d74ca42a400257d8563624122813c1849c3d87e7abe3b9b2ed7514c76f64ad2f" -dependencies = [ - "better_scoped_tls", - "bitflags 2.4.1", - "indexmap 1.9.3", - "once_cell", - "phf", - "rustc-hash", - "serde", - "smallvec", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_parser", - "swc_ecma_utils", - "swc_ecma_visit", - "tracing", -] - -[[package]] -name = "swc_ecma_transforms_classes" -version = "0.123.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e68880cf7d65b93e0446b3ee079f33d94e0eddac922f75b736a6ea7669517c0" -dependencies = [ - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_transforms_base", - "swc_ecma_utils", - "swc_ecma_visit", -] - -[[package]] -name = "swc_ecma_transforms_macros" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8188eab297da773836ef5cf2af03ee5cca7a563e1be4b146f8141452c28cc690" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "swc_ecma_transforms_proposal" -version = "0.168.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e1f409e026be953fabb327923ebc5fdc7c664bcac036b76107834798640ed" -dependencies = [ - "either", - "rustc-hash", - "serde", - "smallvec", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_transforms_base", - "swc_ecma_transforms_classes", - "swc_ecma_transforms_macros", - "swc_ecma_utils", - "swc_ecma_visit", -] - -[[package]] -name = "swc_ecma_transforms_react" -version = "0.180.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa7f368a80f28eeaa0f529cff6fb5d7578ef10a60be25bfd2582cb3f8ff5c9e" -dependencies = [ - "base64 0.13.1", - "dashmap", - "indexmap 1.9.3", - "once_cell", - "serde", - "sha-1 0.10.0", - "string_enum", - "swc_atoms", - "swc_common", - "swc_config", - "swc_ecma_ast", - "swc_ecma_parser", - "swc_ecma_transforms_base", - "swc_ecma_transforms_macros", - "swc_ecma_utils", - "swc_ecma_visit", -] - -[[package]] -name = "swc_ecma_transforms_typescript" -version = "0.185.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa2950c85abb4d555e092503ad2fa4f6dec0ee36a719273fb7a7bb29ead9ab6" -dependencies = [ - "ryu-js", - "serde", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_transforms_base", - "swc_ecma_transforms_react", - "swc_ecma_utils", - "swc_ecma_visit", -] - -[[package]] -name = "swc_ecma_utils" -version = "0.124.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a4a0baf6cfa490666a9fe23a17490273f843d19ebc1d6ec89d64c3f8ccdb80" -dependencies = [ - "indexmap 1.9.3", - "num_cpus", - "once_cell", - "rustc-hash", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_visit", - "tracing", - "unicode-id", -] - -[[package]] -name = "swc_ecma_visit" -version = "0.96.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba962f0becf83bab12a17365dface5a4f636c9e1743d479e292b96910a753743" -dependencies = [ - "num-bigint", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_visit", - "tracing", -] - -[[package]] -name = "swc_eq_ignore_macros" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05a95d367e228d52484c53336991fdcf47b6b553ef835d9159db4ba40efb0ee8" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "swc_macros_common" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a273205ccb09b51fabe88c49f3b34c5a4631c4c00a16ae20e03111d6a42e832" -dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "swc_visit" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c337fbb2d191bf371173dea6a957f01899adb8f189c6c31b122a6cfc98fc3" -dependencies = [ - "either", - "swc_visit_macros", -] - -[[package]] -name = "swc_visit_macros" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f322730fb82f3930a450ac24de8c98523af7d34ab8cb2f46bcb405839891a99" -dependencies = [ - "Inflector", - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - [[package]] name = "syn" version = "1.0.109" @@ -17835,15 +16579,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "text_lines" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd5828de7deaa782e1dd713006ae96b3bee32d3279b79eb67ecf8072c059bcf" -dependencies = [ - "serde", -] - [[package]] name = "thiserror" version = "1.0.60" @@ -18058,18 +16793,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-socks" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" -dependencies = [ - "either", - "futures-util", - "thiserror", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.14" @@ -18409,16 +17132,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "triomphe" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" -dependencies = [ - "serde", - "stable_deref_trait", -] - [[package]] name = "trust-dns-proto" version = "0.22.0" @@ -18436,7 +17149,6 @@ dependencies = [ "ipnet", "lazy_static", "rand", - "serde", "smallvec", "socket2 0.4.10", "thiserror", @@ -18459,7 +17171,6 @@ dependencies = [ "lru-cache", "parking_lot 0.12.1", "resolv-conf", - "serde", "smallvec", "thiserror", "tokio", @@ -18510,12 +17221,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - [[package]] name = "typenum" version = "1.17.0" @@ -18546,65 +17251,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -dependencies = [ - "unic-char-range", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" - -[[package]] -name = "unic-ucd-ident" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" -dependencies = [ - "unic-char-property", - "unic-char-range", - "unic-ucd-version", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -dependencies = [ - "unic-common", -] - [[package]] name = "unicode-bidi" version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" -[[package]] -name = "unicode-id" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" - -[[package]] -name = "unicode-id-start" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f73150333cb58412db36f2aca8f2875b013049705cc77b94ded70a1ab1f5da" - [[package]] name = "unicode-ident" version = "1.0.12" @@ -18684,19 +17336,6 @@ dependencies = [ "serde", ] -[[package]] -name = "urlpattern" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" -dependencies = [ - "derive_more", - "regex", - "serde", - "unic-ucd-ident", - "url", -] - [[package]] name = "utf-8" version = "0.7.6" @@ -18716,19 +17355,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom 0.2.12", - "serde", -] - -[[package]] -name = "v8" -version = "0.81.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75f5f378b9b54aff3b10da8170d26af4cfd217f644cf671badcd13af5db4beb" -dependencies = [ - "bitflags 1.3.2", - "fslock", - "once_cell", - "which", ] [[package]] @@ -18755,12 +17381,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "vsimd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" - [[package]] name = "w3f-bls" version = "0.1.3" @@ -18949,19 +17569,6 @@ dependencies = [ "cxx-build", ] -[[package]] -name = "wasm-streams" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasm-timer" version = "0.2.5" @@ -19251,12 +17858,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "which" version = "4.4.2" @@ -19740,9 +18341,9 @@ dependencies = [ [[package]] name = "zombienet-configuration" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dbe5721cebe0be12db36d5efd8c6f0dd473137dc0e3442b81bc79bd64507f70" +checksum = "c9ced8f504669bc6c11f95becaaadf84b5eeffb99cf7ef127e64cbf6de50be8e" dependencies = [ "anyhow", "lazy_static", @@ -19758,16 +18359,15 @@ dependencies = [ [[package]] name = "zombienet-orchestrator" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d936c875d7e5c19751711b9e211408950f114444b0ed7d2155e552a239a2419" +checksum = "82828a7caf26921fb958f827e7891aec7800922b6080af53bfdc53c46a9291b0" dependencies = [ "anyhow", "futures", "hex", "libp2p 0.52.4", "multiaddr 0.18.1", - "pjs-rs", "rand", "reqwest", "serde_json", @@ -19787,9 +18387,9 @@ dependencies = [ [[package]] name = "zombienet-prom-metrics-parser" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b10ecce0d2ae02fb65d9003e961e18c3337a1e9e9dc431499b7b6d1dab984d0" +checksum = "1aae7bc37efa70ce88df44fe1b8d5671381db13d5458e404b24bccf74e0a38c6" dependencies = [ "pest", "pest_derive", @@ -19798,9 +18398,9 @@ dependencies = [ [[package]] name = "zombienet-provider" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b6fedfcadd090def727cd626b26c26d1072c44ea516fe781d7c60baf7f4a16" +checksum = "4e3314ed27e86dc06522197b06985c7cc6f9af8af241a5ad7d24588feb9849a1" dependencies = [ "anyhow", "async-trait", @@ -19829,9 +18429,9 @@ dependencies = [ [[package]] name = "zombienet-sdk" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76345c48a6ca7694935c8e3af91eea71d8950debfa6e61353dbd3f603522cd09" +checksum = "06e293dc8886bd759ad37db12925d2e46d45dd5c97b659668b15512b947f666d" dependencies = [ "async-trait", "futures", @@ -19858,9 +18458,9 @@ dependencies = [ [[package]] name = "zombienet-support" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b5dbc58de99a397b096acf8f520f547880017e5bea9dc5e5c1ee7719274373" +checksum = "85abe4a8c3581269f4a0fe010d5924e96e231cad047f358ed8fcad262753f637" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 7cbb0430df..f7b9970595 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,7 +76,7 @@ kusama-polkadot-system-emulated-network = { path = "integration-tests/emulated/n kusama-runtime = { path = "relay/kusama", package = "staging-kusama-runtime" } kusama-runtime-constants = { path = "relay/kusama/constants", default-features = false } kusama-system-emulated-network = { path = "integration-tests/emulated/networks/kusama-system" } -log = { version = "0.4.20", default-features = false } +log = { version = "0.4.21", default-features = false } pallet-alliance = { version = "28.0.0", default-features = false } pallet-asset-conversion = { version = "11.0.0", default-features = false } pallet-asset-conversion-tx-payment = { version = "11.0.0", default-features = false } From d8365e3d6b32b9ea0544beebcf9824817d76a0c8 Mon Sep 17 00:00:00 2001 From: Muharem Date: Fri, 31 May 2024 10:12:25 +0200 Subject: [PATCH 09/20] Transaction payments work via new `fungible` traits implementation (#332) Fixes: https://github.com/polkadot-fellows/runtimes/issues/328 Transaction payments work via new `fungible` traits implementation --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- CHANGELOG.md | 4 +++ Cargo.lock | 16 +++++------ Cargo.toml | 8 +++--- relay/kusama/src/lib.rs | 4 +-- relay/polkadot/src/lib.rs | 4 +-- .../asset-hub-kusama/src/xcm_config.rs | 21 ++++++++------- .../asset-hub-polkadot/src/xcm_config.rs | 21 ++++++++------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 13 ++++----- .../bridge-hub-kusama/src/xcm_config.rs | 23 +++++++++------- .../bridge-hub-polkadot/src/lib.rs | 13 ++++----- .../bridge-hub-polkadot/src/xcm_config.rs | 26 ++++++++++-------- .../collectives-polkadot/src/lib.rs | 12 ++++----- .../collectives-polkadot/src/xcm_config.rs | 27 ++++++++++--------- .../coretime/coretime-kusama/src/lib.rs | 10 +++---- .../coretime-kusama/src/xcm_config.rs | 27 ++++++++++--------- system-parachains/encointer/src/lib.rs | 6 ++--- system-parachains/encointer/src/xcm_config.rs | 21 ++++++++------- .../people/people-kusama/src/lib.rs | 11 ++++---- .../people/people-kusama/src/xcm_config.rs | 17 +++++++----- 19 files changed, 158 insertions(+), 126 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f67e9e8a90..f34f76d1bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) - Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) +### Changed + +- Transaction payments work via new `fungible` trait implementation ([polkadot-fellows/runtimes#332](https://github.com/polkadot-fellows/runtimes/pull/332)) + ### Fixed - Handle extra erroneous consumer reference when a nomination pool is destroying ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) diff --git a/Cargo.lock b/Cargo.lock index 7e8c4fcb62..492f330253 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9161,9 +9161,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "29.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" +checksum = "0b0c408252aefe10cff96af1e54f06f45cb0dd184b4e450e9a2ecf837dfe506e" dependencies = [ "frame-support", "frame-system", @@ -9208,9 +9208,9 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "28.0.0" +version = "28.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1605eb5083a2cd172544f33c6e59eca2e23ac49f02f13d1562b1b8a409df9c60" +checksum = "3eca44990d0d759213744f2d1f6fe1fadec1079a3e4e4da40556d6b4e42abbcd" dependencies = [ "docify", "frame-benchmarking", @@ -10913,9 +10913,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06afbb3bd10245ad1907242a98ddffc3c0c1e209738b8382bc5bcfc1f28c0429" +checksum = "d815f0ff0a69dce7235d42c6e7d5e2b8b7429cba1252b4802ddc7879e2e74d4a" dependencies = [ "bitvec", "frame-benchmarking", @@ -16005,9 +16005,9 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f6cfc27c1d45f9a67e20ed3f7e60296299688825350291606add10bf3bbff2" +checksum = "988d765ad5ab3b5cc90bb1dd143153ebdbe2b7600e10d5ef3a7f3e8df1bdac5d" dependencies = [ "frame-support", "frame-system", diff --git a/Cargo.toml b/Cargo.toml index f7b9970595..61f4ca40c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,9 +150,9 @@ pallet-staking-runtime-api = { version = "15.0.1", default-features = false } pallet-state-trie-migration = { version = "30.0.0", default-features = false } pallet-sudo = { version = "29.0.0", default-features = false } pallet-timestamp = { version = "28.0.0", default-features = false } -pallet-transaction-payment = { version = "29.0.0", default-features = false } +pallet-transaction-payment = { version = "29.0.1", default-features = false } pallet-transaction-payment-rpc-runtime-api = { version = "29.0.0", default-features = false } -pallet-treasury = { version = "28.0.0", default-features = false } +pallet-treasury = { version = "28.0.1", default-features = false } pallet-uniques = { version = "29.0.0", default-features = false } pallet-utility = { version = "29.0.0", default-features = false } pallet-vesting = { version = "29.0.0", default-features = false } @@ -174,7 +174,7 @@ polkadot-emulated-chain = { path = "integration-tests/emulated/chains/relays/pol polkadot-parachain-primitives = { version = "7.0.0", default-features = false } polkadot-primitives = { version = "8.0.1", default-features = false } polkadot-runtime = { path = "relay/polkadot" } -polkadot-runtime-common = { version = "8.0.1", default-features = false } +polkadot-runtime-common = { version = "8.0.2", default-features = false } polkadot-runtime-constants = { path = "relay/polkadot/constants", default-features = false } polkadot-system-emulated-network = { path = "integration-tests/emulated/networks/polkadot-system" } primitive-types = { version = "0.12.2", default-features = false } @@ -226,7 +226,7 @@ substrate-wasm-builder = { version = "18.0.0" } system-parachains-constants = { path = "system-parachains/constants", default-features = false } tokio = { version = "1.36.0" } xcm = { version = "8.0.1", default-features = false, package = "staging-xcm" } -xcm-builder = { version = "8.0.1", default-features = false, package = "staging-xcm-builder" } +xcm-builder = { version = "8.0.2", default-features = false, package = "staging-xcm-builder" } xcm-emulator = { version = "0.6.0" } xcm-executor = { version = "8.0.1", default-features = false, package = "staging-xcm-executor" } anyhow = { version = "1.0.82" } diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index a26ebd9975..de980846fb 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -87,7 +87,7 @@ use frame_system::{EnsureRoot, EnsureSigned}; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; use pallet_identity::legacy::IdentityInfo; use pallet_session::historical as session_historical; -use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; +use pallet_transaction_payment::{FeeDetails, FungibleAdapter, RuntimeDispatchInfo}; use sp_core::{ConstU128, OpaqueMetadata, H256}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -434,7 +434,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; + type OnChargeTransaction = FungibleAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index f03839195b..38e53dc9e8 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -20,7 +20,7 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "512"] -use pallet_transaction_payment::CurrencyAdapter; +use pallet_transaction_payment::FungibleAdapter; use polkadot_runtime_common::{ auctions, claims, crowdloan, impl_runtime_weights, impls::{ @@ -412,7 +412,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; + type OnChargeTransaction = FungibleAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; 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 22928d7405..d852045290 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 @@ -27,18 +27,15 @@ use assets_common::{ use frame_support::{ parameter_types, traits::{ - tokens::imbalance::ResolveAssetTo, ConstU32, Contains, Equals, Everything, Nothing, - PalletInfoAccess, + tokens::imbalance::{ResolveAssetTo, ResolveTo}, + ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess, }, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, + ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; @@ -323,7 +320,13 @@ impl xcm_executor::Config for XcmConfig { MaxInstructions, >; type Trader = ( - UsingComponents>, + UsingComponents< + WeightToFee, + KsmLocation, + AccountId, + Balances, + ResolveTo, + >, // This trader allows to pay with any assets exchangeable to KSM with // [`AssetConversion`]. cumulus_primitives_utility::SwapFirstAssetTrader< 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 6fb8e588bb..eddc63a0ee 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 @@ -27,18 +27,15 @@ use assets_common::{ use frame_support::{ parameter_types, traits::{ - tokens::imbalance::ResolveAssetTo, ConstU32, Contains, Equals, Everything, Nothing, - PalletInfoAccess, + tokens::imbalance::{ResolveAssetTo, ResolveTo}, + ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess, }, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, + ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; @@ -385,7 +382,13 @@ impl xcm_executor::Config for XcmConfig { MaxInstructions, >; type Trader = ( - UsingComponents>, + UsingComponents< + WeightToFee, + DotLocation, + AccountId, + Balances, + ResolveTo, + >, // This trader allows to pay with any assets exchangeable to DOT with // [`AssetConversion`]. cumulus_primitives_utility::SwapFirstAssetTrader< 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 87edaa1da5..3f27f397ca 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -57,7 +57,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -69,7 +70,9 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + FellowshipLocation, GovernanceLocation, StakingPot, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -78,9 +81,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, -}; +use parachains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature}; pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ @@ -295,7 +296,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; 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 5a7f15bd38..7ccde658c3 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 @@ -17,22 +17,19 @@ use super::{ bridge_to_ethereum_config::EthereumNetwork, bridge_to_polkadot_config::ToBridgeHubPolkadotHaulBlobExporter, AccountId, - AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_runtime_common::XcmExportFeeToSibling; @@ -72,6 +69,7 @@ parameter_types! { pub RelayTreasuryPalletAccount: AccountId = LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -191,8 +189,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + KsmRelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; 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 7f116fb6a5..4a6dce7f7b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -59,7 +59,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -71,7 +72,9 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + FellowshipLocation, GovernanceLocation, StakingPot, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -82,9 +85,7 @@ use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, -}; +use parachains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature}; pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ @@ -308,7 +309,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; 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 e3d3778aac..66c6cb772e 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 @@ -17,21 +17,19 @@ use super::{ bridge_to_ethereum_config::EthereumNetwork, bridge_to_kusama_config::ToBridgeHubKusamaHaulBlobExporter, AccountId, AllPalletsWithSystem, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; @@ -72,6 +70,7 @@ parameter_types! { pub RelayTreasuryPalletAccount: AccountId = LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -209,8 +208,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + DotRelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 1f4b4104d0..19806df35c 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -70,8 +70,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, - EitherOfDiverse, InstanceFilter, LinearStoragePrice, TransformOrigin, + fungible::HoldConsideration, tokens::imbalance::ResolveTo, ConstBool, ConstU16, ConstU32, + ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, LinearStoragePrice, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -81,8 +81,7 @@ use frame_system::{ EnsureRoot, }; use parachains_common::{ - impls::DealWithFees, message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header, - Nonce, Signature, + message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -91,7 +90,8 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, + GovernanceLocation, LocationToAccountId, StakingPot, TreasurerBodyId, + XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -229,7 +229,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 12a408daa5..5f9b7c807c 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -14,22 +14,19 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, Balances, Fellows, ParachainInfo, ParachainSystem, - PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, Fellows, ParachainInfo, + ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::{ @@ -74,6 +71,7 @@ parameter_types! { location: AssetHub::get(), asset_id: (PalletInstance(50), GeneralIndex(1984)).into(), }; + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -213,8 +211,13 @@ impl xcm_executor::Config for XcmConfig { type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + DotLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index e6b293b9a7..326b696c3f 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -37,8 +37,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, EverythingBut, - InstanceFilter, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains, + EitherOfDiverse, EverythingBut, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -49,7 +49,6 @@ use frame_system::{ }; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ - impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; @@ -75,7 +74,8 @@ use system_parachains_constants::{ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::*; use xcm_config::{ - FellowshipLocation, GovernanceLocation, KsmRelayLocation, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, KsmRelayLocation, StakingPot, + XcmOriginToTransactDispatchOrigin, }; /// The address format for describing accounts. @@ -253,7 +253,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; diff --git a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs index 14961f0166..a24a478e16 100644 --- a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs +++ b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs @@ -15,23 +15,20 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, Balances, Broker, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, Broker, CollatorSelection, ParachainInfo, + ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ pallet_prelude::PalletInfoAccess, parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; @@ -62,6 +59,7 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; pub const GovernanceLocation: Location = Location::parent(); pub const FellowshipLocation: Location = Location::parent(); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -203,8 +201,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + KsmRelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index ad12dc9882..8ba23e8a1b 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -57,7 +57,7 @@ use frame_support::{ parameter_types, traits::{ fungibles::{Balanced, Credit}, - tokens::ConversionToAssetBalance, + tokens::{imbalance::ResolveTo, ConversionToAssetBalance}, ConstBool, ConstU64, Contains, EitherOfDiverse, EqualPrivilegeOnly, InstanceFilter, TransformOrigin, }, @@ -105,7 +105,7 @@ use system_parachains_constants::{ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::{AssetId as XcmAssetId, BodyId}; -use xcm_config::{KsmLocation, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{KsmLocation, StakingPot, XcmOriginToTransactDispatchOrigin}; /// A type to hold UTC unix epoch [ms] pub type Moment = u64; @@ -324,7 +324,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 4ace23f012..dc91215ee9 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -16,19 +16,16 @@ //! Almost identical to ../asset-hubs/asset-hub-kusama use super::{ - AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, - traits::{Contains, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, Contains, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, ParentRelayOrSiblingParachains}, -}; +use parachains_common::xcm_config::{ConcreteAssetFromSystem, ParentRelayOrSiblingParachains}; use polkadot_parachain_primitives::primitives::Sibling; use sp_core::ConstU32; @@ -53,6 +50,7 @@ parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -168,8 +166,13 @@ impl xcm_executor::Config for XcmConfig { type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + KsmLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index 45bb9568d3..2b53323aeb 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -31,8 +31,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, InstanceFilter, - TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -43,7 +43,6 @@ use frame_system::{ }; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ - impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, @@ -69,8 +68,8 @@ use system_parachains_constants::kusama::{consensus::*, currency::*, fee::Weight use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_config::{ - FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, XcmConfig, - XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, StakingPot, + XcmConfig, XcmOriginToTransactDispatchOrigin, }; /// The address format for describing accounts. @@ -225,7 +224,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; diff --git a/system-parachains/people/people-kusama/src/xcm_config.rs b/system-parachains/people/people-kusama/src/xcm_config.rs index f76ed06b7e..8cffb3424f 100644 --- a/system-parachains/people/people-kusama/src/xcm_config.rs +++ b/system-parachains/people/people-kusama/src/xcm_config.rs @@ -14,18 +14,17 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, + PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use crate::{TransactionByteFee, CENTS}; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ - impls::ToStakingPot, xcm_config::{ AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, @@ -68,6 +67,7 @@ parameter_types! { pub RelayTreasuryPalletAccount: AccountId = LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); } pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< @@ -204,8 +204,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + RelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; From 04c69bf317537744525304893fe31b4d0f568b55 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Fri, 31 May 2024 16:59:21 +0200 Subject: [PATCH 10/20] Block Request Judgement Calls on Polkadot (#338) This change blocks `request_judgement` calls on the Relay Chain. This is because requesting judgement reserves some funds to be sent to the registrar. This complicates migration to the People Chain and requires either breaking changes to the Identity pallet or phantom reserved funds. Blocking new requests (but allowing judgements and cancellations) prior to the migration will be simpler and lower risk. --- CHANGELOG.md | 1 + relay/polkadot/src/lib.rs | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f34f76d1bd..81cb3dbd9f 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/). ### Changed - Transaction payments work via new `fungible` trait implementation ([polkadot-fellows/runtimes#332](https://github.com/polkadot-fellows/runtimes/pull/332)) +- Block `request_judgement` calls on the Relay Chain ([polkadot-fellows/runtimes#338](https://github.com/polkadot-fellows/runtimes/pull/338)) ### Fixed diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 38e53dc9e8..0c38abd3dd 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -61,8 +61,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Everything, Get, - InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut, + Get, InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, @@ -175,8 +175,16 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } +/// A type to identify `identity::request_judgement` calls. +pub struct IsIdentityJudgementRequestCall; +impl Contains for IsIdentityJudgementRequestCall { + fn contains(c: &RuntimeCall) -> bool { + matches!(c, RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. })) + } +} + impl frame_system::Config for Runtime { - type BaseCallFilter = Everything; + type BaseCallFilter = EverythingBut; type BlockWeights = BlockWeights; type BlockLength = BlockLength; type RuntimeOrigin = RuntimeOrigin; From 40ca0730fca7250f8f17fdc458c4af82067ff6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Mon, 3 Jun 2024 10:36:55 +0200 Subject: [PATCH 11/20] Add `CheckMetadataHash` extension (#337) This signed extension enables the new metadata hash verification feature that was approved as [RFC78](https://polkadot-fellows.github.io/RFCs/approved/0078-merkleized-metadata.html). This will bring support for the new generic ledger hardware wallet app and further hardware wallets in the Polkadot ecosystem. --- .github/workflows/test.yml | 2 +- CHANGELOG.md | 1 + Cargo.lock | 135 +++++++++++++++--- Cargo.toml | 5 +- relay/kusama/Cargo.toml | 10 +- relay/kusama/build.rs | 15 +- relay/kusama/src/lib.rs | 2 + relay/polkadot/Cargo.toml | 10 +- relay/polkadot/build.rs | 17 ++- relay/polkadot/src/lib.rs | 3 + .../asset-hubs/asset-hub-kusama/Cargo.toml | 7 +- .../asset-hubs/asset-hub-kusama/build.rs | 13 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 1 + .../asset-hubs/asset-hub-polkadot/Cargo.toml | 7 +- .../asset-hubs/asset-hub-polkadot/build.rs | 13 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 1 + .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 7 +- .../bridge-hubs/bridge-hub-kusama/build.rs | 13 +- .../bridge-hub-kusama/primitives/src/lib.rs | 4 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 + .../bridge-hub-kusama/tests/snowbridge.rs | 1 + .../bridge-hub-kusama/tests/tests.rs | 1 + .../bridge-hub-polkadot/Cargo.toml | 7 +- .../bridge-hubs/bridge-hub-polkadot/build.rs | 13 +- .../bridge-hub-polkadot/primitives/src/lib.rs | 4 +- .../bridge-hub-polkadot/src/lib.rs | 1 + .../bridge-hub-polkadot/tests/snowbridge.rs | 1 + .../bridge-hub-polkadot/tests/tests.rs | 1 + .../collectives-polkadot/Cargo.toml | 7 +- .../collectives/collectives-polkadot/build.rs | 13 +- .../collectives-polkadot/src/lib.rs | 1 + .../coretime/coretime-kusama/Cargo.toml | 7 +- .../coretime/coretime-kusama/build.rs | 15 +- .../coretime/coretime-kusama/src/lib.rs | 1 + system-parachains/encointer/Cargo.toml | 7 +- system-parachains/encointer/build.rs | 13 +- system-parachains/encointer/src/lib.rs | 1 + .../people/people-kusama/Cargo.toml | 7 +- .../people/people-kusama/src/lib.rs | 1 + 39 files changed, 280 insertions(+), 89 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 647f89dedd..e74b57668f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: RUSTFLAGS: "-C debug-assertions -D warnings" - name: Test all features ${{ matrix.runtime.name }} - run: cargo test -p ${{ matrix.runtime.package }} --release --locked -q --features=runtime-benchmarks,try-runtime + run: cargo test -p ${{ matrix.runtime.package }} --release --locked -q --all-features env: RUSTFLAGS: "-C debug-assertions -D warnings" SKIP_WASM_BUILD: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 81cb3dbd9f..0615972a12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) - Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) +- Enable support for new hardware signers like the generic ledger app ([polkadot-fellows/runtimes#337](https://github.com/polkadot-fellows/runtimes/pull/337)) ### Changed diff --git a/Cargo.lock b/Cargo.lock index 492f330253..05bd092318 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -625,6 +625,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -754,6 +755,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -1753,6 +1755,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -1901,6 +1904,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -2462,6 +2466,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -2672,6 +2677,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -3465,6 +3471,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -3569,21 +3586,21 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse", + "derive-syn-parse 0.2.0", "once_cell", "proc-macro2", "quote", @@ -3847,6 +3864,7 @@ dependencies = [ "encointer-primitives", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -4512,6 +4530,22 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-metadata-hash-extension" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb1eec9eb46d3e016c95b2fa875118c04609f2150013c56a894cae00581e265" +dependencies = [ + "array-bytes 6.2.2", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", +] + [[package]] name = "frame-remote-externalities" version = "0.36.0" @@ -4585,7 +4619,7 @@ checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "expander 2.0.0", "frame-support-procedural-tools", "itertools 0.10.5", @@ -6893,7 +6927,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "macro_magic_core_macros", "proc-macro2", "quote", @@ -7010,6 +7044,20 @@ dependencies = [ "hash-db", ] +[[package]] +name = "merkleized-metadata" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f313fcff1d2a4bcaa2deeaa00bf7530d77d5f7bd0467a117dde2e29a75a7a17a" +dependencies = [ + "array-bytes 6.2.2", + "blake3", + "frame-metadata 16.0.0", + "parity-scale-codec", + "scale-decode 0.13.0", + "scale-info", +] + [[package]] name = "merlin" version = "2.0.1" @@ -9798,6 +9846,7 @@ dependencies = [ "enumflags2", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -10820,6 +10869,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-metadata-hash-extension", "frame-remote-externalities", "frame-support", "frame-system", @@ -13558,10 +13608,20 @@ checksum = "662d10dcd57b1c2a3c41c9cf68f71fb09747ada1ea932ad961aca7e2ca28315f" dependencies = [ "parity-scale-codec", "scale-info", - "scale-type-resolver", + "scale-type-resolver 0.1.1", "serde", ] +[[package]] +name = "scale-bits" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver 0.2.0", +] + [[package]] name = "scale-decode" version = "0.11.1" @@ -13571,9 +13631,22 @@ dependencies = [ "derive_more", "parity-scale-codec", "primitive-types", - "scale-bits", + "scale-bits 0.5.0", "scale-decode-derive", - "scale-type-resolver", + "scale-type-resolver 0.1.1", + "smallvec", +] + +[[package]] +name = "scale-decode" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b12ebca36cec2a3f983c46295b282b35e5f8496346fb859a8776dad5389e5389" +dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-bits 0.6.0", + "scale-type-resolver 0.2.0", "smallvec", ] @@ -13598,9 +13671,9 @@ dependencies = [ "derive_more", "parity-scale-codec", "primitive-types", - "scale-bits", + "scale-bits 0.5.0", "scale-encode-derive", - "scale-type-resolver", + "scale-type-resolver 0.1.1", "smallvec", ] @@ -13653,6 +13726,12 @@ dependencies = [ "smallvec", ] +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" + [[package]] name = "scale-typegen" version = "0.2.1" @@ -13678,11 +13757,11 @@ dependencies = [ "either", "frame-metadata 15.1.0", "parity-scale-codec", - "scale-bits", - "scale-decode", + "scale-bits 0.5.0", + "scale-decode 0.11.1", "scale-encode", "scale-info", - "scale-type-resolver", + "scale-type-resolver 0.1.1", "serde", "yap", ] @@ -14748,9 +14827,9 @@ dependencies = [ [[package]] name = "sp-api" -version = "27.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" +checksum = "2e4f8702afd77f14a32733e2b589c02694bf79d0b3a641963c508016208724d0" dependencies = [ "hash-db", "log", @@ -14770,9 +14849,9 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "15.0.0" +version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" +checksum = "0301e2f77afb450fbf2b093f8b324c7ad88cc82e5e69bd5dc8658a1f068b2a96" dependencies = [ "Inflector", "blake2 0.10.6", @@ -15876,6 +15955,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-metadata-hash-extension", "frame-remote-externalities", "frame-support", "frame-system", @@ -16274,16 +16354,25 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "18.0.0" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" +checksum = "4a39a20e17c24ede36b5bd5e7543a4cef8d8a0daf6e1a046dc31832b837a54a0" dependencies = [ + "array-bytes 6.2.2", "build-helper", "cargo_metadata", "console", "filetime", + "frame-metadata 16.0.0", + "merkleized-metadata", + "parity-scale-codec", "parity-wasm", + "sc-executor", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-maybe-compressed-blob", + "sp-tracing", + "sp-version", "strum 0.24.1", "tempfile", "toml 0.8.10", @@ -16322,8 +16411,8 @@ dependencies = [ "jsonrpsee 0.22.5", "parity-scale-codec", "primitive-types", - "scale-bits", - "scale-decode", + "scale-bits 0.5.0", + "scale-decode 0.11.1", "scale-encode", "scale-info", "scale-value", diff --git a/Cargo.toml b/Cargo.toml index 61f4ca40c5..069214e78a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,6 +62,7 @@ enumflags2 = { version = "0.7.7" } frame-benchmarking = { version = "29.0.0", default-features = false } frame-election-provider-support = { version = "29.0.0", default-features = false } frame-executive = { version = "29.0.0", default-features = false } +frame-metadata-hash-extension = { version = "0.1.0", default-features = false } frame-support = { version = "29.0.2", default-features = false } frame-system = { version = "29.0.0", default-features = false } frame-system-benchmarking = { version = "29.0.0", default-features = false } @@ -198,7 +199,7 @@ snowbridge-router-primitives = { version = "0.1.0", default-features = false } snowbridge-runtime-common = { version = "0.1.0", default-features = false } snowbridge-runtime-test-common = { version = "0.1.0" } snowbridge-system-runtime-api = { version = "0.1.0", default-features = false } -sp-api = { version = "27.0.0", default-features = false } +sp-api = { version = "27.0.1", default-features = false } sp-application-crypto = { version = "31.0.0", default-features = false } sp-arithmetic = { version = "24.0.0", default-features = false } sp-block-builder = { version = "27.0.0", default-features = false } @@ -222,7 +223,7 @@ sp-trie = { version = "30.0.0" } sp-version = { version = "30.0.0", default-features = false } sp-weights = { version = "28.0.0", default-features = false } static_assertions = { version = "1.1.0" } -substrate-wasm-builder = { version = "18.0.0" } +substrate-wasm-builder = { version = "18.0.1" } system-parachains-constants = { path = "system-parachains/constants", default-features = false } tokio = { version = "1.36.0" } xcm = { version = "8.0.1", default-features = false, package = "staging-xcm" } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index e276e2e4c3..9f4601f92e 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -53,6 +53,7 @@ pallet-conviction-voting = { workspace = true } pallet-election-provider-multi-phase = { workspace = true } pallet-fast-unstake = { workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } pallet-nis = { workspace = true } pallet-identity = { workspace = true } @@ -113,7 +114,7 @@ tokio = { features = ["macros"], workspace = true } sp-tracing = { workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = { workspace = true, optional = true } [features] default = ["std"] @@ -128,6 +129,7 @@ std = [ "frame-benchmarking?/std", "frame-election-provider-support/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -185,6 +187,7 @@ std = [ "polkadot-runtime-common/std", "runtime-parachains/std", "scale-info/std", + "substrate-wasm-builder", "sp-api/std", "sp-application-crypto/std", "sp-arithmetic/std", @@ -309,10 +312,13 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/relay/kusama/build.rs b/relay/kusama/build.rs index 404ba3f2fd..ed553650ce 100644 --- a/relay/kusama/build.rs +++ b/relay/kusama/build.rs @@ -14,12 +14,17 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use substrate_wasm_builder::WasmBuilder; +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] +fn main() { + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} +#[cfg(all(feature = "std", feature = "metadata-hash"))] fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index de980846fb..434b0baad3 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -931,6 +931,7 @@ where frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + frame_metadata_hash_extension::CheckMetadataHash::new(false), ); let raw_payload = SignedPayload::new(call, extra) .map_err(|e| { @@ -1793,6 +1794,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); pub struct NominationPoolsMigrationV4OldPallet; diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index b2cf870f7e..c7f8c92b6b 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -50,6 +50,7 @@ pallet-conviction-voting = { workspace = true } pallet-election-provider-multi-phase = { workspace = true } pallet-fast-unstake = { workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } pallet-identity = { workspace = true } pallet-indices = { workspace = true } @@ -110,7 +111,7 @@ tokio = { features = ["macros"], workspace = true } sp-tracing = { workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = { workspace = true, optional = true } [features] default = ["std"] @@ -125,6 +126,7 @@ std = [ "frame-benchmarking?/std", "frame-election-provider-support/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -180,6 +182,7 @@ std = [ "polkadot-runtime-constants/std", "runtime-parachains/std", "scale-info/std", + "substrate-wasm-builder", "sp-api/std", "sp-application-crypto/std", "sp-arithmetic/std", @@ -298,10 +301,13 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/relay/polkadot/build.rs b/relay/polkadot/build.rs index 428c971bc1..788c2d6962 100644 --- a/relay/polkadot/build.rs +++ b/relay/polkadot/build.rs @@ -6,7 +6,7 @@ // 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, +// 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. @@ -14,12 +14,17 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use substrate_wasm_builder::WasmBuilder; +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] +fn main() { + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} +#[cfg(all(feature = "std", feature = "metadata-hash"))] fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 0c38abd3dd..c065949f26 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1019,6 +1019,7 @@ where frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(tip), claims::PrevalidateAttests::::new(), + frame_metadata_hash_extension::CheckMetadataHash::new(false), ); let raw_payload = SignedPayload::new(call, extra) .map_err(|e| { @@ -1782,6 +1783,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, claims::PrevalidateAttests, + frame_metadata_hash_extension::CheckMetadataHash, ); pub struct NominationPoolsMigrationV4OldPallet; @@ -2810,6 +2812,7 @@ mod test_fees { frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), claims::PrevalidateAttests::::new(), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let uxt = UncheckedExtrinsic { function: call, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 6773a28111..d79bedb681 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -25,6 +25,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -211,6 +212,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -272,7 +274,10 @@ std = [ "xcm/std", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/build.rs b/system-parachains/asset-hubs/asset-hub-kusama/build.rs index 60f8a12512..ed3ceb02c6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/build.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } 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 1db5db6900..4bc4b9aaee 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1011,6 +1011,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 842f5d723b..56aa03c2a9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -26,6 +26,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -196,6 +197,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -256,7 +258,10 @@ std = [ "xcm/std", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/build.rs b/system-parachains/asset-hubs/asset-hub-polkadot/build.rs index 60f8a12512..e65608baae 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/build.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } 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 e8d5ebeadf..2cff59756f 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -993,6 +993,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 86c1cff6b6..410d201191 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -29,6 +29,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -154,6 +155,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -295,7 +297,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs index 60f8a12512..ed3ceb02c6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } 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 index 36ae75ff32..917e9bf7e6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -102,11 +102,11 @@ frame_support::parameter_types! { /// 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_374_989_788; + pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 56_375_433_121; /// 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_808_755_240; + pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 53_809_198_573; } /// Compute the total estimated fee that needs to be paid in KSMs by the sender when sending 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 3f27f397ca..117e374607 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -116,6 +116,7 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, BridgeRejectObsoleteHeadersAndMessages, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, + frame_metadata_hash_extension::CheckMetadataHash, ); bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 5859943f36..5521d341c7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -328,6 +328,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); 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 74e0f4c4a2..e39745cb1a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -82,6 +82,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 56126bb031..db4ad96b61 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -29,6 +29,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -152,6 +153,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -291,7 +293,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs index 60f8a12512..e65608baae 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } 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 index 8cfe7b494c..ac289f68c6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -93,11 +93,11 @@ frame_support::parameter_types! { /// 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_912_512_364; + pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_912_645_364; /// 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_142_641_864; + pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_142_774_864; } /// Compute the total estimated fee that needs to be paid in DOTs by the sender when sending 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 4a6dce7f7b..04a884e974 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -120,6 +120,7 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, BridgeRejectObsoleteHeadersAndMessages, bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + frame_metadata_hash_extension::CheckMetadataHash, ); bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index b0ac089a43..552841e4af 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -328,6 +328,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubKusamaMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); 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 0f03bd3415..a2b5628fdb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -83,6 +83,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubKusamaMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 93c26766d4..dd9e812969 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -17,6 +17,7 @@ scale-info = { features = ["derive"], workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -174,6 +175,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -231,7 +233,10 @@ std = [ "xcm/std", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/collectives/collectives-polkadot/build.rs b/system-parachains/collectives/collectives-polkadot/build.rs index 60f8a12512..e65608baae 100644 --- a/system-parachains/collectives/collectives-polkadot/build.rs +++ b/system-parachains/collectives/collectives-polkadot/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 19806df35c..4c422d5afb 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -721,6 +721,7 @@ pub type SignedExtra = ( frame_system::CheckEra, frame_system::CheckNonce, frame_system::CheckWeight, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/coretime/coretime-kusama/Cargo.toml b/system-parachains/coretime/coretime-kusama/Cargo.toml index 14b0b42fe1..27440eb04a 100644 --- a/system-parachains/coretime/coretime-kusama/Cargo.toml +++ b/system-parachains/coretime/coretime-kusama/Cargo.toml @@ -22,6 +22,7 @@ system-parachains-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -98,6 +99,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -206,7 +208,10 @@ experimental = ["pallet-aura/experimental"] fast-runtime = [] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/coretime/coretime-kusama/build.rs b/system-parachains/coretime/coretime-kusama/build.rs index c0f4ba820e..66590b2166 100644 --- a/system-parachains/coretime/coretime-kusama/build.rs +++ b/system-parachains/coretime/coretime-kusama/build.rs @@ -14,13 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build(); + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) + .build() } #[cfg(not(feature = "std"))] diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 326b696c3f..bb886797ab 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -100,6 +100,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 2bbe1e188d..1d44d5d5ff 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -43,6 +43,7 @@ pallet-encointer-scheduler = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -168,6 +169,7 @@ std = [ "encointer-primitives/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -266,7 +268,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/encointer/build.rs b/system-parachains/encointer/build.rs index 256e9fb765..ab41435075 100644 --- a/system-parachains/encointer/build.rs +++ b/system-parachains/encointer/build.rs @@ -14,12 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 8ba23e8a1b..8101871369 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -721,6 +721,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_asset_tx_payment::ChargeAssetTxPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/people/people-kusama/Cargo.toml b/system-parachains/people/people-kusama/Cargo.toml index 58016385c7..dbb81e0135 100644 --- a/system-parachains/people/people-kusama/Cargo.toml +++ b/system-parachains/people/people-kusama/Cargo.toml @@ -19,6 +19,7 @@ scale-info = { features = ["derive"], workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -94,6 +95,7 @@ std = [ "enumflags2/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -197,7 +199,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index 2b53323aeb..1390eee319 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -94,6 +94,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. From 2539cb587ed67ac83fff1b02d86c6b7eb7542333 Mon Sep 17 00:00:00 2001 From: eskimor Date: Wed, 5 Jun 2024 18:03:08 +0200 Subject: [PATCH 12/20] Adjust to new Broker pallet. (#334) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - [ ] Does not require a CHANGELOG entry --------- Co-authored-by: eskimor Co-authored-by: Dónal Murray --- CHANGELOG.md | 1 + Cargo.lock | 5 +- Cargo.toml | 2 +- .../coretime/coretime-kusama/src/coretime.rs | 48 +------------- .../coretime/coretime-kusama/src/tests.rs | 62 ++----------------- 5 files changed, 13 insertions(+), 105 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0615972a12..f28192ba3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) - Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) +- Update price controller of broker pallet to use higher leadin, without adjusting the minimum price too much ([polkadot-fellows/runtimes#334](https://github.com/polkadot-fellows/runtimes/pull/334) - Enable support for new hardware signers like the generic ledger app ([polkadot-fellows/runtimes#337](https://github.com/polkadot-fellows/runtimes/pull/337)) ### Changed diff --git a/Cargo.lock b/Cargo.lock index 05bd092318..3873911e94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8196,14 +8196,15 @@ dependencies = [ [[package]] name = "pallet-broker" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3626d7e8e49b153b84c74594e1fb4b6d64720b5a9588297d3ba3c049c3b3b9e3" +checksum = "574c52fd629191c374c24a18036acac008ea92142309e5dd05e7f03149a667c3" dependencies = [ "bitvec", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-arithmetic 24.0.0", diff --git a/Cargo.toml b/Cargo.toml index 069214e78a..7ee18a76cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,7 +97,7 @@ pallet-bridge-grandpa = { version = "0.8.0", default-features = false } pallet-bridge-messages = { version = "0.8.0", default-features = false } pallet-bridge-parachains = { version = "0.8.0", default-features = false } pallet-bridge-relayers = { version = "0.8.0", default-features = false } -pallet-broker = { version = "0.7.1", default-features = false } +pallet-broker = { version = "0.7.2", default-features = false } pallet-child-bounties = { version = "28.0.0", default-features = false } pallet-collator-selection = { version = "10.0.2", default-features = false } pallet-collective = { version = "29.0.0", default-features = false } diff --git a/system-parachains/coretime/coretime-kusama/src/coretime.rs b/system-parachains/coretime/coretime-kusama/src/coretime.rs index 1bc3487b43..6602f1c227 100644 --- a/system-parachains/coretime/coretime-kusama/src/coretime.rs +++ b/system-parachains/coretime/coretime-kusama/src/coretime.rs @@ -25,13 +25,8 @@ use frame_support::{ OnUnbalanced, }, }; -use pallet_broker::{ - AdaptPrice, CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf, -}; -use sp_runtime::{ - traits::{AccountIdConversion, One, Saturating}, - FixedU64, -}; +use pallet_broker::{CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf}; +use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; /// A type containing the encoding of the coretime pallet in the Relay chain runtime. Used to @@ -200,40 +195,6 @@ impl CoretimeInterface for CoretimeAllocator { } } -/// Implements the [`AdaptPrice`] trait to control the price changes of bulk coretime. This tweaks -/// the [`pallet_broker::Linear`] implementation which hard-corrects to 0 if cores are offered but -/// not sold for just one sale. The monotonic lead-in is increased in magnitude to enable faster -/// price finding. The change in base price between sales has a lower limit of 0.5 to allow downward -/// pressure to be applied, while keeping a conservative upper limit of 1.2 (movements capped at 20% -/// if cores sell out) to avoid runaway prices in the early sales. The intention is that this will -/// be coupled with a low number of cores per sale and a 100% ideal bulk ratio for the first sales. -pub struct PriceAdapter; -impl AdaptPrice for PriceAdapter { - fn leadin_factor_at(when: FixedU64) -> FixedU64 { - // Start at 5x the base price and decrease to the base price at the end of leadin. - FixedU64::from(5).saturating_sub(FixedU64::from(4) * when) - } - - fn adapt_price(sold: CoreIndex, target: CoreIndex, limit: CoreIndex) -> FixedU64 { - if sold <= target { - // Range of [0.5, 1.0]. - FixedU64::from_rational(1, 2).saturating_add(FixedU64::from_rational( - (sold).into(), - (target.saturating_mul(2)).into(), - )) - } else { - // Range of (1.0, 1.2]. - - // Unchecked math: In this branch we know that sold > target. The limit must be >= sold - // by construction, and thus target must be < limit. - FixedU64::one().saturating_add(FixedU64::from_rational( - (sold - target).into(), - (limit - target).saturating_mul(5).into(), - )) - } - } -} - parameter_types! { pub const BrokerPalletId: PalletId = PalletId(*b"py/broke"); } @@ -253,8 +214,5 @@ impl pallet_broker::Config for Runtime { type WeightInfo = weights::pallet_broker::WeightInfo; type PalletId = BrokerPalletId; type AdminOrigin = EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type PriceAdapter = pallet_broker::Linear; - #[cfg(not(feature = "runtime-benchmarks"))] - type PriceAdapter = PriceAdapter; + type PriceAdapter = pallet_broker::CenterTargetPrice; } diff --git a/system-parachains/coretime/coretime-kusama/src/tests.rs b/system-parachains/coretime/coretime-kusama/src/tests.rs index 72e0a7ce71..691d7b8ebc 100644 --- a/system-parachains/coretime/coretime-kusama/src/tests.rs +++ b/system-parachains/coretime/coretime-kusama/src/tests.rs @@ -15,7 +15,7 @@ // limitations under the License. use crate::{ - coretime::{BrokerPalletId, CoretimeBurnAccount, PriceAdapter}, + coretime::{BrokerPalletId, CoretimeBurnAccount}, *, }; use frame_support::{ @@ -25,61 +25,9 @@ use frame_support::{ OnInitialize, }, }; -use pallet_broker::{AdaptPrice, ConfigRecordOf, SaleInfo}; +use pallet_broker::{ConfigRecordOf, SaleInfo}; use parachains_runtimes_test_utils::ExtBuilder; -use sp_runtime::{ - traits::{AccountIdConversion, One}, - FixedU64, -}; - -#[test] -fn adapt_price_no_panic() { - for limit in 0..10 { - for target in 1..10 { - for sold in 0..=limit { - let price = PriceAdapter::adapt_price(sold, target, limit); - - if sold > target { - assert!(price > FixedU64::one()); - } else { - assert!(price <= FixedU64::one()); - } - } - } - } -} - -#[test] -fn adapt_price_bound_check() { - // Using assumptions from pallet implementation i.e. `limit >= sold`. - // Check extremes - let limit = 10; - let target = 5; - - // Maximally sold: `sold == limit` - assert_eq!(PriceAdapter::adapt_price(limit, target, limit), FixedU64::from_float(1.2)); - // Ideally sold: `sold == target` - assert_eq!(PriceAdapter::adapt_price(target, target, limit), FixedU64::one()); - // Minimally sold: `sold == 0` - assert_eq!(PriceAdapter::adapt_price(0, target, limit), FixedU64::from_float(0.5)); - // Optimistic target: `target == limit` - assert_eq!(PriceAdapter::adapt_price(limit, limit, limit), FixedU64::one()); - // Pessimistic target: `target == 0` - assert_eq!(PriceAdapter::adapt_price(limit, 0, limit), FixedU64::from_float(1.2)); -} - -#[test] -fn leadin_price_bound_check() { - // Using assumptions from pallet implementation i.e. `when` in range [0, 1]. - // Linear, therefore we need three points to fully test it - - // Start of leadin: 5x - assert_eq!(PriceAdapter::leadin_factor_at(FixedU64::from(0)), FixedU64::from(5)); - // Midway through leadin: 3x - assert_eq!(PriceAdapter::leadin_factor_at(FixedU64::from_float(0.5)), FixedU64::from(3)); - // End of leadin: 1x - assert_eq!(PriceAdapter::leadin_factor_at(FixedU64::one()), FixedU64::one()); -} +use sp_runtime::traits::AccountIdConversion; fn advance_to(b: BlockNumber) { while System::block_number() < b { @@ -124,14 +72,14 @@ fn bulk_revenue_is_burnt() { let broker_account = BrokerPalletId::get().into_account_truncating(); let coretime_burn_account = CoretimeBurnAccount::get(); let treasury_account = xcm_config::RelayTreasuryPalletAccount::get(); - assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 10 * ed)); + assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 200 * ed)); let alice_balance_before = Balances::balance(&AccountId::from(ALICE)); let treasury_balance_before = Balances::balance(&treasury_account); let broker_balance_before = Balances::balance(&broker_account); let burn_balance_before = Balances::balance(&coretime_burn_account); // Purchase coretime. - assert_ok!(Broker::purchase(RuntimeOrigin::signed(AccountId::from(ALICE)), 5 * ed)); + assert_ok!(Broker::purchase(RuntimeOrigin::signed(AccountId::from(ALICE)), 100 * ed)); // Alice decreases. assert!(Balances::balance(&AccountId::from(ALICE)) < alice_balance_before); From 200a93522048997703c42a33ef61a5f2e9823e14 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 6 Jun 2024 17:58:35 +0200 Subject: [PATCH 13/20] Weights for 1.2.5 - `coretime-kusama` + `kusama` fix for new prefixed with `polkadot_runtime_common` (#343) New weights for: - `coretime-kusama` - `kusama` - `polkadot_runtime_common_*` - [x] Does not require a CHANGELOG entry ## Kusama subweight compare commits \ > --path-pattern "./relay/kusama/**/weights/**/*.rs" \ > --format markdown --no-color \ > --change added changed removed \ > --method asymptotic --ignore-errors \ > --strip-path-prefix="relay/kusama/src/weights/" \ > remotes/polkadot-fellows/main \ > origin/bko-weights | File | Extrinsic | Old | New | Change [%] | |----------------------------------------------|---------------------------|----------|----------|------------| | runtime_common_slots.rs | trigger_onboard | 326.14us | | Removed | | runtime_common_slots.rs | manage_lease_period_start | 39.56ms | | Removed | | runtime_common_slots.rs | force_lease | 277.82us | | Removed | | runtime_common_slots.rs | clear_all_leases | 1.25ms | | Removed | | runtime_common_paras_registrar.rs | swap | 1.11ms | | Removed | | runtime_common_paras_registrar.rs | set_current_head | 1.06ms | | Removed | | runtime_common_paras_registrar.rs | schedule_code_upgrade | 7.98ms | | Removed | | runtime_common_paras_registrar.rs | reserve | 300.60us | | Removed | | runtime_common_paras_registrar.rs | register | 6.99ms | | Removed | | runtime_common_paras_registrar.rs | force_register | 7.03ms | | Removed | | runtime_common_paras_registrar.rs | deregister | 602.09us | | Removed | | runtime_common_identity_migrator.rs | reap_identity | 11.10ms | | Removed | | runtime_common_identity_migrator.rs | poke_deposit | 490.74us | | Removed | | runtime_common_crowdloan.rs | withdraw | 572.14us | | Removed | | runtime_common_crowdloan.rs | refund | 289.48ms | | Removed | | runtime_common_crowdloan.rs | poke | 172.16us | | Removed | | runtime_common_crowdloan.rs | on_initialize | 38.28ms | | Removed | | runtime_common_crowdloan.rs | edit | 148.97us | | Removed | | runtime_common_crowdloan.rs | dissolve | 422.33us | | Removed | | runtime_common_crowdloan.rs | create | 476.03us | | Removed | | runtime_common_crowdloan.rs | contribute | 714.84us | | Removed | | runtime_common_crowdloan.rs | add_memo | 181.07us | | Removed | | runtime_common_claims.rs | move_claim | 835.43us | | Removed | | runtime_common_claims.rs | mint_claim | 438.40us | | Removed | | runtime_common_claims.rs | claim_attest | 999.94us | | Removed | | runtime_common_claims.rs | claim | 997.60us | | Removed | | runtime_common_claims.rs | attest | 1.01ms | | Removed | | runtime_common_auctions.rs | on_initialize | 467.52ms | | Removed | | runtime_common_auctions.rs | new_auction | 258.00us | | Removed | | runtime_common_auctions.rs | cancel_auction | 464.80ms | | Removed | | runtime_common_auctions.rs | bid | 669.29us | | Removed | | polkadot_runtime_common_slots.rs | trigger_onboard | | 354.19us | Added | | polkadot_runtime_common_slots.rs | manage_lease_period_start | | 40.10ms | Added | | polkadot_runtime_common_slots.rs | force_lease | | 284.94us | Added | | polkadot_runtime_common_slots.rs | clear_all_leases | | 1.31ms | Added | | polkadot_runtime_common_paras_registrar.rs | swap | | 1.16ms | Added | | polkadot_runtime_common_paras_registrar.rs | set_current_head | | 949.51us | Added | | polkadot_runtime_common_paras_registrar.rs | schedule_code_upgrade | | 8.09ms | Added | | polkadot_runtime_common_paras_registrar.rs | reserve | | 307.34us | Added | | polkadot_runtime_common_paras_registrar.rs | register | | 8.31ms | Added | | polkadot_runtime_common_paras_registrar.rs | force_register | | 8.30ms | Added | | polkadot_runtime_common_paras_registrar.rs | deregister | | 645.59us | Added | | polkadot_runtime_common_identity_migrator.rs | reap_identity | | 11.15ms | Added | | polkadot_runtime_common_identity_migrator.rs | poke_deposit | | 521.25us | Added | | polkadot_runtime_common_crowdloan.rs | withdraw | | 620.27us | Added | | polkadot_runtime_common_crowdloan.rs | refund | | 297.48ms | Added | | polkadot_runtime_common_crowdloan.rs | poke | | 192.32us | Added | | polkadot_runtime_common_crowdloan.rs | on_initialize | | 39.46ms | Added | | polkadot_runtime_common_crowdloan.rs | edit | | 168.16us | Added | | polkadot_runtime_common_crowdloan.rs | dissolve | | 446.87us | Added | | polkadot_runtime_common_crowdloan.rs | create | | 511.90us | Added | | polkadot_runtime_common_crowdloan.rs | contribute | | 788.83us | Added | | polkadot_runtime_common_crowdloan.rs | add_memo | | 210.67us | Added | | polkadot_runtime_common_claims.rs | move_claim | | 831.45us | Added | | polkadot_runtime_common_claims.rs | mint_claim | | 437.42us | Added | | polkadot_runtime_common_claims.rs | claim_attest | | 994.73us | Added | | polkadot_runtime_common_claims.rs | claim | | 995.32us | Added | | polkadot_runtime_common_claims.rs | attest | | 1.00ms | Added | | polkadot_runtime_common_auctions.rs | on_initialize | | 469.60ms | Added | | polkadot_runtime_common_auctions.rs | new_auction | | 259.51us | Added | | polkadot_runtime_common_auctions.rs | cancel_auction | | 466.71ms | Added | | polkadot_runtime_common_auctions.rs | bid | | 721.62us | Added | ## Coretime Kusama (threshold 5%) ``` subweight compare commits --path-pattern "./system-parachains/coretime/coretime-kusama/**/weights/**/*.rs" --format markdown --no-color --change added changed removed --method asymptotic --ignore-errors --threshold=5 --strip-path-prefix="system-parachains/coretime/coretime-kusama/src/weights/" remotes/polkadot-fellows/main origin/bko-weights ``` | File | Extrinsic | Old | New | Change [%] | |---------------------------------------|-----------------------------|--------------|----------|------------| | xcm/pallet_xcm_benchmarks_generic.rs | unpaid_execution | 1.21us | 4.56us | +277.48 | | xcm/pallet_xcm_benchmarks_generic.rs | trap | 1.23us | 4.56us | +270.13 | | xcm/pallet_xcm_benchmarks_generic.rs | expect_origin | 1.27us | 4.54us | +258.61 | | xcm/pallet_xcm_benchmarks_generic.rs | set_topic | 1.28us | 4.55us | +254.64 | | xcm/pallet_xcm_benchmarks_generic.rs | clear_origin | 1.29us | 4.58us | +254.49 | | xcm/pallet_xcm_benchmarks_generic.rs | expect_error | 1.27us | 4.51us | +253.73 | | xcm/pallet_xcm_benchmarks_generic.rs | buy_execution | 1.33us | 4.69us | +251.57 | | xcm/pallet_xcm_benchmarks_generic.rs | set_appendix | 1.31us | 4.60us | +250.34 | | xcm/pallet_xcm_benchmarks_generic.rs | clear_error | 1.31us | 4.59us | +249.58 | | xcm/pallet_xcm_benchmarks_generic.rs | clear_topic | 1.32us | 4.59us | +246.94 | | xcm/pallet_xcm_benchmarks_generic.rs | clear_transact_status | 1.35us | 4.67us | +246.70 | | xcm/pallet_xcm_benchmarks_generic.rs | set_error_handler | 1.35us | 4.61us | +240.72 | | xcm/pallet_xcm_benchmarks_generic.rs | set_fees_mode | 1.36us | 4.56us | +235.29 | | xcm/pallet_xcm_benchmarks_generic.rs | expect_asset | 1.42us | 4.75us | +233.80 | | xcm/pallet_xcm_benchmarks_generic.rs | descend_origin | 1.41us | 4.68us | +231.21 | | xcm/pallet_xcm_benchmarks_generic.rs | expect_transact_status | 1.48us | 4.79us | +224.31 | | xcm/pallet_xcm_benchmarks_generic.rs | burn_asset | 1.71us | 5.15us | +201.35 | | xcm/pallet_xcm_benchmarks_generic.rs | refund_surplus | 1.98us | 5.58us | +181.39 | | xcm/pallet_xcm_benchmarks_fungible.rs | receive_teleported_asset | 2.77us | 6.49us | +134.08 | | xcm/pallet_xcm_benchmarks_generic.rs | expect_pallet | 3.68us | 7.66us | +108.27 | | xcm/pallet_xcm_benchmarks_generic.rs | transact | 6.70us | 10.75us | +60.40 | | pallet_timestamp.rs | on_finalize | 2.83us | 3.87us | +36.70 | | pallet_utility.rs | as_derivative | 3.86us | 4.87us | +26.13 | | pallet_utility.rs | batch_all | 2.81ms | 3.51ms | +24.90 | | pallet_utility.rs | batch | 2.61ms | 3.25ms | +24.36 | | pallet_utility.rs | force_batch | 2.62ms | 3.25ms | +24.36 | | cumulus_pallet_xcmp_queue.rs | take_first_concatenated_xcm | 6.15us | 7.57us | +23.11 | | pallet_utility.rs | dispatch_as | 5.83us | 7.12us | +22.06 | | pallet_broker.rs | request_revenue_info_at | 205.00ns | 240.00ns | +17.07 | | xcm/pallet_xcm_benchmarks_generic.rs | query_response | 31.55us | 36.01us | +14.15 | | frame_system.rs | set_code | 108.25ms | 117.74ms | +8.77 | | pallet_proxy.rs | proxy | 38.82us | 42.05us | +8.31 | | frame_system.rs | apply_authorized_upgrade | 113.38ms | 120.10ms | +5.93 | | pallet_xcm.rs | claim_assets | 159.57us | 169.02us | +5.92 | | pallet_xcm.rs | take_response | 149.12us | 157.74us | +5.78 | | xcm/pallet_xcm_benchmarks_fungible.rs | withdraw_asset | 152.81us | 160.82us | +5.24 | | pallet_broker.rs | drop_history | 306.44us | 287.38us | -6.22 | | pallet_broker.rs | drop_renewal | 216.29us | 200.01us | -7.53 | | frame_system.rs | remark_with_event | 7.31ms | 6.48ms | -11.39 | | frame_system.rs | remark | 1.56ms | 1.38ms | -11.53 | | pallet_broker.rs | drop_contribution | 310.90us | 252.21us | -18.88 | | pallet_xcm.rs | execute | 18446744.07s | 11.10us | -100.00 | --- .../src/system_parachains_specs.rs | 3 +- relay/kusama/src/impls.rs | 2 +- relay/kusama/src/lib.rs | 16 +-- relay/kusama/src/weights/mod.rs | 12 +- ...rs => polkadot_runtime_common_auctions.rs} | 21 +-- ...s.rs => polkadot_runtime_common_claims.rs} | 25 ++-- ...s => polkadot_runtime_common_crowdloan.rs} | 49 +++---- ...kadot_runtime_common_identity_migrator.rs} | 61 ++++---- ...olkadot_runtime_common_paras_registrar.rs} | 41 +++--- ...ts.rs => polkadot_runtime_common_slots.rs} | 35 ++--- .../cumulus_pallet_parachain_system.rs | 13 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 33 ++--- .../src/weights/frame_system.rs | 59 ++++---- .../src/weights/pallet_balances.rs | 45 +++--- .../src/weights/pallet_broker.rs | 131 +++++++++--------- .../src/weights/pallet_collator_selection.rs | 93 +++++++------ .../src/weights/pallet_message_queue.rs | 45 +++--- .../src/weights/pallet_multisig.rs | 73 +++++----- .../src/weights/pallet_proxy.rs | 101 +++++++------- .../src/weights/pallet_session.rs | 13 +- .../src/weights/pallet_timestamp.rs | 13 +- .../src/weights/pallet_utility.rs | 37 ++--- .../coretime-kusama/src/weights/pallet_xcm.rs | 79 ++++++----- .../xcm/pallet_xcm_benchmarks_fungible.rs | 37 ++--- .../xcm/pallet_xcm_benchmarks_generic.rs | 117 ++++++++-------- 25 files changed, 581 insertions(+), 573 deletions(-) rename relay/kusama/src/weights/{runtime_common_auctions.rs => polkadot_runtime_common_auctions.rs} (92%) rename relay/kusama/src/weights/{runtime_common_claims.rs => polkadot_runtime_common_claims.rs} (92%) rename relay/kusama/src/weights/{runtime_common_crowdloan.rs => polkadot_runtime_common_crowdloan.rs} (89%) rename relay/kusama/src/weights/{runtime_common_identity_migrator.rs => polkadot_runtime_common_identity_migrator.rs} (68%) rename relay/kusama/src/weights/{runtime_common_paras_registrar.rs => polkadot_runtime_common_paras_registrar.rs} (91%) rename relay/kusama/src/weights/{runtime_common_slots.rs => polkadot_runtime_common_slots.rs} (85%) diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 965b56f9de..3031b50e9a 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -582,7 +582,8 @@ fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_ "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - "aura": encointer_kusama_runtime::aura_config_for_chain_spec(&["Alice"]), + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` }) } diff --git a/relay/kusama/src/impls.rs b/relay/kusama/src/impls.rs index 20880646cb..2dcdd7b63b 100644 --- a/relay/kusama/src/impls.rs +++ b/relay/kusama/src/impls.rs @@ -92,7 +92,7 @@ where fn on_reap_identity(who: &AccountId, fields: u32, subs: u32) -> DispatchResult { use crate::{ impls::IdentityMigratorCalls::PokeDeposit, - weights::runtime_common_identity_migrator::WeightInfo as MigratorWeights, + weights::polkadot_runtime_common_identity_migrator::WeightInfo as MigratorWeights, }; let total_to_send = Self::calculate_remote_deposit(fields, subs); diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 434b0baad3..5be00a0bf6 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -967,7 +967,7 @@ impl claims::Config for Runtime { type VestingSchedule = Vesting; type Prefix = Prefix; type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_claims::WeightInfo; } parameter_types! { @@ -1005,7 +1005,7 @@ impl identity_migrator::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Reaper = EnsureSigned; type ReapIdentityHandler = impls::ToParachainIdentityReaper; - type WeightInfo = weights::runtime_common_identity_migrator::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; } impl pallet_utility::Config for Runtime { @@ -1440,7 +1440,7 @@ impl paras_registrar::Config for Runtime { type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; type DataDepositPerByte = DataDepositPerByte; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_paras_registrar::WeightInfo; } parameter_types! { @@ -1455,7 +1455,7 @@ impl slots::Config for Runtime { type LeasePeriod = LeasePeriod; type LeaseOffset = (); type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_slots::WeightInfo; } parameter_types! { @@ -1476,7 +1476,7 @@ impl crowdloan::Config for Runtime { type Registrar = Registrar; type Auctioneer = Auctions; type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_crowdloan::WeightInfo; } parameter_types! { @@ -1495,7 +1495,7 @@ impl auctions::Config for Runtime { type SampleLength = SampleLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_auctions::WeightInfo; } type NisCounterpartInstance = pallet_balances::Instance2; @@ -1975,7 +1975,7 @@ pub mod migrations { ) { log::debug!(target: "runtime", "Cancelling scheduled auctions failed: {:?}", err); } - weights::runtime_common_auctions::WeightInfo::::cancel_auction() + weights::polkadot_runtime_common_auctions::WeightInfo::::cancel_auction() .saturating_add(weights::pallet_scheduler::WeightInfo::::cancel_named( ::MaxScheduledPerBlock::get(), )) @@ -2033,8 +2033,6 @@ pub type SignedPayload = generic::SignedPayload; mod benches { frame_benchmarking::define_benchmarks!( // Polkadot - // NOTE: Make sure to prefix these with `polkadot_runtime_common::` so - // that the path resolves correctly in the generated file. [polkadot_runtime_common::auctions, Auctions] [polkadot_runtime_common::crowdloan, Crowdloan] [polkadot_runtime_common::claims, Claims] diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index a2a426d424..64d53581e4 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -47,12 +47,12 @@ pub mod pallet_utility; pub mod pallet_vesting; pub mod pallet_whitelist; pub mod pallet_xcm; -pub mod runtime_common_auctions; -pub mod runtime_common_claims; -pub mod runtime_common_crowdloan; -pub mod runtime_common_identity_migrator; -pub mod runtime_common_paras_registrar; -pub mod runtime_common_slots; +pub mod polkadot_runtime_common_auctions; +pub mod polkadot_runtime_common_claims; +pub mod polkadot_runtime_common_crowdloan; +pub mod polkadot_runtime_common_identity_migrator; +pub mod polkadot_runtime_common_paras_registrar; +pub mod polkadot_runtime_common_slots; pub mod runtime_parachains_assigner_on_demand; pub mod runtime_parachains_configuration; pub mod runtime_parachains_coretime; diff --git a/relay/kusama/src/weights/runtime_common_auctions.rs b/relay/kusama/src/weights/polkadot_runtime_common_auctions.rs similarity index 92% rename from relay/kusama/src/weights/runtime_common_auctions.rs rename to relay/kusama/src/weights/polkadot_runtime_common_auctions.rs index 3ae18a8155..5830603d5a 100644 --- a/relay/kusama/src/weights/runtime_common_auctions.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_auctions.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `polkadot_runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `4` // Estimated: `1493` - // Minimum execution time: 7_667_000 picoseconds. - Weight::from_parts(7_995_000, 0) + // Minimum execution time: 9_260_000 picoseconds. + Weight::from_parts(9_510_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -78,8 +79,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `695` // Estimated: `6060` - // Minimum execution time: 66_644_000 picoseconds. - Weight::from_parts(69_287_000, 0) + // Minimum execution time: 107_190_000 picoseconds. + Weight::from_parts(121_620_000, 0) .saturating_add(Weight::from_parts(0, 6060)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -110,8 +111,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `6946955` // Estimated: `15822990` - // Minimum execution time: 7_034_503_000 picoseconds. - Weight::from_parts(7_143_252_000, 0) + // Minimum execution time: 9_051_931_000 picoseconds. + Weight::from_parts(9_227_043_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3687)) .saturating_add(T::DbWeight::get().writes(3682)) @@ -128,8 +129,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `177732` // Estimated: `15822990` - // Minimum execution time: 5_483_280_000 picoseconds. - Weight::from_parts(5_678_419_000, 0) + // Minimum execution time: 7_352_693_000 picoseconds. + Weight::from_parts(7_586_335_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/polkadot_runtime_common_claims.rs similarity index 92% rename from relay/kusama/src/weights/runtime_common_claims.rs rename to relay/kusama/src/weights/polkadot_runtime_common_claims.rs index 30d89a7011..af9c1b92a8 100644 --- a/relay/kusama/src/weights/runtime_common_claims.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_claims.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `polkadot_runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -66,8 +67,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `612` // Estimated: `4764` - // Minimum execution time: 179_772_000 picoseconds. - Weight::from_parts(197_595_000, 0) + // Minimum execution time: 181_801_000 picoseconds. + Weight::from_parts(195_321_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -84,8 +85,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `216` // Estimated: `1701` - // Minimum execution time: 11_512_000 picoseconds. - Weight::from_parts(13_403_000, 0) + // Minimum execution time: 11_890_000 picoseconds. + Weight::from_parts(12_420_000, 0) .saturating_add(Weight::from_parts(0, 1701)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) @@ -110,8 +111,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `612` // Estimated: `4764` - // Minimum execution time: 187_398_000 picoseconds. - Weight::from_parts(199_940_000, 0) + // Minimum execution time: 185_201_000 picoseconds. + Weight::from_parts(194_731_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -138,8 +139,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `686` // Estimated: `4764` - // Minimum execution time: 81_793_000 picoseconds. - Weight::from_parts(86_613_000, 0) + // Minimum execution time: 75_611_000 picoseconds. + Weight::from_parts(79_870_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -156,8 +157,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `440` // Estimated: `3905` - // Minimum execution time: 31_787_000 picoseconds. - Weight::from_parts(35_432_000, 0) + // Minimum execution time: 28_871_000 picoseconds. + Weight::from_parts(31_451_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/polkadot_runtime_common_crowdloan.rs similarity index 89% rename from relay/kusama/src/weights/runtime_common_crowdloan.rs rename to relay/kusama/src/weights/polkadot_runtime_common_crowdloan.rs index ea9cf9a120..6dfa061100 100644 --- a/relay/kusama/src/weights/runtime_common_crowdloan.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_crowdloan.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `polkadot_runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -60,8 +61,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `438` // Estimated: `3903` - // Minimum execution time: 46_789_000 picoseconds. - Weight::from_parts(51_028_000, 0) + // Minimum execution time: 84_580_000 picoseconds. + Weight::from_parts(86_900_000, 0) .saturating_add(Weight::from_parts(0, 3903)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -84,8 +85,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `497` // Estimated: `3962` - // Minimum execution time: 135_300_000 picoseconds. - Weight::from_parts(139_837_000, 0) + // Minimum execution time: 208_191_000 picoseconds. + Weight::from_parts(213_831_000, 0) .saturating_add(Weight::from_parts(0, 3962)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -100,8 +101,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `687` // Estimated: `6196` - // Minimum execution time: 70_040_000 picoseconds. - Weight::from_parts(72_140_000, 0) + // Minimum execution time: 117_641_000 picoseconds. + Weight::from_parts(120_270_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -113,11 +114,11 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `125 + k * (189 ±0)` // Estimated: `138 + k * (189 ±0)` - // Minimum execution time: 46_258_000 picoseconds. - Weight::from_parts(49_158_000, 0) + // Minimum execution time: 95_190_000 picoseconds. + Weight::from_parts(115_630_000, 0) .saturating_add(Weight::from_parts(0, 138)) - // Standard Error: 21_760 - .saturating_add(Weight::from_parts(39_151_058, 0).saturating_mul(k.into())) + // Standard Error: 21_856 + .saturating_add(Weight::from_parts(47_090_016, 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)) @@ -132,8 +133,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `514` // Estimated: `6196` - // Minimum execution time: 43_030_000 picoseconds. - Weight::from_parts(47_333_000, 0) + // Minimum execution time: 70_160_000 picoseconds. + Weight::from_parts(71_870_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -144,8 +145,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `234` // Estimated: `3699` - // Minimum execution time: 22_206_000 picoseconds. - Weight::from_parts(23_970_000, 0) + // Minimum execution time: 35_150_000 picoseconds. + Weight::from_parts(43_160_000, 0) .saturating_add(Weight::from_parts(0, 3699)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -158,8 +159,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 29_089_000 picoseconds. - Weight::from_parts(31_068_000, 0) + // Minimum execution time: 57_721_000 picoseconds. + Weight::from_parts(60_670_000, 0) .saturating_add(Weight::from_parts(0, 3877)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +173,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `238` // Estimated: `3703` - // Minimum execution time: 20_611_000 picoseconds. - Weight::from_parts(22_158_000, 0) + // Minimum execution time: 40_560_000 picoseconds. + Weight::from_parts(42_320_000, 0) .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -203,11 +204,11 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `163 + n * (356 ±0)` // Estimated: `5385 + n * (2832 ±0)` - // Minimum execution time: 117_484_000 picoseconds. - Weight::from_parts(17_569_702, 0) + // Minimum execution time: 163_171_000 picoseconds. + Weight::from_parts(168_321_000, 0) .saturating_add(Weight::from_parts(0, 5385)) - // Standard Error: 42_632 - .saturating_add(Weight::from_parts(53_393_948, 0).saturating_mul(n.into())) + // Standard Error: 67_691 + .saturating_add(Weight::from_parts(63_637_866, 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_identity_migrator.rs b/relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs similarity index 68% rename from relay/kusama/src/weights/runtime_common_identity_migrator.rs rename to relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs index 28c80d1c4c..7b999b032f 100644 --- a/relay/kusama/src/weights/runtime_common_identity_migrator.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs @@ -1,43 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `polkadot_runtime_common::identity_migrator` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-bn-ce5rx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet -// --chain=rococo-dev +// --chain=./kusama-chain-spec.json // --steps=50 // --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares // --pallet=polkadot_runtime_common::identity_migrator // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --header=./polkadot/file_header.txt -// --output=./polkadot/runtime/rococo/src/weights/runtime_common_identity_migrator.rs +// --heap-pages=4096 +// --output=./kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -70,15 +67,13 @@ impl polkadot_runtime_common::identity_migrator::Weight /// The range of component `s` is `[0, 100]`. fn reap_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7457 + r * (5 ±0) + s * (32 ±0)` + // Measured: `7391 + r * (5 ±0) + s * (32 ±0)` // Estimated: `11037 + r * (7 ±0) + s * (32 ±0)` - // Minimum execution time: 157_343_000 picoseconds. - Weight::from_parts(159_289_236, 0) + // Minimum execution time: 181_550_000 picoseconds. + Weight::from_parts(190_125_430, 0) .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 16_439 - .saturating_add(Weight::from_parts(224_293, 0).saturating_mul(r.into())) - // Standard Error: 3_367 - .saturating_add(Weight::from_parts(1_383_637, 0).saturating_mul(s.into())) + // Standard Error: 2_225 + .saturating_add(Weight::from_parts(1_607_494, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -95,8 +90,8 @@ impl polkadot_runtime_common::identity_migrator::Weight // Proof Size summary in bytes: // Measured: `7242` // Estimated: `11037` - // Minimum execution time: 114_384_000 picoseconds. - Weight::from_parts(115_741_000, 0) + // Minimum execution time: 145_051_000 picoseconds. + Weight::from_parts(146_251_000, 0) .saturating_add(Weight::from_parts(0, 11037)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/kusama/src/weights/runtime_common_paras_registrar.rs b/relay/kusama/src/weights/polkadot_runtime_common_paras_registrar.rs similarity index 91% rename from relay/kusama/src/weights/runtime_common_paras_registrar.rs rename to relay/kusama/src/weights/polkadot_runtime_common_paras_registrar.rs index da7ef411a5..1179c86e00 100644 --- a/relay/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_paras_registrar.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `polkadot_runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -56,8 +57,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `96` // Estimated: `3561` - // Minimum execution time: 24_391_000 picoseconds. - Weight::from_parts(25_596_000, 0) + // Minimum execution time: 31_540_000 picoseconds. + Weight::from_parts(32_340_000, 0) .saturating_add(Weight::from_parts(0, 3561)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -84,8 +85,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `389` // Estimated: `3854` - // Minimum execution time: 5_993_849_000 picoseconds. - Weight::from_parts(6_011_821_000, 0) + // Minimum execution time: 7_219_003_000 picoseconds. + Weight::from_parts(7_330_365_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) @@ -112,8 +113,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `306` // Estimated: `3771` - // Minimum execution time: 5_996_100_000 picoseconds. - Weight::from_parts(6_054_571_000, 0) + // Minimum execution time: 7_190_134_000 picoseconds. + Weight::from_parts(7_323_625_000, 0) .saturating_add(Weight::from_parts(0, 3771)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) @@ -136,8 +137,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `503` // Estimated: `3968` - // Minimum execution time: 50_060_000 picoseconds. - Weight::from_parts(52_092_000, 0) + // Minimum execution time: 93_270_000 picoseconds. + Weight::from_parts(95_591_000, 0) .saturating_add(Weight::from_parts(0, 3968)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -160,8 +161,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `775` // Estimated: `6715` - // Minimum execution time: 57_116_000 picoseconds. - Weight::from_parts(61_543_000, 0) + // Minimum execution time: 98_071_000 picoseconds. + Weight::from_parts(110_881_000, 0) .saturating_add(Weight::from_parts(0, 6715)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) @@ -189,11 +190,11 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `238` // Estimated: `3703` - // Minimum execution time: 32_785_000 picoseconds. - Weight::from_parts(33_247_000, 0) + // Minimum execution time: 39_550_000 picoseconds. + Weight::from_parts(39_990_000, 0) .saturating_add(Weight::from_parts(0, 3703)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_232, 0).saturating_mul(b.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(2_266, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -204,11 +205,11 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_970_000 picoseconds. - Weight::from_parts(7_513_782, 0) + // Minimum execution time: 7_420_000 picoseconds. + Weight::from_parts(7_500_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(910, 0).saturating_mul(b.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(803, 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/polkadot_runtime_common_slots.rs similarity index 85% rename from relay/kusama/src/weights/runtime_common_slots.rs rename to relay/kusama/src/weights/polkadot_runtime_common_slots.rs index dccac44368..48d0e6bbd9 100644 --- a/relay/kusama/src/weights/runtime_common_slots.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_slots.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `polkadot_runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei // Proof Size summary in bytes: // Measured: `254` // Estimated: `3719` - // Minimum execution time: 26_919_000 picoseconds. - Weight::from_parts(27_818_000, 0) + // Minimum execution time: 34_210_000 picoseconds. + Weight::from_parts(34_940_000, 0) .saturating_add(Weight::from_parts(0, 3719)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -74,15 +75,15 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei /// The range of component `t` is `[0, 100]`. fn manage_lease_period_start(c: u32, t: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `591 + c * (20 ±0) + t * (234 ±0)` - // Estimated: `4062 + c * (2496 ±0) + t * (2709 ±0)` - // Minimum execution time: 704_222_000 picoseconds. - Weight::from_parts(708_202_000, 0) - .saturating_add(Weight::from_parts(0, 4062)) - // Standard Error: 84_256 - .saturating_add(Weight::from_parts(2_736_859, 0).saturating_mul(c.into())) - // Standard Error: 84_256 - .saturating_add(Weight::from_parts(8_817_667, 0).saturating_mul(t.into())) + // Measured: `480 + c * (20 ±0) + t * (234 ±0)` + // Estimated: `3951 + c * (2496 ±0) + t * (2709 ±0)` + // Minimum execution time: 921_855_000 picoseconds. + Weight::from_parts(938_995_000, 0) + .saturating_add(Weight::from_parts(0, 3951)) + // Standard Error: 110_059 + .saturating_add(Weight::from_parts(3_418_523, 0).saturating_mul(c.into())) + // Standard Error: 110_059 + .saturating_add(Weight::from_parts(11_178_525, 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()))) @@ -100,8 +101,8 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei // Proof Size summary in bytes: // Measured: `2726` // Estimated: `21814` - // Minimum execution time: 119_905_000 picoseconds. - Weight::from_parts(124_276_000, 0) + // Minimum execution time: 176_251_000 picoseconds. + Weight::from_parts(181_651_000, 0) .saturating_add(Weight::from_parts(0, 21814)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(9)) @@ -118,8 +119,8 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei // Proof Size summary in bytes: // Measured: `550` // Estimated: `4015` - // Minimum execution time: 25_135_000 picoseconds. - Weight::from_parts(26_140_000, 0) + // Minimum execution time: 51_250_000 picoseconds. + Weight::from_parts(54_190_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/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs index d5184a66f9..5a7a125934 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -61,11 +62,11 @@ impl cumulus_pallet_parachain_system::WeightInfo for We // Proof Size summary in bytes: // Measured: `48` // Estimated: `3517` - // Minimum execution time: 1_990_000 picoseconds. - Weight::from_parts(2_059_000, 0) + // Minimum execution time: 2_720_000 picoseconds. + Weight::from_parts(2_790_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 68_248 - .saturating_add(Weight::from_parts(195_544_988, 0).saturating_mul(n.into())) + // Standard Error: 49_364 + .saturating_add(Weight::from_parts(183_502_724, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index c85b4bac66..a40662f352 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_652_000 picoseconds. - Weight::from_parts(3_817_000, 0) + // Minimum execution time: 4_870_000 picoseconds. + Weight::from_parts(5_020_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -72,8 +73,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `82` // Estimated: `3517` - // Minimum execution time: 10_047_000 picoseconds. - Weight::from_parts(10_631_000, 0) + // Minimum execution time: 12_610_000 picoseconds. + Weight::from_parts(12_910_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -84,8 +85,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 2_276_000 picoseconds. - Weight::from_parts(2_407_000, 0) + // Minimum execution time: 3_050_000 picoseconds. + Weight::from_parts(3_190_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -96,8 +97,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `111` // Estimated: `1596` - // Minimum execution time: 3_162_000 picoseconds. - Weight::from_parts(3_298_000, 0) + // Minimum execution time: 4_220_000 picoseconds. + Weight::from_parts(4_350_000, 0) .saturating_add(Weight::from_parts(0, 1596)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +107,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_959_000 picoseconds. - Weight::from_parts(6_149_000, 0) + // Minimum execution time: 7_360_000 picoseconds. + Weight::from_parts(7_570_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -128,8 +129,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65711` // Estimated: `69176` - // Minimum execution time: 111_306_000 picoseconds. - Weight::from_parts(114_008_000, 0) + // Minimum execution time: 108_100_000 picoseconds. + Weight::from_parts(109_810_000, 0) .saturating_add(Weight::from_parts(0, 69176)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -142,8 +143,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65710` // Estimated: `69175` - // Minimum execution time: 55_043_000 picoseconds. - Weight::from_parts(57_438_000, 0) + // Minimum execution time: 52_700_000 picoseconds. + Weight::from_parts(53_500_000, 0) .saturating_add(Weight::from_parts(0, 69175)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs b/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs index d98fbcfd28..1d16a46e41 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -51,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_534_000 picoseconds. - Weight::from_parts(1_596_000, 0) + // Minimum execution time: 2_190_000 picoseconds. + Weight::from_parts(2_280_000, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(397, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(351, 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: 4_629_000 picoseconds. - Weight::from_parts(4_730_000, 0) + // Minimum execution time: 5_720_000 picoseconds. + Weight::from_parts(5_850_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_858, 0).saturating_mul(b.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_646, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -76,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 2_652_000 picoseconds. - Weight::from_parts(2_903_000, 0) + // Minimum execution time: 3_690_000 picoseconds. + Weight::from_parts(3_830_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -98,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164` // Estimated: `1649` - // Minimum execution time: 102_030_543_000 picoseconds. - Weight::from_parts(107_847_484_000, 0) + // Minimum execution time: 114_377_022_000 picoseconds. + Weight::from_parts(117_335_830_000, 0) .saturating_add(Weight::from_parts(0, 1649)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -111,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_551_000 picoseconds. - Weight::from_parts(1_583_000, 0) + // Minimum execution time: 2_250_000 picoseconds. + Weight::from_parts(2_320_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_724 - .saturating_add(Weight::from_parts(790_287, 0).saturating_mul(i.into())) + // Standard Error: 2_328 + .saturating_add(Weight::from_parts(896_259, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -125,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_711_000, 0) + // Minimum execution time: 2_170_000 picoseconds. + Weight::from_parts(2_240_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_316 - .saturating_add(Weight::from_parts(580_348, 0).saturating_mul(i.into())) + // Standard Error: 1_020 + .saturating_add(Weight::from_parts(662_221, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -139,11 +140,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76 + p * (69 ±0)` // Estimated: `77 + p * (70 ±0)` - // Minimum execution time: 3_297_000 picoseconds. - Weight::from_parts(3_360_000, 0) + // Minimum execution time: 4_260_000 picoseconds. + Weight::from_parts(4_360_000, 0) .saturating_add(Weight::from_parts(0, 77)) - // Standard Error: 2_464 - .saturating_add(Weight::from_parts(1_222_851, 0).saturating_mul(p.into())) + // Standard Error: 1_402 + .saturating_add(Weight::from_parts(1_344_948, 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())) @@ -154,8 +155,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_065_000 picoseconds. - Weight::from_parts(17_509_000, 0) + // Minimum execution time: 19_890_000 picoseconds. + Weight::from_parts(21_431_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -177,8 +178,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `1671` - // Minimum execution time: 106_370_746_000 picoseconds. - Weight::from_parts(112_855_514_000, 0) + // Minimum execution time: 116_042_862_000 picoseconds. + Weight::from_parts(119_579_233_000, 0) .saturating_add(Weight::from_parts(0, 1671)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs index 023bb1f0e6..dc51cb17bc 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_492_000 picoseconds. - Weight::from_parts(44_056_000, 0) + // Minimum execution time: 51_470_000 picoseconds. + Weight::from_parts(51_961_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 34_219_000 picoseconds. - Weight::from_parts(35_140_000, 0) + // Minimum execution time: 40_860_000 picoseconds. + Weight::from_parts(41_410_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -76,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 12_217_000 picoseconds. - Weight::from_parts(12_619_000, 0) + // Minimum execution time: 14_880_000 picoseconds. + Weight::from_parts(15_320_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -88,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 17_105_000 picoseconds. - Weight::from_parts(17_472_000, 0) + // Minimum execution time: 20_661_000 picoseconds. + Weight::from_parts(21_101_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -100,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 44_381_000 picoseconds. - Weight::from_parts(45_303_000, 0) + // Minimum execution time: 53_311_000 picoseconds. + Weight::from_parts(53_800_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -112,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_069_000 picoseconds. - Weight::from_parts(43_721_000, 0) + // Minimum execution time: 50_891_000 picoseconds. + Weight::from_parts(51_430_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -124,8 +125,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_976_000 picoseconds. - Weight::from_parts(15_440_000, 0) + // Minimum execution time: 18_320_000 picoseconds. + Weight::from_parts(18_730_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 +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: 14_257_000 picoseconds. - Weight::from_parts(14_617_000, 0) + // Minimum execution time: 17_170_000 picoseconds. + Weight::from_parts(17_450_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 18_371 - .saturating_add(Weight::from_parts(13_681_919, 0).saturating_mul(u.into())) + // Standard Error: 12_066 + .saturating_add(Weight::from_parts(15_360_202, 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())) @@ -152,8 +153,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1501` - // Minimum execution time: 5_002_000 picoseconds. - Weight::from_parts(5_369_000, 0) + // Minimum execution time: 6_260_000 picoseconds. + Weight::from_parts(6_540_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs index 7cf9e7318f..d0b4b1c09a 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_broker` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_019_000 picoseconds. - Weight::from_parts(2_113_000, 0) + // Minimum execution time: 2_690_000 picoseconds. + Weight::from_parts(2_740_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,8 +64,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `10888` // Estimated: `13506` - // Minimum execution time: 21_802_000 picoseconds. - Weight::from_parts(22_323_000, 0) + // Minimum execution time: 26_700_000 picoseconds. + Weight::from_parts(27_150_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,8 +76,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12090` // Estimated: `13506` - // Minimum execution time: 20_534_000 picoseconds. - Weight::from_parts(21_308_000, 0) + // Minimum execution time: 25_360_000 picoseconds. + Weight::from_parts(25_690_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +92,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `466` // Estimated: `1951` - // Minimum execution time: 10_629_000 picoseconds. - Weight::from_parts(10_941_000, 0) + // Minimum execution time: 12_980_000 picoseconds. + Weight::from_parts(13_260_000, 0) .saturating_add(Weight::from_parts(0, 1951)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -120,8 +121,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12567` // Estimated: `14052` - // Minimum execution time: 112_537_000 picoseconds. - Weight::from_parts(119_546_511, 0) + // Minimum execution time: 139_521_000 picoseconds. + Weight::from_parts(141_961_075, 0) .saturating_add(Weight::from_parts(0, 14052)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(66)) @@ -136,10 +137,10 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) fn purchase() -> Weight { // Proof Size summary in bytes: - // Measured: `316` + // Measured: `371` // Estimated: `3593` - // Minimum execution time: 32_291_000 picoseconds. - Weight::from_parts(33_428_000, 0) + // Minimum execution time: 38_660_000 picoseconds. + Weight::from_parts(39_130_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -158,10 +159,10 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn renew() -> Weight { // Proof Size summary in bytes: - // Measured: `434` + // Measured: `489` // Estimated: `4698` - // Minimum execution time: 69_914_000 picoseconds. - Weight::from_parts(78_519_000, 0) + // Minimum execution time: 62_200_000 picoseconds. + Weight::from_parts(63_780_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -172,8 +173,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3550` - // Minimum execution time: 12_634_000 picoseconds. - Weight::from_parts(13_156_000, 0) + // Minimum execution time: 15_960_000 picoseconds. + Weight::from_parts(16_250_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -184,8 +185,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3550` - // Minimum execution time: 13_869_000 picoseconds. - Weight::from_parts(14_691_000, 0) + // Minimum execution time: 17_591_000 picoseconds. + Weight::from_parts(17_820_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -196,8 +197,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3550` - // Minimum execution time: 15_415_000 picoseconds. - Weight::from_parts(16_270_000, 0) + // Minimum execution time: 18_870_000 picoseconds. + Weight::from_parts(19_271_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -214,8 +215,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `936` // Estimated: `4681` - // Minimum execution time: 24_709_000 picoseconds. - Weight::from_parts(25_781_000, 0) + // Minimum execution time: 30_540_000 picoseconds. + Weight::from_parts(31_190_000, 0) .saturating_add(Weight::from_parts(0, 4681)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -234,8 +235,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1002` // Estimated: `5996` - // Minimum execution time: 29_694_000 picoseconds. - Weight::from_parts(31_352_000, 0) + // Minimum execution time: 37_260_000 picoseconds. + Weight::from_parts(37_850_000, 0) .saturating_add(Weight::from_parts(0, 5996)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -251,11 +252,11 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `652` // Estimated: `6196 + m * (2520 ±0)` - // Minimum execution time: 55_764_000 picoseconds. - Weight::from_parts(56_067_599, 0) + // Minimum execution time: 65_170_000 picoseconds. + Weight::from_parts(64_695_259, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 45_065 - .saturating_add(Weight::from_parts(1_490_168, 0).saturating_mul(m.into())) + // Standard Error: 23_709 + .saturating_add(Weight::from_parts(1_568_840, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -267,8 +268,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 38_451_000 picoseconds. - Weight::from_parts(39_235_000, 0) + // Minimum execution time: 44_140_000 picoseconds. + Weight::from_parts(44_520_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,8 +282,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `465` // Estimated: `3550` - // Minimum execution time: 55_440_000 picoseconds. - Weight::from_parts(65_949_000, 0) + // Minimum execution time: 51_630_000 picoseconds. + Weight::from_parts(57_951_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -297,8 +298,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `463` // Estimated: `3533` - // Minimum execution time: 120_176_000 picoseconds. - Weight::from_parts(135_905_000, 0) + // Minimum execution time: 64_190_000 picoseconds. + Weight::from_parts(77_210_000, 0) .saturating_add(Weight::from_parts(0, 3533)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -315,8 +316,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `857` // Estimated: `3593` - // Minimum execution time: 92_128_000 picoseconds. - Weight::from_parts(106_439_000, 0) + // Minimum execution time: 74_650_000 picoseconds. + Weight::from_parts(87_380_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -329,8 +330,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `957` // Estimated: `4698` - // Minimum execution time: 46_730_000 picoseconds. - Weight::from_parts(66_288_000, 0) + // Minimum execution time: 45_131_000 picoseconds. + Weight::from_parts(50_010_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -348,30 +349,26 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1000]`. - fn request_core_count(n: u32, ) -> Weight { + fn request_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 18_819_000 picoseconds. - Weight::from_parts(19_830_463, 0) + // Minimum execution time: 22_380_000 picoseconds. + Weight::from_parts(23_219_172, 0) .saturating_add(Weight::from_parts(0, 3539)) - // Standard Error: 44 - .saturating_add(Weight::from_parts(8, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Broker::CoreCountInbox` (r:1 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. - fn process_core_count(n: u32, ) -> Weight { + fn process_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `266` // Estimated: `1487` - // Minimum execution time: 5_566_000 picoseconds. - Weight::from_parts(6_078_648, 0) + // Minimum execution time: 6_910_000 picoseconds. + Weight::from_parts(7_403_610, 0) .saturating_add(Weight::from_parts(0, 1487)) - // Standard Error: 16 - .saturating_add(Weight::from_parts(47, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -383,10 +380,10 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn process_revenue() -> Weight { // Proof Size summary in bytes: - // Measured: `447` + // Measured: `486` // Estimated: `6196` - // Minimum execution time: 37_255_000 picoseconds. - Weight::from_parts(37_998_000, 0) + // Minimum execution time: 45_160_000 picoseconds. + Weight::from_parts(45_641_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -406,8 +403,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12514` // Estimated: `13506` - // Minimum execution time: 91_560_000 picoseconds. - Weight::from_parts(98_810_427, 0) + // Minimum execution time: 115_150_000 picoseconds. + Weight::from_parts(116_659_110, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(65)) @@ -420,8 +417,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3493` - // Minimum execution time: 5_927_000 picoseconds. - Weight::from_parts(6_236_000, 0) + // Minimum execution time: 7_400_000 picoseconds. + Weight::from_parts(7_540_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -446,8 +443,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1321` // Estimated: `4786` - // Minimum execution time: 30_690_000 picoseconds. - Weight::from_parts(31_495_000, 0) + // Minimum execution time: 36_030_000 picoseconds. + Weight::from_parts(36_461_000, 0) .saturating_add(Weight::from_parts(0, 4786)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -456,8 +453,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 180_000 picoseconds. - Weight::from_parts(205_000, 0) + // Minimum execution time: 210_000 picoseconds. + Weight::from_parts(240_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Broker::CoreCountInbox` (r:0 w:1) @@ -466,8 +463,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_694_000 picoseconds. - Weight::from_parts(1_891_000, 0) + // Minimum execution time: 2_250_000 picoseconds. + Weight::from_parts(2_380_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -485,8 +482,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398` // Estimated: `3863` - // Minimum execution time: 12_033_000 picoseconds. - Weight::from_parts(12_490_000, 0) + // Minimum execution time: 14_840_000 picoseconds. + Weight::from_parts(15_220_000, 0) .saturating_add(Weight::from_parts(0, 3863)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs index 736f9f5229..13c727de69 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -55,11 +56,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `197 + b * (79 ±0)` // Estimated: `1188 + b * (2555 ±0)` - // Minimum execution time: 10_981_000 picoseconds. - Weight::from_parts(8_009_860, 0) + // Minimum execution time: 13_960_000 picoseconds. + Weight::from_parts(10_493_437, 0) .saturating_add(Weight::from_parts(0, 1188)) - // Standard Error: 6_961 - .saturating_add(Weight::from_parts(3_156_897, 0).saturating_mul(b.into())) + // Standard Error: 6_620 + .saturating_add(Weight::from_parts(3_919_608, 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())) @@ -78,13 +79,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `795 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 38_210_000 picoseconds. - Weight::from_parts(33_251_219, 0) + // Minimum execution time: 43_321_000 picoseconds. + Weight::from_parts(43_559_960, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 17_183 - .saturating_add(Weight::from_parts(263_833, 0).saturating_mul(b.into())) - // Standard Error: 3_257 - .saturating_add(Weight::from_parts(278_429, 0).saturating_mul(c.into())) + // Standard Error: 3_925 + .saturating_add(Weight::from_parts(40_035, 0).saturating_mul(b.into())) + // Standard Error: 744 + .saturating_add(Weight::from_parts(77_861, 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())) @@ -99,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: 10_968_000 picoseconds. - Weight::from_parts(10_603_019, 0) + // Minimum execution time: 13_350_000 picoseconds. + Weight::from_parts(13_522_618, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_677 - .saturating_add(Weight::from_parts(185_183, 0).saturating_mul(b.into())) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(81_761, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_918_000 picoseconds. - Weight::from_parts(4_125_000, 0) + // Minimum execution time: 5_020_000 picoseconds. + Weight::from_parts(5_180_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -132,13 +133,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + c * (182 ±0) + k * (115 ±0)` // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` - // Minimum execution time: 8_964_000 picoseconds. - Weight::from_parts(9_273_000, 0) + // Minimum execution time: 11_190_000 picoseconds. + Weight::from_parts(11_360_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 160_904 - .saturating_add(Weight::from_parts(5_495_918, 0).saturating_mul(c.into())) - // Standard Error: 160_904 - .saturating_add(Weight::from_parts(5_046_443, 0).saturating_mul(k.into())) + // Standard Error: 182_760 + .saturating_add(Weight::from_parts(6_034_800, 0).saturating_mul(c.into())) + // Standard Error: 182_760 + .saturating_add(Weight::from_parts(5_814_526, 0).saturating_mul(k.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(c.into()))) @@ -155,11 +156,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `319 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 23_619_000 picoseconds. - Weight::from_parts(25_104_533, 0) + // Minimum execution time: 30_220_000 picoseconds. + Weight::from_parts(30_766_989, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_541 - .saturating_add(Weight::from_parts(220_219, 0).saturating_mul(c.into())) + // Standard Error: 720 + .saturating_add(Weight::from_parts(70_645, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,11 +179,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `765 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 31_983_000 picoseconds. - Weight::from_parts(34_539_927, 0) + // Minimum execution time: 40_270_000 picoseconds. + Weight::from_parts(42_085_323, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 3_440 - .saturating_add(Weight::from_parts(262_327, 0).saturating_mul(c.into())) + // Standard Error: 616 + .saturating_add(Weight::from_parts(88_625, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -204,11 +205,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `905 + c * (53 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 47_189_000 picoseconds. - Weight::from_parts(50_256_996, 0) + // Minimum execution time: 58_210_000 picoseconds. + Weight::from_parts(59_954_984, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 4_570 - .saturating_add(Weight::from_parts(307_194, 0).saturating_mul(c.into())) + // Standard Error: 2_080 + .saturating_add(Weight::from_parts(127_318, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -224,11 +225,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `347 + c * (48 ±0)` // Estimated: `6287` - // Minimum execution time: 26_863_000 picoseconds. - Weight::from_parts(29_118_842, 0) + // Minimum execution time: 32_730_000 picoseconds. + Weight::from_parts(33_752_873, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 3_050 - .saturating_add(Weight::from_parts(234_040, 0).saturating_mul(c.into())) + // Standard Error: 752 + .saturating_add(Weight::from_parts(81_088, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -242,8 +243,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 38_661_000 picoseconds. - Weight::from_parts(39_178_000, 0) + // Minimum execution time: 45_140_000 picoseconds. + Weight::from_parts(45_591_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -266,11 +267,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 17_778_000 picoseconds. - Weight::from_parts(18_324_000, 0) + // Minimum execution time: 22_660_000 picoseconds. + Weight::from_parts(22_880_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 292_567 - .saturating_add(Weight::from_parts(12_957_061, 0).saturating_mul(c.into())) + // Standard Error: 322_936 + .saturating_add(Weight::from_parts(14_085_936, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs index 1ed176a7b2..24016ecad4 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_966_000 picoseconds. - Weight::from_parts(11_291_000, 0) + // Minimum execution time: 14_571_000 picoseconds. + Weight::from_parts(14_811_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -68,8 +69,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `218` // Estimated: `6044` - // Minimum execution time: 9_989_000 picoseconds. - Weight::from_parts(10_476_000, 0) + // Minimum execution time: 12_620_000 picoseconds. + Weight::from_parts(13_101_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -80,8 +81,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `6` // Estimated: `3517` - // Minimum execution time: 3_142_000 picoseconds. - Weight::from_parts(3_257_000, 0) + // Minimum execution time: 4_350_000 picoseconds. + Weight::from_parts(4_520_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -92,8 +93,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 4_805_000 picoseconds. - Weight::from_parts(4_975_000, 0) + // Minimum execution time: 6_701_000 picoseconds. + Weight::from_parts(6_870_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -104,8 +105,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_042_000 picoseconds. - Weight::from_parts(5_211_000, 0) + // Minimum execution time: 6_900_000 picoseconds. + Weight::from_parts(7_100_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -118,8 +119,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 161_299_000 picoseconds. - Weight::from_parts(163_261_000, 0) + // Minimum execution time: 156_471_000 picoseconds. + Weight::from_parts(157_341_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -131,8 +132,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `171` // Estimated: `3517` - // Minimum execution time: 6_344_000 picoseconds. - Weight::from_parts(6_688_000, 0) + // Minimum execution time: 8_240_000 picoseconds. + Weight::from_parts(8_440_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -145,8 +146,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 52_362_000 picoseconds. - Weight::from_parts(55_035_000, 0) + // Minimum execution time: 55_420_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -159,8 +160,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 68_626_000 picoseconds. - Weight::from_parts(71_320_000, 0) + // Minimum execution time: 74_411_000 picoseconds. + Weight::from_parts(74_971_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -173,8 +174,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 105_136_000 picoseconds. - Weight::from_parts(107_280_000, 0) + // Minimum execution time: 106_591_000 picoseconds. + Weight::from_parts(107_671_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs index 89321abcc0..afa7543e8e 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -51,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_627_000 picoseconds. - Weight::from_parts(13_515_477, 0) + // Minimum execution time: 13_080_000 picoseconds. + Weight::from_parts(13_418_390, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(501, 0).saturating_mul(z.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(483, 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`) @@ -65,13 +66,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 37_869_000 picoseconds. - Weight::from_parts(26_279_794, 0) + // Minimum execution time: 42_450_000 picoseconds. + Weight::from_parts(35_101_100, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_228 - .saturating_add(Weight::from_parts(137_932, 0).saturating_mul(s.into())) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_451, 0).saturating_mul(z.into())) + // Standard Error: 426 + .saturating_add(Weight::from_parts(81_884, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_449, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -83,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 25_796_000 picoseconds. - Weight::from_parts(16_023_887, 0) + // Minimum execution time: 27_150_000 picoseconds. + Weight::from_parts(20_132_666, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_011 - .saturating_add(Weight::from_parts(116_753, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_415, 0).saturating_mul(z.into())) + // Standard Error: 265 + .saturating_add(Weight::from_parts(80_739, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_433, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -103,13 +104,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 43_645_000 picoseconds. - Weight::from_parts(28_063_969, 0) + // Minimum execution time: 47_440_000 picoseconds. + Weight::from_parts(37_762_141, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_570 - .saturating_add(Weight::from_parts(203_802, 0).saturating_mul(s.into())) - // Standard Error: 15 - .saturating_add(Weight::from_parts(1_585, 0).saturating_mul(z.into())) + // Standard Error: 386 + .saturating_add(Weight::from_parts(103_015, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_503, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -120,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 25_416_000 picoseconds. - Weight::from_parts(25_801_633, 0) + // Minimum execution time: 32_130_000 picoseconds. + Weight::from_parts(33_376_511, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_111 - .saturating_add(Weight::from_parts(136_150, 0).saturating_mul(s.into())) + // Standard Error: 461 + .saturating_add(Weight::from_parts(85_012, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 14_325_000 picoseconds. - Weight::from_parts(14_692_008, 0) + // Minimum execution time: 17_870_000 picoseconds. + Weight::from_parts(18_763_252, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 864 - .saturating_add(Weight::from_parts(115_902, 0).saturating_mul(s.into())) + // Standard Error: 394 + .saturating_add(Weight::from_parts(79_897, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 26_955_000 picoseconds. - Weight::from_parts(27_847_198, 0) + // Minimum execution time: 32_441_000 picoseconds. + Weight::from_parts(33_910_925, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 717 - .saturating_add(Weight::from_parts(121_272, 0).saturating_mul(s.into())) + // Standard Error: 492 + .saturating_add(Weight::from_parts(82_020, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs index 1e7c16dbca..150fe9e156 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -53,11 +54,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 12_090_000 picoseconds. - Weight::from_parts(12_759_632, 0) + // Minimum execution time: 15_340_000 picoseconds. + Weight::from_parts(15_874_275, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 874 - .saturating_add(Weight::from_parts(34_366, 0).saturating_mul(p.into())) + // Standard Error: 877 + .saturating_add(Weight::from_parts(37_948, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -72,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: 30_913_000 picoseconds. - Weight::from_parts(30_833_144, 0) + // Minimum execution time: 39_530_000 picoseconds. + Weight::from_parts(39_073_941, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_064 - .saturating_add(Weight::from_parts(139_309, 0).saturating_mul(a.into())) - // Standard Error: 2_132 - .saturating_add(Weight::from_parts(31_751, 0).saturating_mul(p.into())) + // Standard Error: 1_330 + .saturating_add(Weight::from_parts(163_450, 0).saturating_mul(a.into())) + // Standard Error: 1_374 + .saturating_add(Weight::from_parts(42_060, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -92,13 +93,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 20_803_000 picoseconds. - Weight::from_parts(21_822_858, 0) + // Minimum execution time: 27_361_000 picoseconds. + Weight::from_parts(27_728_711, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_437 - .saturating_add(Weight::from_parts(131_055, 0).saturating_mul(a.into())) - // Standard Error: 1_485 - .saturating_add(Weight::from_parts(3_188, 0).saturating_mul(p.into())) + // Standard Error: 1_202 + .saturating_add(Weight::from_parts(146_859, 0).saturating_mul(a.into())) + // Standard Error: 1_242 + .saturating_add(Weight::from_parts(5_567, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -112,13 +113,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 20_808_000 picoseconds. - Weight::from_parts(21_711_730, 0) + // Minimum execution time: 27_260_000 picoseconds. + Weight::from_parts(27_737_455, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_453 - .saturating_add(Weight::from_parts(131_939, 0).saturating_mul(a.into())) - // Standard Error: 1_502 - .saturating_add(Weight::from_parts(8_858, 0).saturating_mul(p.into())) + // Standard Error: 1_223 + .saturating_add(Weight::from_parts(152_445, 0).saturating_mul(a.into())) + // Standard Error: 1_264 + .saturating_add(Weight::from_parts(5_886, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -134,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: 28_183_000 picoseconds. - Weight::from_parts(27_949_286, 0) + // Minimum execution time: 35_440_000 picoseconds. + Weight::from_parts(35_392_709, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_397 - .saturating_add(Weight::from_parts(141_388, 0).saturating_mul(a.into())) - // Standard Error: 1_443 - .saturating_add(Weight::from_parts(38_763, 0).saturating_mul(p.into())) + // Standard Error: 1_288 + .saturating_add(Weight::from_parts(160_695, 0).saturating_mul(a.into())) + // Standard Error: 1_331 + .saturating_add(Weight::from_parts(36_057, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -151,11 +152,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_865_000 picoseconds. - Weight::from_parts(20_547_678, 0) + // Minimum execution time: 25_420_000 picoseconds. + Weight::from_parts(25_913_951, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 982 - .saturating_add(Weight::from_parts(45_569, 0).saturating_mul(p.into())) + // Standard Error: 747 + .saturating_add(Weight::from_parts(44_641, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -166,11 +167,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_901_000 picoseconds. - Weight::from_parts(20_808_159, 0) + // Minimum execution time: 25_460_000 picoseconds. + Weight::from_parts(26_029_154, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_686 - .saturating_add(Weight::from_parts(40_503, 0).saturating_mul(p.into())) + // Standard Error: 849 + .saturating_add(Weight::from_parts(57_409, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -181,11 +182,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_056_000 picoseconds. - Weight::from_parts(19_932_678, 0) + // Minimum execution time: 23_240_000 picoseconds. + Weight::from_parts(23_749_249, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_801 - .saturating_add(Weight::from_parts(34_654, 0).saturating_mul(p.into())) + // Standard Error: 766 + .saturating_add(Weight::from_parts(30_295, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -196,11 +197,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 20_958_000 picoseconds. - Weight::from_parts(21_828_584, 0) + // Minimum execution time: 27_020_000 picoseconds. + Weight::from_parts(27_630_311, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_384 - .saturating_add(Weight::from_parts(13_974, 0).saturating_mul(p.into())) + // Standard Error: 682 + .saturating_add(Weight::from_parts(12_438, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -211,11 +212,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_908_000 picoseconds. - Weight::from_parts(20_744_428, 0) + // Minimum execution time: 23_970_000 picoseconds. + Weight::from_parts(24_804_785, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_445 - .saturating_add(Weight::from_parts(42_286, 0).saturating_mul(p.into())) + // Standard Error: 952 + .saturating_add(Weight::from_parts(34_603, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs index ac4db9bad5..db0c1c4f5d 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3763` - // Minimum execution time: 15_800_000 picoseconds. - Weight::from_parts(16_340_000, 0) + // Minimum execution time: 19_421_000 picoseconds. + Weight::from_parts(20_190_000, 0) .saturating_add(Weight::from_parts(0, 3763)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -68,8 +69,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3745` - // Minimum execution time: 11_597_000 picoseconds. - Weight::from_parts(11_925_000, 0) + // Minimum execution time: 14_220_000 picoseconds. + Weight::from_parts(14_740_000, 0) .saturating_add(Weight::from_parts(0, 3745)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs index 5b760d39f7..453cedccc8 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `49` // Estimated: `1493` - // Minimum execution time: 5_335_000 picoseconds. - Weight::from_parts(5_604_000, 0) + // Minimum execution time: 6_900_000 picoseconds. + Weight::from_parts(7_130_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 2_726_000 picoseconds. - Weight::from_parts(2_831_000, 0) + // Minimum execution time: 3_740_000 picoseconds. + Weight::from_parts(3_870_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs index 02a8856791..38df0a55f1 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -51,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_830_000 picoseconds. - Weight::from_parts(5_662_849, 0) + // Minimum execution time: 4_910_000 picoseconds. + Weight::from_parts(9_847_776, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_441 - .saturating_add(Weight::from_parts(2_607_418, 0).saturating_mul(c.into())) + // Standard Error: 585 + .saturating_add(Weight::from_parts(3_239_886, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_631_000 picoseconds. - Weight::from_parts(3_861_000, 0) + // Minimum execution time: 4_650_000 picoseconds. + Weight::from_parts(4_870_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -70,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_714_000 picoseconds. - Weight::from_parts(4_016_000, 0) + // Minimum execution time: 4_860_000 picoseconds. + Weight::from_parts(9_578_327, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_743 - .saturating_add(Weight::from_parts(2_804_652, 0).saturating_mul(c.into())) + // Standard Error: 823 + .saturating_add(Weight::from_parts(3_498_446, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_662_000 picoseconds. - Weight::from_parts(5_833_000, 0) + // Minimum execution time: 6_940_000 picoseconds. + Weight::from_parts(7_120_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -89,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_835_000 picoseconds. - Weight::from_parts(15_718_717, 0) + // Minimum execution time: 4_780_000 picoseconds. + Weight::from_parts(7_643_668, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_786 - .saturating_add(Weight::from_parts(2_601_313, 0).saturating_mul(c.into())) + // Standard Error: 501 + .saturating_add(Weight::from_parts(3_246_822, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs index df13f6cc66..89348af0c4 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -62,8 +63,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 19_269_000 picoseconds. - Weight::from_parts(19_923_000, 0) + // Minimum execution time: 24_371_000 picoseconds. + Weight::from_parts(24_741_000, 0) .saturating_add(Weight::from_parts(0, 3539)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) @@ -88,8 +89,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `158` // Estimated: `3623` - // Minimum execution time: 93_428_000 picoseconds. - Weight::from_parts(95_965_000, 0) + // Minimum execution time: 115_921_000 picoseconds. + Weight::from_parts(117_400_000, 0) .saturating_add(Weight::from_parts(0, 3623)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) @@ -114,14 +115,12 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `Benchmark::Override` (r:0 w:0) - /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> 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) + // Minimum execution time: 10_790_000 picoseconds. + Weight::from_parts(11_100_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) @@ -130,8 +129,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_724_000 picoseconds. - Weight::from_parts(5_984_000, 0) + // Minimum execution time: 7_480_000 picoseconds. + Weight::from_parts(7_710_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -141,8 +140,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_884_000 picoseconds. - Weight::from_parts(1_987_000, 0) + // Minimum execution time: 2_560_000 picoseconds. + Weight::from_parts(2_670_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -168,8 +167,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 24_843_000 picoseconds. - Weight::from_parts(25_690_000, 0) + // Minimum execution time: 30_961_000 picoseconds. + Weight::from_parts(31_430_000, 0) .saturating_add(Weight::from_parts(0, 3539)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -194,8 +193,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `292` // Estimated: `3757` - // Minimum execution time: 27_801_000 picoseconds. - Weight::from_parts(28_480_000, 0) + // Minimum execution time: 34_720_000 picoseconds. + Weight::from_parts(35_640_000, 0) .saturating_add(Weight::from_parts(0, 3757)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -206,8 +205,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_833_000 picoseconds. - Weight::from_parts(1_941_000, 0) + // Minimum execution time: 2_520_000 picoseconds. + Weight::from_parts(2_660_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -217,8 +216,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89` // Estimated: `13454` - // Minimum execution time: 16_236_000 picoseconds. - Weight::from_parts(16_915_000, 0) + // Minimum execution time: 21_330_000 picoseconds. + Weight::from_parts(21_710_000, 0) .saturating_add(Weight::from_parts(0, 13454)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -229,8 +228,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `93` // Estimated: `13458` - // Minimum execution time: 16_325_000 picoseconds. - Weight::from_parts(16_807_000, 0) + // Minimum execution time: 21_260_000 picoseconds. + Weight::from_parts(21_631_000, 0) .saturating_add(Weight::from_parts(0, 13458)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -241,8 +240,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `15946` - // Minimum execution time: 17_677_000 picoseconds. - Weight::from_parts(18_233_000, 0) + // Minimum execution time: 23_770_000 picoseconds. + Weight::from_parts(24_160_000, 0) .saturating_add(Weight::from_parts(0, 15946)) .saturating_add(T::DbWeight::get().reads(6)) } @@ -264,8 +263,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `6082` - // Minimum execution time: 24_773_000 picoseconds. - Weight::from_parts(25_420_000, 0) + // Minimum execution time: 30_860_000 picoseconds. + Weight::from_parts(31_591_000, 0) .saturating_add(Weight::from_parts(0, 6082)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) @@ -276,8 +275,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `11026` - // Minimum execution time: 10_592_000 picoseconds. - Weight::from_parts(10_812_000, 0) + // Minimum execution time: 13_890_000 picoseconds. + Weight::from_parts(14_030_000, 0) .saturating_add(Weight::from_parts(0, 11026)) .saturating_add(T::DbWeight::get().reads(4)) } @@ -287,8 +286,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `13465` - // Minimum execution time: 16_656_000 picoseconds. - Weight::from_parts(16_938_000, 0) + // Minimum execution time: 21_701_000 picoseconds. + Weight::from_parts(22_030_000, 0) .saturating_add(Weight::from_parts(0, 13465)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -311,8 +310,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `13507` - // Minimum execution time: 32_817_000 picoseconds. - Weight::from_parts(33_504_000, 0) + // Minimum execution time: 41_040_000 picoseconds. + Weight::from_parts(41_690_000, 0) .saturating_add(Weight::from_parts(0, 13507)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(4)) @@ -325,8 +324,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `1517` - // Minimum execution time: 3_400_000 picoseconds. - Weight::from_parts(3_523_000, 0) + // Minimum execution time: 4_560_000 picoseconds. + Weight::from_parts(4_680_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -337,8 +336,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `7669` // Estimated: `11134` - // Minimum execution time: 23_736_000 picoseconds. - Weight::from_parts(24_121_000, 0) + // Minimum execution time: 32_320_000 picoseconds. + Weight::from_parts(32_740_000, 0) .saturating_add(Weight::from_parts(0, 11134)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -349,8 +348,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `3555` - // Minimum execution time: 33_797_000 picoseconds. - Weight::from_parts(34_575_000, 0) + // Minimum execution time: 43_440_000 picoseconds. + Weight::from_parts(44_020_000, 0) .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index f53808f500..5dea4696fd 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 27_392_000 picoseconds. - Weight::from_parts(27_815_000, 0) + // Minimum execution time: 35_310_000 picoseconds. + Weight::from_parts(35_821_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 36_728_000 picoseconds. - Weight::from_parts(37_540_000, 0) + // Minimum execution time: 47_110_000 picoseconds. + Weight::from_parts(47_550_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -90,8 +91,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `311` // Estimated: `8799` - // Minimum execution time: 91_095_000 picoseconds. - Weight::from_parts(92_337_000, 0) + // Minimum execution time: 113_611_000 picoseconds. + Weight::from_parts(115_171_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) @@ -126,8 +127,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 62_189_000 picoseconds. - Weight::from_parts(63_363_000, 0) + // Minimum execution time: 78_640_000 picoseconds. + Weight::from_parts(79_510_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -136,8 +137,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_638_000 picoseconds. - Weight::from_parts(2_773_000, 0) + // Minimum execution time: 6_350_000 picoseconds. + Weight::from_parts(6_491_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:1 w:1) @@ -146,8 +147,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 20_664_000 picoseconds. - Weight::from_parts(21_274_000, 0) + // Minimum execution time: 27_190_000 picoseconds. + Weight::from_parts(27_881_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +173,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `210` // Estimated: `6196` - // Minimum execution time: 68_828_000 picoseconds. - Weight::from_parts(70_142_000, 0) + // Minimum execution time: 85_271_000 picoseconds. + Weight::from_parts(86_631_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -198,8 +199,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `158` // Estimated: `3623` - // Minimum execution time: 40_968_000 picoseconds. - Weight::from_parts(42_250_000, 0) + // Minimum execution time: 51_800_000 picoseconds. + Weight::from_parts(52_580_000, 0) .saturating_add(Weight::from_parts(0, 3623)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 4ab9b07693..72c2bbf87a 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -66,8 +67,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 60_215_000 picoseconds. - Weight::from_parts(61_465_000, 0) + // Minimum execution time: 76_400_000 picoseconds. + Weight::from_parts(77_570_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -76,8 +77,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_241_000 picoseconds. - Weight::from_parts(1_334_000, 0) + // Minimum execution time: 4_570_000 picoseconds. + Weight::from_parts(4_690_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) @@ -86,8 +87,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `3497` - // Minimum execution time: 6_322_000 picoseconds. - Weight::from_parts(6_545_000, 0) + // Minimum execution time: 10_701_000 picoseconds. + Weight::from_parts(11_010_000, 0) .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -95,56 +96,56 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_527_000 picoseconds. - Weight::from_parts(6_702_000, 0) + // Minimum execution time: 10_500_000 picoseconds. + Weight::from_parts(10_750_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: 1_886_000 picoseconds. - Weight::from_parts(1_983_000, 0) + // Minimum execution time: 5_430_000 picoseconds. + Weight::from_parts(5_580_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: 1_275_000 picoseconds. - Weight::from_parts(1_353_000, 0) + // Minimum execution time: 4_510_000 picoseconds. + Weight::from_parts(4_610_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: 1_255_000 picoseconds. - Weight::from_parts(1_313_000, 0) + // Minimum execution time: 4_470_000 picoseconds. + Weight::from_parts(4_600_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: 1_241_000 picoseconds. - Weight::from_parts(1_313_000, 0) + // Minimum execution time: 4_480_000 picoseconds. + Weight::from_parts(4_590_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: 1_348_000 picoseconds. - Weight::from_parts(1_413_000, 0) + // Minimum execution time: 4_540_000 picoseconds. + Weight::from_parts(4_680_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: 1_241_000 picoseconds. - Weight::from_parts(1_292_000, 0) + // Minimum execution time: 4_490_000 picoseconds. + Weight::from_parts(4_580_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -167,8 +168,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 57_503_000 picoseconds. - Weight::from_parts(59_111_000, 0) + // Minimum execution time: 72_870_000 picoseconds. + Weight::from_parts(73_421_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -179,8 +180,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `3555` - // Minimum execution time: 9_109_000 picoseconds. - Weight::from_parts(9_513_000, 0) + // Minimum execution time: 14_140_000 picoseconds. + Weight::from_parts(14_430_000, 0) .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -189,8 +190,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_174_000 picoseconds. - Weight::from_parts(1_232_000, 0) + // Minimum execution time: 4_410_000 picoseconds. + Weight::from_parts(4_560_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) @@ -211,8 +212,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 20_806_000 picoseconds. - Weight::from_parts(21_213_000, 0) + // Minimum execution time: 27_540_000 picoseconds. + Weight::from_parts(28_050_000, 0) .saturating_add(Weight::from_parts(0, 3539)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -223,8 +224,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_056_000 picoseconds. - Weight::from_parts(3_145_000, 0) + // Minimum execution time: 6_830_000 picoseconds. + Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -232,40 +233,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_653_000 picoseconds. - Weight::from_parts(1_709_000, 0) + // Minimum execution time: 5_010_000 picoseconds. + Weight::from_parts(5_150_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: 1_317_000 picoseconds. - Weight::from_parts(1_423_000, 0) + // Minimum execution time: 4_620_000 picoseconds. + Weight::from_parts(4_750_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: 1_204_000 picoseconds. - Weight::from_parts(1_266_000, 0) + // Minimum execution time: 4_450_000 picoseconds. + Weight::from_parts(4_540_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: 1_173_000 picoseconds. - Weight::from_parts(1_275_000, 0) + // Minimum execution time: 4_380_000 picoseconds. + Weight::from_parts(4_510_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: 1_416_000 picoseconds. - Weight::from_parts(1_477_000, 0) + // Minimum execution time: 4_650_000 picoseconds. + Weight::from_parts(4_790_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -288,8 +289,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 61_650_000 picoseconds. - Weight::from_parts(63_101_000, 0) + // Minimum execution time: 76_560_000 picoseconds. + Weight::from_parts(77_420_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -298,8 +299,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_526_000 picoseconds. - Weight::from_parts(3_678_000, 0) + // Minimum execution time: 7_500_000 picoseconds. + Weight::from_parts(7_660_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -322,8 +323,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 58_391_000 picoseconds. - Weight::from_parts(59_568_000, 0) + // Minimum execution time: 72_671_000 picoseconds. + Weight::from_parts(73_241_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -332,40 +333,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_279_000 picoseconds. - Weight::from_parts(1_347_000, 0) + // Minimum execution time: 4_500_000 picoseconds. + Weight::from_parts(4_670_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: 1_240_000 picoseconds. - Weight::from_parts(1_283_000, 0) + // Minimum execution time: 4_400_000 picoseconds. + Weight::from_parts(4_550_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: 1_225_000 picoseconds. - Weight::from_parts(1_323_000, 0) + // Minimum execution time: 4_480_000 picoseconds. + Weight::from_parts(4_590_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: 1_260_000 picoseconds. - Weight::from_parts(1_360_000, 0) + // Minimum execution time: 4_460_000 picoseconds. + Weight::from_parts(4_560_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: 1_158_000 picoseconds. - Weight::from_parts(1_208_000, 0) + // Minimum execution time: 4_360_000 picoseconds. + Weight::from_parts(4_560_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } From 0185f7c1740a3b6edb7f8dbb6be541cfcb26ace6 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:54:09 +0200 Subject: [PATCH 14/20] Trigger Release v1.2.5 (#342) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trigger https://github.com/polkadot-fellows/runtimes/issues/316 `transaction_version` is bumped due to changed `SignedExtra`. Do not merge until the Broker patch is included (cc @eskimor @seadanda). - [x] Does not require a CHANGELOG entry --------- Co-authored-by: Bastian Köcher --- 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/coretime/coretime-kusama/src/lib.rs | 4 ++-- system-parachains/encointer/src/lib.rs | 4 ++-- system-parachains/gluttons/glutton-kusama/src/lib.rs | 2 +- system-parachains/people/people-kusama/src/lib.rs | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f28192ba3a..e1889ecc51 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.2.5] 06.06.2024 ### Added diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 5be00a0bf6..05724aee55 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -162,10 +162,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_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 25, + transaction_version: 26, state_version: 1, }; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index c065949f26..b319487250 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -150,10 +150,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_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 25, + transaction_version: 26, state_version: 1, }; 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 4bc4b9aaee..fff90be3ff 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -112,10 +112,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 14, + transaction_version: 15, state_version: 1, }; @@ -128,10 +128,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 14, + transaction_version: 15, 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 2cff59756f..f52b4c6ea2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -146,10 +146,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 14, + transaction_version: 15, 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 117e374607..a12f23e4b3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -166,10 +166,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_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 4, + transaction_version: 5, 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 04a884e974..6c82529b91 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -179,10 +179,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_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 3, + transaction_version: 4, state_version: 1, }; diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 4c422d5afb..d9fcdf62aa 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -115,10 +115,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 6, + transaction_version: 7, state_version: 0, }; diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index bb886797ab..2f0754ce62 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -134,10 +134,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("coretime-kusama"), impl_name: create_runtime_str!("coretime-kusama"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 0, + transaction_version: 1, state_version: 1, }; diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 8101871369..68389d8430 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -125,10 +125,10 @@ 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_002_004, + spec_version: 1_002_005, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 3, + transaction_version: 4, state_version: 0, }; diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 5baa7ec3ad..0431a2e0ce 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -89,7 +89,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("glutton"), impl_name: create_runtime_str!("glutton"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index 1390eee319..caf6e36a2c 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -129,10 +129,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("people-kusama"), impl_name: create_runtime_str!("people-kusama"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 0, + transaction_version: 1, state_version: 1, }; From 5084967a2fc34a2cd6442367fec628ced68c7757 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Tue, 11 Jun 2024 17:33:10 +0200 Subject: [PATCH 15/20] Remove Identity from Kusama Relay (#315) As a follow up to the migration to a People Chain, we can remove everything Identity-related from the Relay Chain. --------- Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Adrian Catangiu Co-authored-by: Liam Aharon --- CHANGELOG.md | 6 + Cargo.lock | 1 - .../people/people-kusama/src/lib.rs | 1 - .../emulated/chains/relays/kusama/src/lib.rs | 2 - .../people/people-kusama/src/tests/mod.rs | 1 - .../people-kusama/src/tests/reap_identity.rs | 550 ------------------ relay/kusama/Cargo.toml | 4 - relay/kusama/src/impls.rs | 160 +---- relay/kusama/src/lib.rs | 319 +++++++--- relay/kusama/src/weights/mod.rs | 2 - relay/kusama/src/weights/pallet_identity.rs | 434 -------------- ...lkadot_runtime_common_identity_migrator.rs | 99 ---- .../people/people-kusama/src/lib.rs | 23 +- .../people/people-kusama/src/weights/mod.rs | 1 - ...lkadot_runtime_common_identity_migrator.rs | 90 --- 15 files changed, 256 insertions(+), 1437 deletions(-) delete mode 100644 integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs delete mode 100644 relay/kusama/src/weights/pallet_identity.rs delete mode 100644 relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs delete mode 100644 system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index e1889ecc51..f1cf9fe3ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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] + +### Removed + +- Removed Identity-related code from Kusama Relay Chain ([polkadot-fellows/runtimes#315](https://github.com/polkadot-fellows/runtimes/pull/315)) + ## [1.2.5] 06.06.2024 ### Added diff --git a/Cargo.lock b/Cargo.lock index 3873911e94..dae3c3fcc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15981,7 +15981,6 @@ dependencies = [ "pallet-election-provider-support-benchmarking", "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity", "pallet-indices", "pallet-message-queue", "pallet-mmr", diff --git a/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs index 09e5168ee7..c070d43ce0 100644 --- a/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs @@ -42,7 +42,6 @@ decl_test_parachains! { PolkadotXcm: people_kusama_runtime::PolkadotXcm, Balances: people_kusama_runtime::Balances, Identity: people_kusama_runtime::Identity, - IdentityMigrator: people_kusama_runtime::IdentityMigrator, } }, } diff --git a/integration-tests/emulated/chains/relays/kusama/src/lib.rs b/integration-tests/emulated/chains/relays/kusama/src/lib.rs index 2ac67cdc25..98ab2db269 100644 --- a/integration-tests/emulated/chains/relays/kusama/src/lib.rs +++ b/integration-tests/emulated/chains/relays/kusama/src/lib.rs @@ -36,8 +36,6 @@ decl_test_relay_chains! { XcmPallet: kusama_runtime::XcmPallet, Balances: kusama_runtime::Balances, Hrmp: kusama_runtime::Hrmp, - Identity: kusama_runtime::Identity, - IdentityMigrator: kusama_runtime::IdentityMigrator, Treasury: kusama_runtime::Treasury, AssetRate: kusama_runtime::AssetRate, } diff --git a/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs index 80c00021ca..516ec37cc1 100644 --- a/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs @@ -13,5 +13,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -mod reap_identity; mod teleport; diff --git a/integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs b/integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs deleted file mode 100644 index 3a55b3e354..0000000000 --- a/integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs +++ /dev/null @@ -1,550 +0,0 @@ -// 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. - -//! # OnReapIdentity Tests -//! -//! This file contains the test cases for migrating Identity data away from the Kusama Relay -//! chain and to the Kusama People parachain. This migration is part of the broader Minimal Relay -//! effort: -//! https://github.com/polkadot-fellows/RFCs/blob/main/text/0032-minimal-relay.md -//! -//! ## Overview -//! -//! The tests validate the robustness and correctness of the `OnReapIdentityHandler` -//! ensuring that it behaves as expected in various scenarios. Key aspects tested include: -//! -//! - **Deposit Handling**: Confirming that deposits are correctly migrated from the Relay Chain to -//! the People parachain in various scenarios (different `IdentityInfo` fields and different -//! numbers of sub-accounts). -//! -//! ### Test Scenarios -//! -//! The tests are categorized into several scenarios, each resulting in different deposits required -//! on the destination parachain. The tests ensure: -//! -//! - Reserved deposits on the Relay Chain are fully released; -//! - The freed deposit from the Relay Chain is sufficient for the parachain deposit; and -//! - The account will exist on the parachain. - -use crate::*; -use frame_support::BoundedVec; -use kusama_runtime::{ - BasicDeposit, ByteDeposit, MaxAdditionalFields, MaxSubAccounts, RuntimeOrigin as KusamaOrigin, - SubAccountDeposit, -}; -use kusama_runtime_constants::currency::*; -use kusama_system_emulated_network::{ - kusama_emulated_chain::KusamaRelayPallet, KusamaRelay, KusamaRelaySender, -}; -use pallet_balances::Event as BalancesEvent; -use pallet_identity::{legacy::IdentityInfo, Data, Event as IdentityEvent}; -use people_kusama_runtime::people::{ - BasicDeposit as BasicDepositParachain, ByteDeposit as ByteDepositParachain, - IdentityInfo as IdentityInfoParachain, SubAccountDeposit as SubAccountDepositParachain, -}; - -type Balance = u128; -type KusamaIdentity = ::Identity; -type KusamaBalances = ::Balances; -type KusamaIdentityMigrator = ::IdentityMigrator; -type PeopleKusamaIdentity = ::Identity; -type PeopleKusamaBalances = ::Balances; - -#[derive(Clone, Debug)] -struct Identity { - relay: IdentityInfo, - para: IdentityInfoParachain, - subs: Subs, -} - -impl Identity { - fn new( - full: bool, - additional: Option>, - subs: Subs, - ) -> Self { - let pgp_fingerprint = [ - 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, - 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, - ]; - let make_data = |data: &[u8], full: bool| -> Data { - if full { - Data::Raw(data.to_vec().try_into().unwrap()) - } else { - Data::None - } - }; - let (github, discord) = additional - .as_ref() - .and_then(|vec| vec.first()) - .map(|(g, d)| (g.clone(), d.clone())) - .unwrap_or((Data::None, Data::None)); - Self { - relay: IdentityInfo { - display: make_data(b"xcm-test", full), - legal: make_data(b"The Xcm Test, Esq.", full), - web: make_data(b"https://visitme/", full), - riot: make_data(b"xcm-riot", full), - email: make_data(b"xcm-test@gmail.com", full), - pgp_fingerprint: Some(pgp_fingerprint), - image: make_data(b"xcm-test.png", full), - twitter: make_data(b"@xcm-test", full), - additional: additional.unwrap_or_default(), - }, - para: IdentityInfoParachain { - display: make_data(b"xcm-test", full), - legal: make_data(b"The Xcm Test, Esq.", full), - web: make_data(b"https://visitme/", full), - matrix: make_data(b"xcm-matrix@server", full), - email: make_data(b"xcm-test@gmail.com", full), - pgp_fingerprint: Some(pgp_fingerprint), - image: make_data(b"xcm-test.png", full), - twitter: make_data(b"@xcm-test", full), - github, - discord, - }, - subs, - } - } -} - -#[derive(Clone, Debug)] -enum Subs { - Zero, - Many(u32), -} - -enum IdentityOn<'a> { - Relay(&'a IdentityInfo), - Para(&'a IdentityInfoParachain), -} - -impl IdentityOn<'_> { - fn calculate_deposit(self) -> Balance { - match self { - IdentityOn::Relay(id) => { - let base_deposit = BasicDeposit::get(); - let byte_deposit = - ByteDeposit::get() * TryInto::::try_into(id.encoded_size()).unwrap(); - base_deposit + byte_deposit - }, - IdentityOn::Para(id) => { - let base_deposit = BasicDepositParachain::get(); - let byte_deposit = ByteDepositParachain::get() * - TryInto::::try_into(id.encoded_size()).unwrap(); - base_deposit + byte_deposit - }, - } - } -} - -/// Generate an `AccountId32` from a `u32`. -/// This creates a 32-byte array, initially filled with `255`, and then repeatedly fills it -/// with the 4-byte little-endian representation of the `u32` value, until the array is full. -/// -/// **Example**: -/// -/// `account_from_u32(5)` will return an `AccountId32` with the bytes -/// `[0, 5, 0, 0, 0, 0, 0, 0, 0, 5 ... ]` -fn account_from_u32(id: u32) -> AccountId32 { - let mut buffer = [255u8; 32]; - let id_bytes = id.to_le_bytes(); - let id_size = id_bytes.len(); - for chunk in buffer.chunks_mut(id_size) { - chunk.clone_from_slice(&id_bytes); - } - AccountId32::new(buffer) -} - -// Set up the Relay Chain with an identity. -fn set_id_relay(id: &Identity) -> Balance { - let mut total_deposit: Balance = 0; - - // Set identity and Subs on Relay Chain - KusamaRelay::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - assert_ok!(KusamaIdentity::set_identity( - KusamaOrigin::signed(KusamaRelaySender::get()), - Box::new(id.relay.clone()) - )); - - if let Subs::Many(n) = id.subs { - let subs: Vec<_> = (0..n) - .map(|i| (account_from_u32(i), Data::Raw(b"name".to_vec().try_into().unwrap()))) - .collect(); - - assert_ok!(KusamaIdentity::set_subs( - KusamaOrigin::signed(KusamaRelaySender::get()), - subs, - )); - } - - let reserved_balance = KusamaBalances::reserved_balance(KusamaRelaySender::get()); - let id_deposit = IdentityOn::Relay(&id.relay).calculate_deposit(); - - let total_deposit = match id.subs { - Subs::Zero => { - total_deposit = id_deposit; // No subs - assert_expected_events!( - KusamaRelay, - vec![ - RuntimeEvent::Identity(IdentityEvent::IdentitySet { .. }) => {}, - RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), - amount: *amount == id_deposit, - }, - ] - ); - total_deposit - }, - Subs::Many(n) => { - let sub_account_deposit = n as Balance * SubAccountDeposit::get(); - total_deposit = - sub_account_deposit + IdentityOn::Relay(&id.relay).calculate_deposit(); - assert_expected_events!( - KusamaRelay, - vec![ - RuntimeEvent::Identity(IdentityEvent::IdentitySet { .. }) => {}, - RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), - amount: *amount == id_deposit, - }, - RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), - amount: *amount == sub_account_deposit, - }, - ] - ); - total_deposit - }, - }; - - assert_eq!(reserved_balance, total_deposit); - }); - total_deposit -} - -// Set up the parachain with an identity and (maybe) sub accounts, but with zero deposits. -fn assert_set_id_parachain(id: &Identity) { - // Set identity and Subs on Parachain with zero deposit - PeopleKusama::execute_with(|| { - let free_bal = PeopleKusamaBalances::free_balance(PeopleKusamaSender::get()); - let reserved_balance = PeopleKusamaBalances::reserved_balance(PeopleKusamaSender::get()); - - // total balance at Genesis should be zero - assert_eq!(reserved_balance + free_bal, 0); - - assert_ok!(PeopleKusamaIdentity::set_identity_no_deposit( - &PeopleKusamaSender::get(), - id.para.clone(), - )); - - match id.subs { - Subs::Zero => {}, - Subs::Many(n) => { - let subs: Vec<_> = (0..n) - .map(|ii| { - (account_from_u32(ii), Data::Raw(b"name".to_vec().try_into().unwrap())) - }) - .collect(); - assert_ok!(PeopleKusamaIdentity::set_subs_no_deposit( - &PeopleKusamaSender::get(), - subs, - )); - }, - } - - // No amount should be reserved as deposit amounts are set to 0. - let reserved_balance = PeopleKusamaBalances::reserved_balance(PeopleKusamaSender::get()); - assert_eq!(reserved_balance, 0); - assert!(PeopleKusamaIdentity::identity(PeopleKusamaSender::get()).is_some()); - - let (_, sub_accounts) = PeopleKusamaIdentity::subs_of(PeopleKusamaSender::get()); - - match id.subs { - Subs::Zero => assert_eq!(sub_accounts.len(), 0), - Subs::Many(n) => assert_eq!(sub_accounts.len(), n as usize), - } - }); -} - -// Reap the identity on the Relay Chain and assert that the correct things happen there. -fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { - KusamaRelay::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - let free_bal_before_reap = KusamaBalances::free_balance(KusamaRelaySender::get()); - let reserved_balance = KusamaBalances::reserved_balance(KusamaRelaySender::get()); - - assert_eq!(reserved_balance, total_deposit); - - assert_ok!(KusamaIdentityMigrator::reap_identity( - // Note: Root for launch testing, Signed once we open migrations. - KusamaOrigin::signed(KusamaRelaySender::get()), - KusamaRelaySender::get() - )); - - let remote_deposit = match id.subs { - Subs::Zero => calculate_remote_deposit(id.relay.encoded_size() as u32, 0), - Subs::Many(n) => calculate_remote_deposit(id.relay.encoded_size() as u32, n), - }; - - assert_expected_events!( - KusamaRelay, - vec![ - // `reap_identity` sums the identity and subs deposits and unreserves them in one - // call. Therefore, we only expect one `Unreserved` event. - RuntimeEvent::Balances(BalancesEvent::Unreserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), - amount: *amount == total_deposit, - }, - RuntimeEvent::IdentityMigrator( - polkadot_runtime_common::identity_migrator::Event::IdentityReaped { - who, - }) => { - who: *who == PeopleKusamaSender::get(), - }, - ] - ); - // Identity should be gone. - assert!(PeopleKusamaIdentity::identity(KusamaRelaySender::get()).is_none()); - - // Subs should be gone. - let (_, sub_accounts) = KusamaIdentity::subs_of(KusamaRelaySender::get()); - assert_eq!(sub_accounts.len(), 0); - - let reserved_balance = KusamaBalances::reserved_balance(KusamaRelaySender::get()); - assert_eq!(reserved_balance, 0); - - // Free balance should be greater (i.e. the teleport should work even if 100% of an - // account's balance is reserved for Identity). - let free_bal_after_reap = KusamaBalances::free_balance(KusamaRelaySender::get()); - assert!(free_bal_after_reap > free_bal_before_reap); - - // Implicit: total_deposit > remote_deposit. As in, accounts should always have enough - // reserved for the parachain deposit. - assert_eq!(free_bal_after_reap, free_bal_before_reap + total_deposit - remote_deposit); - }); -} - -// Reaping the identity on the Relay Chain will have sent an XCM program to the parachain. Ensure -// that everything happens as expected. -fn assert_reap_parachain(id: &Identity) { - PeopleKusama::execute_with(|| { - let reserved_balance = PeopleKusamaBalances::reserved_balance(PeopleKusamaSender::get()); - let id_deposit = IdentityOn::Para(&id.para).calculate_deposit(); - let total_deposit = match id.subs { - Subs::Zero => id_deposit, - Subs::Many(n) => id_deposit + n as Balance * SubAccountDepositParachain::get(), - }; - assert_reap_events(id_deposit, id); - assert_eq!(reserved_balance, total_deposit); - - // Should have at least one ED after in free balance after the reap. - assert!(PeopleKusamaBalances::free_balance(PeopleKusamaSender::get()) >= PEOPLE_KUSAMA_ED); - }); -} - -// Assert the events that should happen on the parachain upon reaping an identity on the Relay -// Chain. -fn assert_reap_events(id_deposit: Balance, id: &Identity) { - type RuntimeEvent = ::RuntimeEvent; - match id.subs { - Subs::Zero => { - assert_expected_events!( - PeopleKusama, - vec![ - // Deposit and Endowed from teleport - RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {}, - RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {}, - // Amount reserved for identity info - RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == PeopleKusamaSender::get(), - amount: *amount == id_deposit, - }, - // Confirmation from Migrator with individual identity and subs deposits - RuntimeEvent::IdentityMigrator( - polkadot_runtime_common::identity_migrator::Event::DepositUpdated { - who, identity, subs - }) => { - who: *who == PeopleKusamaSender::get(), - identity: *identity == id_deposit, - subs: *subs == 0, - }, - RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { .. }) => {}, - ] - ); - }, - Subs::Many(n) => { - let subs_deposit = n as Balance * SubAccountDepositParachain::get(); - assert_expected_events!( - PeopleKusama, - vec![ - // Deposit and Endowed from teleport - RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {}, - RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {}, - // Amount reserved for identity info - RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == PeopleKusamaSender::get(), - amount: *amount == id_deposit, - }, - // Amount reserved for subs - RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == PeopleKusamaSender::get(), - amount: *amount == subs_deposit, - }, - // Confirmation from Migrator with individual identity and subs deposits - RuntimeEvent::IdentityMigrator( - polkadot_runtime_common::identity_migrator::Event::DepositUpdated { - who, identity, subs - }) => { - who: *who == PeopleKusamaSender::get(), - identity: *identity == id_deposit, - subs: *subs == subs_deposit, - }, - RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { .. }) => {}, - ] - ); - }, - }; -} - -/// Duplicate of the impl of `ToParachainIdentityReaper` in the Kusama runtime. -fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { - // Note: These `deposit` functions and `EXISTENTIAL_DEPOSIT` correspond to the Relay Chain's. - // Pulled in: use kusama_runtime_constants::currency::*; - let para_basic_deposit = deposit(1, 17) / 100; - let para_byte_deposit = deposit(0, 1) / 100; - let para_sub_account_deposit = deposit(1, 53) / 100; - let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10; - - // pallet deposits - let id_deposit = - para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance)); - let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance); - - id_deposit - .saturating_add(subs_deposit) - .saturating_add(para_existential_deposit.saturating_mul(2)) -} - -// Represent some `additional` data that would not be migrated to the parachain. The encoded size, -// and thus the byte deposit, should decrease. -fn nonsensical_additional() -> BoundedVec<(Data, Data), MaxAdditionalFields> { - BoundedVec::try_from(vec![( - Data::Raw(b"fOo".to_vec().try_into().unwrap()), - Data::Raw(b"baR".to_vec().try_into().unwrap()), - )]) - .unwrap() -} - -// Represent some `additional` data that will be migrated to the parachain as first-class fields. -fn meaningful_additional() -> BoundedVec<(Data, Data), MaxAdditionalFields> { - BoundedVec::try_from(vec![ - ( - Data::Raw(b"github".to_vec().try_into().unwrap()), - Data::Raw(b"niels-username".to_vec().try_into().unwrap()), - ), - ( - Data::Raw(b"discord".to_vec().try_into().unwrap()), - Data::Raw(b"bohr-username".to_vec().try_into().unwrap()), - ), - ]) - .unwrap() -} - -// Execute a single test case. -fn assert_relay_para_flow(id: &Identity) { - let total_deposit = set_id_relay(id); - assert_set_id_parachain(id); - assert_reap_id_relay(total_deposit, id); - assert_reap_parachain(id); -} - -// Tests with empty `IdentityInfo`. - -#[test] -fn on_reap_identity_works_for_minimal_identity_with_zero_subs() { - assert_relay_para_flow(&Identity::new(false, None, Subs::Zero)); -} - -#[test] -fn on_reap_identity_works_for_minimal_identity() { - assert_relay_para_flow(&Identity::new(false, None, Subs::Many(1))); -} - -#[test] -fn on_reap_identity_works_for_minimal_identity_with_max_subs() { - assert_relay_para_flow(&Identity::new(false, None, Subs::Many(MaxSubAccounts::get()))); -} - -// Tests with full `IdentityInfo`. - -#[test] -fn on_reap_identity_works_for_full_identity_no_additional_zero_subs() { - assert_relay_para_flow(&Identity::new(true, None, Subs::Zero)); -} - -#[test] -fn on_reap_identity_works_for_full_identity_no_additional() { - assert_relay_para_flow(&Identity::new(true, None, Subs::Many(1))); -} - -#[test] -fn on_reap_identity_works_for_full_identity_no_additional_max_subs() { - assert_relay_para_flow(&Identity::new(true, None, Subs::Many(MaxSubAccounts::get()))); -} - -// Tests with full `IdentityInfo` and `additional` fields that will _not_ be migrated. - -#[test] -fn on_reap_identity_works_for_full_identity_nonsense_additional_zero_subs() { - assert_relay_para_flow(&Identity::new(true, Some(nonsensical_additional()), Subs::Zero)); -} - -#[test] -fn on_reap_identity_works_for_full_identity_nonsense_additional() { - assert_relay_para_flow(&Identity::new(true, Some(nonsensical_additional()), Subs::Many(1))); -} - -#[test] -fn on_reap_identity_works_for_full_identity_nonsense_additional_max_subs() { - assert_relay_para_flow(&Identity::new( - true, - Some(nonsensical_additional()), - Subs::Many(MaxSubAccounts::get()), - )); -} - -// Tests with full `IdentityInfo` and `additional` fields that will be migrated. - -#[test] -fn on_reap_identity_works_for_full_identity_meaningful_additional_zero_subs() { - assert_relay_para_flow(&Identity::new(true, Some(meaningful_additional()), Subs::Zero)); -} - -#[test] -fn on_reap_identity_works_for_full_identity_meaningful_additional() { - assert_relay_para_flow(&Identity::new(true, Some(meaningful_additional()), Subs::Many(1))); -} - -#[test] -fn on_reap_identity_works_for_full_identity_meaningful_additional_max_subs() { - assert_relay_para_flow(&Identity::new( - true, - Some(meaningful_additional()), - Subs::Many(MaxSubAccounts::get()), - )); -} diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 9f4601f92e..b2df38038f 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -56,7 +56,6 @@ frame-executive = { workspace = true } frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } pallet-nis = { workspace = true } -pallet-identity = { workspace = true } pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-mmr = { workspace = true } @@ -152,7 +151,6 @@ std = [ "pallet-election-provider-support-benchmarking?/std", "pallet-fast-unstake/std", "pallet-grandpa/std", - "pallet-identity/std", "pallet-indices/std", "pallet-message-queue/std", "pallet-mmr/std", @@ -228,7 +226,6 @@ runtime-benchmarks = [ "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", @@ -283,7 +280,6 @@ try-runtime = [ "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", - "pallet-identity/try-runtime", "pallet-indices/try-runtime", "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", diff --git a/relay/kusama/src/impls.rs b/relay/kusama/src/impls.rs index 2dcdd7b63b..77e7ca941d 100644 --- a/relay/kusama/src/impls.rs +++ b/relay/kusama/src/impls.rs @@ -15,168 +15,10 @@ // along with Polkadot. If not, see . use super::*; -use codec::{Decode, Encode}; use core::marker::PhantomData; -use frame_support::{ - defensive, pallet_prelude::DispatchResult, traits::tokens::ConversionFromAssetBalance, -}; -use frame_system::RawOrigin; -use kusama_runtime_constants::system_parachain::PEOPLE_ID; +use frame_support::traits::tokens::ConversionFromAssetBalance; use polkadot_primitives::Id as ParaId; -use polkadot_runtime_common::identity_migrator::{OnReapIdentity, WeightInfo}; -use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::IsChildSystemParachain; -use xcm_executor::traits::TransactAsset; - -/// A type containing the encoding of the People Chain pallets in its runtime. Used to construct any -/// remote calls. The codec index must correspond to the index of `IdentityMigrator` in the -/// `construct_runtime` of the remote chain. -#[derive(Encode, Decode)] -enum PeopleRuntimePallets { - #[codec(index = 248)] - IdentityMigrator(IdentityMigratorCalls), -} - -/// Call encoding for the calls needed from the Identity Migrator pallet. -#[derive(Encode, Decode)] -enum IdentityMigratorCalls { - #[codec(index = 1)] - PokeDeposit(AccountId), -} - -/// Type that implements `OnReapIdentity` that will send the deposit needed to store the same -/// information on a parachain, sends the deposit there, and then updates it. -pub struct ToParachainIdentityReaper(PhantomData<(Runtime, AccountId)>); -impl ToParachainIdentityReaper { - /// Calculate the balance needed on the remote chain based on the `IdentityInfo` and `Subs` on - /// this chain. The total includes: - /// - /// - Identity basic deposit - /// - `IdentityInfo` byte deposit - /// - Sub accounts deposit - /// - 2x existential deposit (1 for account existence, 1 such that the user can transact) - fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { - // Remote deposit constants. Parachain uses `deposit / 100` - // Source: - // https://github.com/polkadot-fellows/runtimes/blob/55e97c5/system-parachains/constants/src/kusama.rs#L29 - // - // Parachain Deposit Configuration: - // - // pub const BasicDeposit: Balance = deposit(1, 17); - // pub const ByteDeposit: Balance = deposit(0, 1); - // pub const SubAccountDeposit: Balance = deposit(1, 53); - // pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10; - let para_basic_deposit = deposit(1, 17) / 100; - let para_byte_deposit = deposit(0, 1) / 100; - let para_sub_account_deposit = deposit(1, 53) / 100; - let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10; - - // pallet deposits - let id_deposit = - para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance)); - let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance); - - id_deposit - .saturating_add(subs_deposit) - .saturating_add(para_existential_deposit.saturating_mul(2)) - } -} - -// Note / Warning: This implementation should only be used in a transactional context. If not, then -// an error could result in assets being burned. -impl OnReapIdentity for ToParachainIdentityReaper -where - Runtime: frame_system::Config + pallet_xcm::Config, - AccountId: Into<[u8; 32]> + Clone + Encode, -{ - fn on_reap_identity(who: &AccountId, fields: u32, subs: u32) -> DispatchResult { - use crate::{ - impls::IdentityMigratorCalls::PokeDeposit, - weights::polkadot_runtime_common_identity_migrator::WeightInfo as MigratorWeights, - }; - - let total_to_send = Self::calculate_remote_deposit(fields, subs); - - // define asset / destination from relay perspective - let ksm = Asset { id: AssetId(Here.into_location()), fun: Fungible(total_to_send) }; - // People Chain - let destination: Location = Location::new(0, Parachain(PEOPLE_ID)); - - // Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support - // unpaid teleports. - - // withdraw the asset from `who` - let who_origin = - Junction::AccountId32 { network: None, id: who.clone().into() }.into_location(); - let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&ksm, &who_origin, None) - .map_err(|err| { - defensive!( - "runtime::on_reap_identity: withdraw_asset(what: {:?}, who_origin: {:?}) error: {:?}", - (&ksm, &who_origin, err) - ); - pallet_xcm::Error::::LowBalance - })?; - - // check out - xcm_config::LocalAssetTransactor::can_check_out( - &destination, - &ksm, - // not used in AssetTransactor - &XcmContext { origin: None, message_id: [0; 32], topic: None }, - ) - .map_err(|err| { - log::error!( - target: "runtime::on_reap_identity", - "can_check_out(destination: {:?}, asset: {:?}, _) error: {:?}", - destination, ksm, err - ); - pallet_xcm::Error::::CannotCheckOutTeleport - })?; - xcm_config::LocalAssetTransactor::check_out( - &destination, - &ksm, - // not used in AssetTransactor - &XcmContext { origin: None, message_id: [0; 32], topic: None }, - ); - - // reanchor - let ksm_reanchored: Assets = - vec![Asset { id: AssetId(Location::new(1, Here)), fun: Fungible(total_to_send) }] - .into(); - - let poke = PeopleRuntimePallets::::IdentityMigrator(PokeDeposit(who.clone())); - let remote_weight_limit = MigratorWeights::::poke_deposit().saturating_mul(2); - - // Actual program to execute on People Chain. - let program: Xcm<()> = Xcm(vec![ - // Unpaid as this is constructed by the system, once per user. The user shouldn't have - // their balance reduced by teleport fees for the favor of migrating. - UnpaidExecution { weight_limit: Unlimited, check_origin: None }, - // Receive the asset into holding. - ReceiveTeleportedAsset(ksm_reanchored), - // Deposit into the user's account. - DepositAsset { - assets: Wild(AllCounted(1)), - beneficiary: Junction::AccountId32 { network: None, id: who.clone().into() } - .into_location(), - }, - // Poke the deposit to reserve the appropriate amount on the parachain. - Transact { - origin_kind: OriginKind::Superuser, - require_weight_at_most: remote_weight_limit, - call: poke.encode().into(), - }, - ]); - - // send - >::send( - RawOrigin::Root.into(), - Box::new(VersionedLocation::V4(destination)), - Box::new(VersionedXcm::V4(program)), - )?; - Ok(()) - } -} // TODO: replace by types from polkadot-sdk https://github.com/paritytech/polkadot-sdk/pull/3659 /// Determines if the given `asset_kind` is a native asset. If it is, returns the balance without diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 05724aee55..2c81b5268c 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -33,7 +33,7 @@ use polkadot_primitives::{ PARACHAIN_KEY_TYPE_ID, }; use polkadot_runtime_common::{ - auctions, claims, crowdloan, identity_migrator, impl_runtime_weights, + auctions, claims, crowdloan, impl_runtime_weights, impls::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, @@ -76,16 +76,15 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, Everything, InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, PalletId, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_identity::legacy::IdentityInfo; use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, FungibleAdapter, RuntimeDispatchInfo}; use sp_core::{ConstU128, OpaqueMetadata, H256}; @@ -187,19 +186,8 @@ parameter_types! { pub const SS58Prefix: u8 = 2; } -/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, -/// locking the state of the pallet and preventing further updates to identities and sub-identities. -/// The locked state will be the genesis state of a new system chain and then removed from the Relay -/// Chain. -pub struct IsIdentityCall; -impl Contains for IsIdentityCall { - fn contains(c: &RuntimeCall) -> bool { - matches!(c, RuntimeCall::Identity(_)) - } -} - impl frame_system::Config for Runtime { - type BaseCallFilter = EverythingBut; + type BaseCallFilter = Everything; type BlockWeights = BlockWeights; type BlockLength = BlockLength; type RuntimeOrigin = RuntimeOrigin; @@ -970,44 +958,6 @@ impl claims::Config for Runtime { type WeightInfo = weights::polkadot_runtime_common_claims::WeightInfo; } -parameter_types! { - // Minimum 100 bytes/KSM deposited (1 CENT/byte) - pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - pub const ByteDeposit: Balance = deposit(0, 1); - pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; -} - -impl pallet_identity::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BasicDeposit = BasicDeposit; - type ByteDeposit = ByteDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type IdentityInformation = IdentityInfo; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EitherOf, GeneralAdmin>; - type RegistrarOrigin = EitherOf, GeneralAdmin>; - type OffchainSignature = Signature; - type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; - type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; - type MaxSuffixLength = ConstU32<7>; - type MaxUsernameLength = ConstU32<32>; - type WeightInfo = weights::pallet_identity::WeightInfo; -} - -impl identity_migrator::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reaper = EnsureSigned; - type ReapIdentityHandler = impls::ToParachainIdentityReaper; - type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; -} - impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -1115,14 +1065,22 @@ parameter_types! { TypeInfo, )] pub enum ProxyType { + #[codec(index = 0)] Any, + #[codec(index = 1)] NonTransfer, + #[codec(index = 2)] Governance, + #[codec(index = 3)] Staking, - IdentityJudgement, + // Index 4 skipped. Formerly `IdentityJudgement`. + #[codec(index = 5)] CancelProxy, + #[codec(index = 6)] Auction, + #[codec(index = 7)] Society, + #[codec(index = 8)] NominationPools, } @@ -1159,7 +1117,6 @@ impl InstanceFilter for ProxyType { RuntimeCall::Whitelist(..) | RuntimeCall::Claims(..) | RuntimeCall::Utility(..) | - RuntimeCall::Identity(..) | RuntimeCall::Society(..) | RuntimeCall::Recovery(pallet_recovery::Call::as_recovered {..}) | RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery {..}) | @@ -1212,11 +1169,6 @@ impl InstanceFilter for ProxyType { ProxyType::NominationPools => { matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) }, - ProxyType::IdentityJudgement => matches!( - c, - RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | - RuntimeCall::Utility(..) - ), ProxyType::CancelProxy => { matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, @@ -1685,8 +1637,7 @@ construct_runtime! { // Utility module. Utility: pallet_utility = 24, - // Less simple identity module. - Identity: pallet_identity = 25, + // pallet_identity = 25 (removed post 1.2.4) // Society module. Society: pallet_society = 26, @@ -1768,9 +1719,6 @@ construct_runtime! { // refer to block. See issue #160 for details. Mmr: pallet_mmr = 201, BeefyMmrLeaf: pallet_beefy_mmr = 202, - - // Pallet for migrating Identity to a parachain. To be removed post-migration. - IdentityMigrator: identity_migrator = 248, } } @@ -1822,9 +1770,6 @@ pub mod migrations { #[cfg(feature = "try-runtime")] use sp_core::crypto::ByteArray; - // We don't have a limit in the Relay Chain. - const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; - pub struct GetLegacyLeaseImpl; impl coretime::migration::GetLegacyLease for GetLegacyLeaseImpl { fn get_parachain_lease_in_blocks(para: ParaId) -> Option { @@ -1869,6 +1814,8 @@ pub mod migrations { parameter_types! { pub const StateTrieMigrationName: &'static str = "StateTrieMigration"; pub const ImOnlinePalletName: &'static str = "ImOnline"; + pub const IdentityPalletName: &'static str = "Identity"; + pub const IdentityMigratorPalletName: &'static str = "IdentityMigrator"; } /// Upgrade Session keys to exclude `ImOnline` key. @@ -1887,10 +1834,7 @@ pub mod migrations { log::info!(target: "runtime::session_keys", "Collecting pre-upgrade session keys state"); let key_ids = SessionKeys::key_ids(); frame_support::ensure!( - key_ids - .into_iter() - .find(|&k| *k == sp_core::crypto::key_types::IM_ONLINE) - .is_none(), + !key_ids.iter().any(|k| *k == sp_core::crypto::key_types::IM_ONLINE), "New session keys contain the ImOnline key that should have been removed", ); let storage_key = pallet_session::QueuedKeys::::hashed_key(); @@ -1906,7 +1850,7 @@ pub mod migrations { state.extend_from_slice(keys.get_raw(*key_id)); } }); - frame_support::ensure!(state.len() > 0, "Queued keys are not empty before upgrade"); + frame_support::ensure!(!state.is_empty(), "Queued keys are not empty before upgrade"); Ok(state) } @@ -1937,7 +1881,10 @@ pub mod migrations { new_state.extend_from_slice(keys.get_raw(*key_id)); } }); - frame_support::ensure!(new_state.len() > 0, "Queued keys are not empty after upgrade"); + frame_support::ensure!( + !new_state.is_empty(), + "Queued keys are not empty after upgrade" + ); frame_support::ensure!( old_state == new_state, "Pre-upgrade and post-upgrade keys do not match!" @@ -1982,6 +1929,214 @@ pub mod migrations { } } + /// Migration to remove deprecated judgement proxies. + mod clear_judgement_proxies { + use super::*; + + use frame_support::{ + pallet_prelude::ValueQuery, + storage_alias, + traits::{Currency, ReservableCurrency}, + Twox64Concat, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_proxy::ProxyDefinition; + use sp_runtime::{BoundedVec, Saturating}; + + /// ProxyType including the deprecated `IdentityJudgement`. + #[derive( + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + TypeInfo, + )] + pub enum PrevProxyType { + Any, + NonTransfer, + Governance, + Staking, + IdentityJudgement, + CancelProxy, + Auction, + Society, + NominationPools, + } + + type BalanceOf = <::Currency as Currency< + ::AccountId, + >>::Balance; + + type PrevProxiesValue = ( + BoundedVec>, MaxProxies>, + BalanceOf, + ); + + /// Proxies including the deprecated `IdentityJudgement` type. + #[storage_alias] + pub type Proxies = StorageMap< + pallet_proxy::Pallet, + Twox64Concat, + AccountId, + PrevProxiesValue, + ValueQuery, + >; + + pub struct Migration; + impl OnRuntimeUpgrade for Migration { + /// Compute the expected post-upgrade state for Proxies stroage, and the reserved value + /// for all accounts with a proxy. + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + let mut expected_proxies: BTreeMap> = + BTreeMap::new(); + let mut expected_reserved_amounts: BTreeMap = BTreeMap::new(); + + for (who, (mut proxies, old_deposit)) in + Proxies::::iter().collect::>() + { + let proxies_len_before = proxies.len() as u64; + proxies.retain(|proxy| proxy.proxy_type != PrevProxyType::IdentityJudgement); + let proxies_len_after = proxies.len() as u64; + + let new_deposit = + pallet_proxy::Pallet::::deposit(proxies.len() as u32); + + let current_reserved = + >::reserved_balance(&who); + + // Update the deposit only if proxies were removed and the deposit decreased. + if new_deposit < old_deposit && proxies_len_after < proxies_len_before { + // If there're no proxies left, they should be removed + if proxies.len() > 0 { + expected_proxies.insert(who.clone(), (proxies, new_deposit)); + } + expected_reserved_amounts.insert( + who, + current_reserved.saturating_sub(old_deposit - new_deposit), + ); + } else { + // Deposit should not change. If any proxies needed to be removed, this + // won't impact that. + expected_proxies.insert(who.clone(), (proxies, old_deposit)); + expected_reserved_amounts.insert(who, current_reserved); + } + } + + let pre_upgrade_state = (expected_proxies, expected_reserved_amounts); + Ok(pre_upgrade_state.encode()) + } + + fn on_runtime_upgrade() -> Weight { + let mut reads = 0u64; + let mut writes = 0u64; + let mut proxies_removed_total = 0u64; + + Proxies::::translate( + |who: AccountId, (mut proxies, old_deposit): PrevProxiesValue| { + // Remove filter out IdentityJudgement proxies. + let proxies_len_before = proxies.len() as u64; + proxies + .retain(|proxy| proxy.proxy_type != PrevProxyType::IdentityJudgement); + let proxies_len_after = proxies.len() as u64; + + let deposit = if proxies_len_before > proxies_len_after { + log::info!( + "Removing {} IdentityJudgement proxies for {:?}", + proxies_len_before - proxies_len_after, + &who + ); + proxies_removed_total + .saturating_accrue(proxies_len_before - proxies_len_after); + + let new_deposit = + pallet_proxy::Pallet::::deposit(proxies.len() as u32); + + // Be kind and don't increase the deposit in case it increased (can + // happen if param change). + let deposit = new_deposit.min(old_deposit); + if deposit < old_deposit { + writes.saturating_inc(); + >::unreserve( + &who, + old_deposit - deposit, + ); + } + + deposit + } else { + // Nothing to do, use the old deposit. + old_deposit + }; + + reads.saturating_accrue(proxies_len_before + 1); + writes.saturating_accrue(proxies_len_after + 1); + + // No need to keep the k/v around if there're no proxies left. + match proxies.is_empty() { + true => { + debug_assert_eq!(deposit, 0); + None + }, + false => Some((proxies, deposit)), + } + }, + ); + + log::info!("Removed {} IdentityJudgement proxies in total", proxies_removed_total); + ::DbWeight::get().reads_writes(reads, writes) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + use frame_support::ensure; + use sp_runtime::TryRuntimeError; + + let (expected_proxies, expected_total_reserved): ( + BTreeMap>, + BTreeMap, + ) = Decode::decode(&mut &state[..]).expect("Failed to decode pre-upgrade state"); + + // Check Proxies storage is as expected + for (who, (proxies, deposit)) in Proxies::::iter() { + match expected_proxies.get(&who) { + Some((expected_proxies, expected_deposit)) => { + ensure!(&proxies == expected_proxies, "Unexpected Proxy"); + ensure!(&deposit == expected_deposit, "Unexpected deposit"); + }, + None => { + return Err(TryRuntimeError::Other("Missing Proxy")); + }, + } + } + + // Check the total reserved amounts for every account is as expected + for (who, expected_reserved) in expected_total_reserved.iter() { + let current_reserved = + >::reserved_balance(who); + + ensure!(current_reserved == *expected_reserved, "Reserved balance mismatch"); + } + + // Check there are no extra entries in the expected state that are not in the + // current state + for (who, _) in expected_proxies.iter() { + if !Proxies::::contains_key(who) { + return Err(TryRuntimeError::Other("Extra entry in expected state")); + } + } + + Ok(()) + } + } + } + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( frame_support::migrations::RemovePallet, @@ -1990,8 +2145,6 @@ pub mod migrations { parachains_configuration::migration::v10::MigrateToV10, parachains_configuration::migration::v11::MigrateToV11, pallet_grandpa::migrations::MigrateV4ToV5, - // Migrate Identity pallet for Usernames - pallet_identity::migration::versioned::V0ToV1, parachains_scheduler::migration::MigrateV1ToV2, // Migrate from legacy lease to coretime. Needs to run after configuration v11 coretime::migration::MigrateToCoretime< @@ -2008,6 +2161,16 @@ pub mod migrations { ::DbWeight, >, CancelAuctions, + // Remove `identity` and `identity-migrator`. + frame_support::migrations::RemovePallet< + IdentityPalletName, + ::DbWeight, + >, + frame_support::migrations::RemovePallet< + IdentityMigratorPalletName, + ::DbWeight, + >, + clear_judgement_proxies::Migration, ); /// Migrations/checks that do not need to be versioned and can run on every update. @@ -2036,7 +2199,6 @@ mod benches { [polkadot_runtime_common::auctions, Auctions] [polkadot_runtime_common::crowdloan, Crowdloan] [polkadot_runtime_common::claims, Claims] - [polkadot_runtime_common::identity_migrator, IdentityMigrator] [polkadot_runtime_common::slots, Slots] [polkadot_runtime_common::paras_registrar, Registrar] [runtime_parachains::configuration, Configuration] @@ -2061,7 +2223,6 @@ mod benches { [frame_election_provider_support, ElectionProviderBench::] [pallet_fast_unstake, FastUnstake] [pallet_nis, Nis] - [pallet_identity, Identity] [pallet_indices, Indices] [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index 64d53581e4..21d376bcce 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -26,7 +26,6 @@ pub mod pallet_child_bounties; pub mod pallet_conviction_voting; pub mod pallet_election_provider_multi_phase; pub mod pallet_fast_unstake; -pub mod pallet_identity; pub mod pallet_indices; pub mod pallet_message_queue; pub mod pallet_multisig; @@ -50,7 +49,6 @@ pub mod pallet_xcm; pub mod polkadot_runtime_common_auctions; pub mod polkadot_runtime_common_claims; pub mod polkadot_runtime_common_crowdloan; -pub mod polkadot_runtime_common_identity_migrator; pub mod polkadot_runtime_common_paras_registrar; pub mod polkadot_runtime_common_slots; pub mod runtime_parachains_assigner_on_demand; diff --git a/relay/kusama/src/weights/pallet_identity.rs b/relay/kusama/src/weights/pallet_identity.rs deleted file mode 100644 index c49057bcea..0000000000 --- a/relay/kusama/src/weights/pallet_identity.rs +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//! Autogenerated weights for `pallet_identity` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=./kusama-chain-spec.json -// --steps=50 -// --repeat=20 -// --pallet=pallet_identity -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./kusama-weights/ -// --header=./file_header.txt - -#![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_identity`. -pub struct WeightInfo(PhantomData); -impl pallet_identity::WeightInfo for WeightInfo { - /// Storage: `Identity::Registrars` (r:1 w:1) - /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 19]`. - fn add_registrar(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `32 + r * (57 ±0)` - // Estimated: `2626` - // Minimum execution time: 7_423_000 picoseconds. - Weight::from_parts(8_143_580, 0) - .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_398 - .saturating_add(Weight::from_parts(88_352, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 20]`. - fn set_identity(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `6978 + r * (5 ±0)` - // Estimated: `11037` - // Minimum execution time: 105_465_000 picoseconds. - Weight::from_parts(107_147_454, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 5_835 - .saturating_add(Weight::from_parts(226_100, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:100 w:100) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `s` is `[0, 100]`. - fn set_subs_new(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `101` - // Estimated: `11037 + s * (2589 ±0)` - // Minimum execution time: 8_211_000 picoseconds. - Weight::from_parts(18_905_719, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_828 - .saturating_add(Weight::from_parts(3_171_890, 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)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) - .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) - } - /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:0 w:100) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 100]`. - fn set_subs_old(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `194 + p * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 8_234_000 picoseconds. - Weight::from_parts(20_223_382, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 5_672 - .saturating_add(Weight::from_parts(1_403_444, 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()))) - } - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:0 w:100) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[0, 100]`. - fn clear_identity(r: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7070 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 52_414_000 picoseconds. - Weight::from_parts(54_584_569, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 15_763 - .saturating_add(Weight::from_parts(127_125, 0).saturating_mul(r.into())) - // Standard Error: 3_075 - .saturating_add(Weight::from_parts(1_408_841, 0).saturating_mul(s.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()))) - } - /// Storage: `Identity::Registrars` (r:1 w:0) - /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 20]`. - fn request_judgement(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `6968 + r * (57 ±0)` - // Estimated: `11037` - // Minimum execution time: 74_182_000 picoseconds. - Weight::from_parts(76_026_106, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 3_519 - .saturating_add(Weight::from_parts(111_153, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 20]`. - fn cancel_request(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `6999` - // Estimated: `11037` - // Minimum execution time: 71_727_000 picoseconds. - Weight::from_parts(74_452_036, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_923 - .saturating_add(Weight::from_parts(153_968, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::Registrars` (r:1 w:1) - /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 19]`. - fn set_fee(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `89 + r * (57 ±0)` - // Estimated: `2626` - // Minimum execution time: 5_452_000 picoseconds. - Weight::from_parts(5_821_047, 0) - .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 903 - .saturating_add(Weight::from_parts(72_242, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::Registrars` (r:1 w:1) - /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 19]`. - fn set_account_id(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `89 + r * (57 ±0)` - // Estimated: `2626` - // Minimum execution time: 5_562_000 picoseconds. - Weight::from_parts(7_663_040, 0) - .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 4_641 - .saturating_add(Weight::from_parts(106_113, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::Registrars` (r:1 w:1) - /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 19]`. - fn set_fields(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `89 + r * (57 ±0)` - // Estimated: `2626` - // Minimum execution time: 5_624_000 picoseconds. - Weight::from_parts(7_571_970, 0) - .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 4_246 - .saturating_add(Weight::from_parts(109_102, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::Registrars` (r:1 w:0) - /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 19]`. - fn provide_judgement(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7046 + r * (57 ±0)` - // Estimated: `11037` - // Minimum execution time: 95_196_000 picoseconds. - Weight::from_parts(97_067_549, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_761 - .saturating_add(Weight::from_parts(106_543, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:0 w:100) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[0, 100]`. - fn kill_identity(r: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7277 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 67_997_000 picoseconds. - Weight::from_parts(69_029_074, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 17_074 - .saturating_add(Weight::from_parts(224_876, 0).saturating_mul(r.into())) - // Standard Error: 3_331 - .saturating_add(Weight::from_parts(1_380_625, 0).saturating_mul(s.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()))) - } - /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:1 w:1) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// The range of component `s` is `[0, 99]`. - fn add_sub(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `475 + s * (36 ±0)` - // Estimated: `11037` - // Minimum execution time: 23_603_000 picoseconds. - Weight::from_parts(29_512_485, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 1_432 - .saturating_add(Weight::from_parts(102_477, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:1 w:1) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `s` is `[1, 100]`. - fn rename_sub(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `591 + s * (3 ±0)` - // Estimated: `11037` - // Minimum execution time: 13_906_000 picoseconds. - Weight::from_parts(15_280_673, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 535 - .saturating_add(Weight::from_parts(44_553, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:1 w:1) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// The range of component `s` is `[1, 100]`. - fn remove_sub(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `638 + s * (35 ±0)` - // Estimated: `11037` - // Minimum execution time: 29_544_000 picoseconds. - Weight::from_parts(31_743_453, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 721 - .saturating_add(Weight::from_parts(86_362, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Identity::SuperOf` (r:1 w:1) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:0) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `s` is `[0, 99]`. - fn quit_sub(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `704 + s * (37 ±0)` - // Estimated: `6723` - // Minimum execution time: 22_595_000 picoseconds. - Weight::from_parts(24_344_163, 0) - .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 615 - .saturating_add(Weight::from_parts(83_224, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) - /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) - fn add_username_authority() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_166_000 picoseconds. - Weight::from_parts(6_519_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) - /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) - fn remove_username_authority() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 8_575_000 picoseconds. - Weight::from_parts(9_113_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) - /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) - /// Storage: `Identity::AccountOfUsername` (r:1 w:1) - /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) - /// Storage: `Identity::PendingUsernames` (r:1 w:0) - /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - fn set_username_for() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `11037` - // Minimum execution time: 65_274_000 picoseconds. - Weight::from_parts(67_397_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Identity::PendingUsernames` (r:1 w:1) - /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::AccountOfUsername` (r:0 w:1) - /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) - fn accept_username() -> Weight { - // Proof Size summary in bytes: - // Measured: `115` - // Estimated: `11037` - // Minimum execution time: 19_299_000 picoseconds. - Weight::from_parts(20_138_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Identity::PendingUsernames` (r:1 w:1) - /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) - fn remove_expired_approval() -> Weight { - // Proof Size summary in bytes: - // Measured: `115` - // Estimated: `3550` - // Minimum execution time: 16_264_000 picoseconds. - Weight::from_parts(20_214_000, 0) - .saturating_add(Weight::from_parts(0, 3550)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::AccountOfUsername` (r:1 w:0) - /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - fn set_primary_username() -> Weight { - // Proof Size summary in bytes: - // Measured: `257` - // Estimated: `11037` - // Minimum execution time: 15_009_000 picoseconds. - Weight::from_parts(15_555_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Identity::AccountOfUsername` (r:1 w:1) - /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - fn remove_dangling_username() -> Weight { - // Proof Size summary in bytes: - // Measured: `98` - // Estimated: `11037` - // Minimum execution time: 10_682_000 picoseconds. - Weight::from_parts(11_008_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs b/relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs deleted file mode 100644 index 7b999b032f..0000000000 --- a/relay/kusama/src/weights/polkadot_runtime_common_identity_migrator.rs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `polkadot_runtime_common::identity_migrator` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=./kusama-chain-spec.json -// --steps=50 -// --repeat=20 -// --pallet=polkadot_runtime_common::identity_migrator -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./kusama-weights/ -// --header=./file_header.txt - -#![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 `polkadot_runtime_common::identity_migrator`. -pub struct WeightInfo(PhantomData); -impl polkadot_runtime_common::identity_migrator::WeightInfo for WeightInfo { - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// 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`) - /// Storage: `Identity::SuperOf` (r:0 w:100) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 20]`. - /// The range of component `s` is `[0, 100]`. - fn reap_identity(r: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7391 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037 + r * (7 ±0) + s * (32 ±0)` - // Minimum execution time: 181_550_000 picoseconds. - Weight::from_parts(190_125_430, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 2_225 - .saturating_add(Weight::from_parts(1_607_494, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(6)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) - .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(s.into())) - } - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - fn poke_deposit() -> Weight { - // Proof Size summary in bytes: - // Measured: `7242` - // Estimated: `11037` - // Minimum execution time: 145_051_000 picoseconds. - Weight::from_parts(146_251_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } -} diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index caf6e36a2c..1e5b582e2f 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -47,7 +47,7 @@ use parachains_common::{ AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use polkadot_runtime_common::{identity_migrator, BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use sp_api::impl_runtime_apis; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; @@ -101,9 +101,17 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +parameter_types! { + pub const IdentityMigratorPalletName: &'static str = "IdentityMigrator"; +} /// Migrations to apply on runtime upgrade. pub type Migrations = ( pallet_collator_selection::migration::v2::MigrationToV2, + // remove `identity-migrator` + frame_support::migrations::RemovePallet< + IdentityMigratorPalletName, + ::DbWeight, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -504,14 +512,6 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } -// To be removed after migration is complete. -impl identity_migrator::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reaper = EnsureRoot; - type ReapIdentityHandler = (); - type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; -} - // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -546,9 +546,6 @@ construct_runtime!( // The main stage. Identity: pallet_identity = 50, - - // To migrate deposits - IdentityMigrator: identity_migrator = 248, } ); @@ -564,8 +561,6 @@ mod benches { [pallet_session, SessionBench::] [pallet_timestamp, Timestamp] [pallet_utility, Utility] - // Polkadot - [polkadot_runtime_common::identity_migrator, IdentityMigrator] // Cumulus [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_collator_selection, CollatorSelection] diff --git a/system-parachains/people/people-kusama/src/weights/mod.rs b/system-parachains/people/people-kusama/src/weights/mod.rs index dce959e817..34658af9ee 100644 --- a/system-parachains/people/people-kusama/src/weights/mod.rs +++ b/system-parachains/people/people-kusama/src/weights/mod.rs @@ -31,7 +31,6 @@ pub mod pallet_timestamp; pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; -pub mod polkadot_runtime_common_identity_migrator; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs b/system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs deleted file mode 100644 index eb0d37f2d3..0000000000 --- a/system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//! Autogenerated weights for `polkadot_runtime_common::identity_migrator` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=./people-kusama-chain-spec.json -// --steps=50 -// --repeat=20 -// --pallet=polkadot_runtime_common::identity_migrator -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./people-kusama-weights/ -// --header=./file_header.txt - -#![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 `polkadot_runtime_common::identity_migrator`. -pub struct WeightInfo(PhantomData); -impl polkadot_runtime_common::identity_migrator::WeightInfo for WeightInfo { - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Identity::SuperOf` (r:0 w:100) - /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 20]`. - /// The range of component `s` is `[0, 100]`. - fn reap_identity(r: u32, s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `741 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `6723` - // Minimum execution time: 30_569_000 picoseconds. - Weight::from_parts(28_116_110, 0) - .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 12_561 - .saturating_add(Weight::from_parts(311_879, 0).saturating_mul(r.into())) - // Standard Error: 2_573 - .saturating_add(Weight::from_parts(1_457_752, 0).saturating_mul(s.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()))) - } - /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Identity::SubsOf` (r:1 w:1) - /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) - fn poke_deposit() -> Weight { - // Proof Size summary in bytes: - // Measured: `706` - // Estimated: `6723` - // Minimum execution time: 41_584_000 picoseconds. - Weight::from_parts(43_230_000, 0) - .saturating_add(Weight::from_parts(0, 6723)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } -} From cede94af5b026e530ab1cab98a44b6468d5f0c13 Mon Sep 17 00:00:00 2001 From: Muharem Date: Thu, 13 Jun 2024 09:57:06 +0200 Subject: [PATCH 16/20] Kusama People: Clear judgements (#339) Clear requested judgements that do not have corresponding deposits reserved. These judgements exist because the data migration did not take into consideration the deposits for requested judgements. More info: https://github.com/polkadot-fellows/runtimes/pull/315#issuecomment-2141907293 --------- Co-authored-by: Branislav Kontur Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- CHANGELOG.md | 4 + .../people/people-kusama/src/identity_ops.rs | 237 ++++++++++++++++++ .../people/people-kusama/src/lib.rs | 10 + .../people/people-kusama/src/weights/mod.rs | 1 + .../src/weights/pallet_identity_ops.rs | 66 +++++ 5 files changed, 318 insertions(+) create mode 100644 system-parachains/people/people-kusama/src/identity_ops.rs create mode 100644 system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index f1cf9fe3ce..7275a1e43b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed + +- Kusama People: clear requested judgements that do not have corresponding deposits reserved ([polkadot-fellows/runtimes#339](https://github.com/polkadot-fellows/runtimes/pull/339)) + ### Removed - Removed Identity-related code from Kusama Relay Chain ([polkadot-fellows/runtimes#315](https://github.com/polkadot-fellows/runtimes/pull/315)) diff --git a/system-parachains/people/people-kusama/src/identity_ops.rs b/system-parachains/people/people-kusama/src/identity_ops.rs new file mode 100644 index 0000000000..1c0a5a4352 --- /dev/null +++ b/system-parachains/people/people-kusama/src/identity_ops.rs @@ -0,0 +1,237 @@ +// 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. + +#[frame_support::pallet] +pub mod pallet_identity_ops { + use crate::*; + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + use pallet_identity::Judgement; + + /// Weight information for extrinsics in this pallet. + pub trait WeightInfo { + /// Weight for clearing judgement. + fn clear_judgement() -> Weight; + } + + type IdentityPallet = pallet_identity::Pallet; + + #[pallet::pallet] + pub struct Pallet(PhantomData); + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + } + + #[pallet::error] + pub enum Error { + /// No judgement to clear. + NotFound, + } + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// The invalid judgements have been cleared. + JudgementsCleared { target: AccountId }, + } + + pub(crate) type Identity = ( + pallet_identity::Registration< + ::Balance, + ::MaxRegistrars, + ::IdentityInformation, + >, + Option::MaxUsernameLength>>, + ); + + /// Alias for `IdentityOf` from `pallet_identity`. + #[frame_support::storage_alias(pallet_name)] + pub(crate) type IdentityOf = + StorageMap; + + #[pallet::call] + impl Pallet { + /// Clear requested judgements that do not have a corresponding deposit reserved. + /// + /// This is successful only if the `target` account has judgements to clear. The transaction + /// fee is refunded to the caller if successful. + #[pallet::call_index(0)] + #[pallet::weight(weights::pallet_identity_ops::WeightInfo::::clear_judgement())] + pub fn clear_judgement( + _origin: OriginFor, + target: AccountId, + ) -> DispatchResultWithPostInfo { + let identity = IdentityPallet::identity(&target).ok_or(Error::::NotFound)?; + let (removed, identity) = Self::do_clear_judgement(&target, identity); + ensure!(removed > 0, Error::::NotFound); + + IdentityOf::insert(&target, identity); + + Self::deposit_event(Event::JudgementsCleared { target }); + + Ok(Pays::No.into()) + } + } + + impl Pallet { + fn do_clear_judgement(account_id: &AccountId, mut identity: Identity) -> (u32, Identity) { + // `subs_of`'s query kind is value option, if non subs the deposit is zero. + let (subs_deposit, _) = IdentityPallet::subs_of(account_id); + // deposit without deposits for judgement request. + let identity_deposit = identity.0.deposit.saturating_add(subs_deposit); + // total reserved balance. + let reserved = Balances::reserved_balance(account_id); + // expected deposit with judgement deposits. + let mut expected_total_deposit = identity_deposit; + // count before cleaning up the judgements. + let judgements_count = identity.0.judgements.len(); + + identity.0.judgements.retain(|(_, judgement)| { + if let Judgement::FeePaid(deposit) = judgement { + expected_total_deposit = expected_total_deposit.saturating_add(*deposit); + reserved >= expected_total_deposit && *deposit > 0 + } else { + true + } + }); + + ((judgements_count - identity.0.judgements.len()) as u32, identity) + } + } + + #[pallet::hooks] + impl Hooks> for Pallet { + #[cfg(feature = "try-runtime")] + fn try_state(_: BlockNumberFor) -> Result<(), sp_runtime::TryRuntimeError> { + use crate::Balance; + use sp_core::crypto::Ss58Codec; + + let mut total_invalid_identity_count = 0; + let mut total_invalid_judgement_count = 0; + let mut identity_count = 0; + IdentityOf::iter().for_each(|(account_id, registration)| { + let (identity, username) = registration; + + let (subs_deposit, _) = IdentityPallet::subs_of(&account_id); + let deposit_wo_judgement = identity.deposit.saturating_add(subs_deposit); + let reserved = Balances::reserved_balance(&account_id); + + let (invalid_judgement_count, expected_total_deposit) = + identity.judgements.iter().fold( + (0, deposit_wo_judgement), + |(count, total_deposit): (u32, Balance), (_, judgement)| { + if let Judgement::FeePaid(deposit) = judgement { + if total_deposit.saturating_add(*deposit) > reserved || + *deposit == 0 + { + return (count + 1, total_deposit.saturating_add(*deposit)) + } + } + (count, total_deposit) + }, + ); + + if expected_total_deposit >= reserved && invalid_judgement_count > 0 { + total_invalid_identity_count += 1; + total_invalid_judgement_count += invalid_judgement_count; + + log::info!( + "account with invalid state: {:?}, expected reserve at least: {:?}, actual: {:?}, invalid judgements: {:?}", + account_id.clone().to_ss58check_with_version(2u8.into()), + expected_total_deposit, + reserved, + invalid_judgement_count, + ); + + assert_eq!( + invalid_judgement_count, + Self::do_clear_judgement(&account_id, (identity, username)).0 + ); + + if deposit_wo_judgement != reserved { + log::warn!( + "unexpected state: {:?}, deposit w/o judgement: {:?}, not equal to the total reserved: {:?}", + account_id.clone().to_ss58check_with_version(2u8.into()), + deposit_wo_judgement, + reserved, + ); + } + } else { + assert_eq!(0, Self::do_clear_judgement(&account_id, (identity, username)).0); + } + if deposit_wo_judgement > reserved { + log::warn!( + "unexpected state: {:?}, deposit w/o judgement: {:?}, greater than the total reserved: {:?}", + account_id.clone().to_ss58check_with_version(2u8.into()), + deposit_wo_judgement, + reserved, + ); + } + identity_count += 1; + }); + + log::info!("total identities processed: {:?}", identity_count); + log::info!("invalid identities: {:?}", total_invalid_identity_count); + log::info!("invalid judgements: {:?}", total_invalid_judgement_count); + + Ok(()) + } + } +} + +#[cfg(feature = "runtime-benchmarks")] +#[frame_benchmarking::v2::benchmarks(where T: pallet_identity_ops::Config)] +mod benchmarks { + use crate::{people::IdentityInfo, *}; + use frame_benchmarking::BenchmarkError; + use frame_system::RawOrigin; + use pallet_identity::{IdentityInformationProvider, Judgement}; + use pallet_identity_ops::{Event, Identity, *}; + use parachains_common::{AccountId, Balance}; + use sp_core::Get; + use sp_runtime::traits::One; + + #[benchmark] + fn clear_judgement() -> Result<(), BenchmarkError> { + let max_registrars = + <::MaxRegistrars as Get>::get(); + let mut judgements = Vec::<(u32, Judgement)>::new(); + for i in 0..max_registrars { + judgements.push((i, Judgement::FeePaid(Balance::one()))); + } + let identity: Identity = ( + pallet_identity::Registration { + deposit: Balance::one(), + judgements: judgements.try_into().unwrap(), + info: IdentityInfo::create_identity_info(), + }, + None, + ); + + let target: AccountId = [1u8; 32].into(); + + IdentityOf::insert(&target, identity); + + #[extrinsic_call] + _(RawOrigin::None, target.clone()); + + crate::System::assert_last_event(Event::::JudgementsCleared { target }.into()); + + Ok(()) + } +} diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index 1e5b582e2f..d0e57af886 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -18,6 +18,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +mod identity_ops; pub mod people; mod weights; pub mod xcm_config; @@ -41,6 +42,7 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, }; +use identity_ops::pallet_identity_ops; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ message_queue::{NarrowOriginToSibling, ParaIdToSibling}, @@ -512,6 +514,10 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } +impl pallet_identity_ops::Config for Runtime { + type RuntimeEvent = RuntimeEvent; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -546,6 +552,9 @@ construct_runtime!( // The main stage. Identity: pallet_identity = 50, + + // Identity operations pallet. + IdentityOps: pallet_identity_ops = 247, } ); @@ -568,6 +577,7 @@ mod benches { [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] + [pallet_identity_ops, IdentityOps] ); } diff --git a/system-parachains/people/people-kusama/src/weights/mod.rs b/system-parachains/people/people-kusama/src/weights/mod.rs index 34658af9ee..0eee5fa387 100644 --- a/system-parachains/people/people-kusama/src/weights/mod.rs +++ b/system-parachains/people/people-kusama/src/weights/mod.rs @@ -23,6 +23,7 @@ pub mod frame_system; pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_identity; +pub mod pallet_identity_ops; pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_proxy; diff --git a/system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs b/system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs new file mode 100644 index 0000000000..f26f114e49 --- /dev/null +++ b/system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs @@ -0,0 +1,66 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_identity_ops` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_identity_ops +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-kusama-weights/ +// --header=./file_header.txt + +#![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_identity_ops`. +pub struct WeightInfo(PhantomData); +impl crate::pallet_identity_ops::WeightInfo for WeightInfo { + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:0) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn clear_judgement() -> Weight { + // Proof Size summary in bytes: + // Measured: `828` + // Estimated: `6723` + // Minimum execution time: 22_170_000 picoseconds. + Weight::from_parts(22_770_000, 0) + .saturating_add(Weight::from_parts(0, 6723)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} From c05dbd10373dd23cd8ed52825206e34d5c8ef58d Mon Sep 17 00:00:00 2001 From: Muharem Date: Thu, 13 Jun 2024 13:12:34 +0200 Subject: [PATCH 17/20] Max asset ID restriction for new trusted assets (#346) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the maximum asset ID for the creation of trusted assets. This change will enable us to migrate the trusted assets instance to start auto-incrementing IDs from 50,000,000 with the release following the next one.. --------- Co-authored-by: Bastian Köcher Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- CHANGELOG.md | 4 +++ .../asset-hubs/asset-hub-kusama/src/lib.rs | 27 ++++++++++++++++--- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 27 ++++++++++++++++--- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7275a1e43b..e0b1c75c2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Changed + +- Set max asset ID restriction for the creation of trusted assets ([polkadot-fellows/runtimes#346](https://github.com/polkadot-fellows/runtimes/pull/346)) + ### Fixed - Kusama People: clear requested judgements that do not have corresponding deposits reserved ([polkadot-fellows/runtimes#339](https://github.com/polkadot-fellows/runtimes/pull/339)) 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 fff90be3ff..1e0ad3b0a3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -60,8 +60,8 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, - TransformOrigin, WithdrawReasons, + ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, EnsureOrigin, EnsureOriginWithArg, + Equals, InstanceFilter, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight}, BoundedVec, PalletId, @@ -283,6 +283,27 @@ parameter_types! { /// We allow root to execute privileged asset operations. pub type AssetsForceOrigin = EnsureRoot; +/// Ensure that the proposed asset id is less than `50_000_000` and origin is signed. +pub struct EnsureLessThanAutoIncrement; +impl EnsureOriginWithArg + for EnsureLessThanAutoIncrement +{ + type Success = AccountId; + fn try_origin( + o: RuntimeOrigin, + a: &AssetIdForTrustBackedAssets, + ) -> Result { + if *a >= 50_000_000 { + return Err(o); + } + as EnsureOrigin>::try_origin(o) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_a: &AssetIdForTrustBackedAssets) -> Result { + as EnsureOrigin>::try_successful_origin() + } +} + // Called "Trust Backed" assets because these are generally registered by some account, and users of // the asset assume it has some claimed backing. The pallet is called `Assets` in // `construct_runtime` to avoid breaking changes on storage reads. @@ -294,7 +315,7 @@ impl pallet_assets::Config for Runtime { type AssetId = AssetIdForTrustBackedAssets; type AssetIdParameter = codec::Compact; type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; + type CreateOrigin = EnsureLessThanAutoIncrement; type ForceOrigin = AssetsForceOrigin; type AssetDeposit = AssetDeposit; type MetadataDepositBase = MetadataDepositBase; 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 f52b4c6ea2..3f5d1a65bb 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -94,8 +94,8 @@ use frame_support::{ parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, NeverEnsureOrigin, - TransformOrigin, WithdrawReasons, + ConstU32, ConstU64, ConstU8, EitherOfDiverse, EnsureOrigin, EnsureOriginWithArg, Equals, + InstanceFilter, NeverEnsureOrigin, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -301,6 +301,27 @@ parameter_types! { /// We allow root to execute privileged asset operations. pub type AssetsForceOrigin = EnsureRoot; +/// Ensure that the proposed asset id is less than `50_000_000` and origin is signed. +pub struct EnsureLessThanAutoIncrement; +impl EnsureOriginWithArg + for EnsureLessThanAutoIncrement +{ + type Success = AccountId; + fn try_origin( + o: RuntimeOrigin, + a: &AssetIdForTrustBackedAssets, + ) -> Result { + if *a >= 50_000_000 { + return Err(o); + } + as EnsureOrigin>::try_origin(o) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_a: &AssetIdForTrustBackedAssets) -> Result { + as EnsureOrigin>::try_successful_origin() + } +} + // Called "Trust Backed" assets because these are generally registered by some account, and users of // the asset assume it has some claimed backing. The pallet is called `Assets` in // `construct_runtime` to avoid breaking changes on storage reads. @@ -312,7 +333,7 @@ impl pallet_assets::Config for Runtime { type AssetId = AssetIdForTrustBackedAssets; type AssetIdParameter = codec::Compact; type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; + type CreateOrigin = EnsureLessThanAutoIncrement; type ForceOrigin = AssetsForceOrigin; type AssetDeposit = AssetDeposit; type MetadataDepositBase = MetadataDepositBase; From 329cecabf9bc8bf7a9cc56f87a8899278436a6bf Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:45:27 +0200 Subject: [PATCH 18/20] Polkadot People Chain (#319) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Polkadot People Chain To verify prior to release: People Chain `poke_deposit` weight must be less than 2x Relay's. E.g.: ```python >>> weight_per_nano = 1_000 >>> relay_read = 20_499 * weight_per_nano >>> relay_write = 83_471 * weight_per_nano >>> para_read = 25_000 * weight_per_nano >>> para_write = 100_000 * weight_per_nano >>> >>> def relay(): ... time = 145_781_000 + (3 * relay_read) + (3 * relay_write) ... pov = 11_037 ... return (time, pov) ... >>> def para(): ... time = 52_060_000 + (3 * para_read) + (3 * para_write) ... pov = 6_723 ... return (time, pov) ... >>> >>> (relay_time, relay_pov) = relay() >>> (para_time, para_pov) = para() >>> >>> (2 * relay_time) > para_time True >>> (2 * relay_pov) > para_pov True ``` --------- Co-authored-by: Dónal Murray Co-authored-by: Branislav Kontur --- .../workflows/integration-tests-matrix.json | 4 + .github/workflows/runtimes-matrix.json | 6 + CHANGELOG.md | 6 +- Cargo.lock | 104 ++ Cargo.toml | 5 + chain-spec-generator/Cargo.toml | 2 + chain-spec-generator/src/common.rs | 6 +- chain-spec-generator/src/main.rs | 4 + .../src/system_parachains_specs.rs | 85 ++ .../people/people-polkadot/Cargo.toml | 23 + .../people/people-polkadot/src/genesis.rs | 62 ++ .../people/people-polkadot/src/lib.rs | 52 + .../chains/relays/polkadot/src/lib.rs | 1 + .../networks/polkadot-system/Cargo.toml | 1 + .../networks/polkadot-system/src/lib.rs | 6 +- .../tests/people/people-polkadot/Cargo.toml | 37 + .../tests/people/people-polkadot/src/lib.rs | 61 ++ .../people/people-polkadot/src/tests/mod.rs | 17 + .../src/tests/reap_identity.rs | 564 ++++++++++ .../people-polkadot/src/tests/teleport.rs | 260 +++++ relay/polkadot/constants/src/lib.rs | 4 +- relay/polkadot/src/impls.rs | 192 +++- relay/polkadot/src/lib.rs | 47 +- relay/polkadot/src/weights/mod.rs | 11 +- ...rs => polkadot_runtime_common_auctions.rs} | 0 ...s.rs => polkadot_runtime_common_claims.rs} | 0 ...s => polkadot_runtime_common_crowdloan.rs} | 0 ...lkadot_runtime_common_identity_migrator.rs | 99 ++ ...olkadot_runtime_common_paras_registrar.rs} | 0 ...ts.rs => polkadot_runtime_common_slots.rs} | 0 relay/polkadot/src/xcm_config.rs | 3 + .../people/people-kusama/src/lib.rs | 4 +- .../cumulus_pallet_parachain_system.rs | 67 +- .../src/weights/pallet_message_queue.rs | 165 +-- .../people-kusama/src/weights/xcm/mod.rs | 6 +- .../xcm/pallet_xcm_benchmarks_fungible.rs | 10 + .../people/people-polkadot/Cargo.toml | 208 ++++ .../people/people-polkadot/build.rs | 29 + .../people/people-polkadot/src/lib.rs | 995 ++++++++++++++++++ .../people/people-polkadot/src/people.rs | 229 ++++ .../src/weights/block_weights.rs | 53 + .../cumulus_pallet_parachain_system.rs | 74 ++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 152 +++ .../src/weights/extrinsic_weights.rs | 53 + .../src/weights/frame_system.rs | 187 ++++ .../people/people-polkadot/src/weights/mod.rs | 40 + .../src/weights/pallet_balances.rs | 161 +++ .../src/weights/pallet_collator_selection.rs | 282 +++++ .../src/weights/pallet_identity.rs | 437 ++++++++ .../src/weights/pallet_message_queue.rs | 183 ++++ .../src/weights/pallet_multisig.rs | 162 +++ .../src/weights/pallet_proxy.rs | 223 ++++ .../src/weights/pallet_session.rs | 78 ++ .../src/weights/pallet_timestamp.rs | 72 ++ .../src/weights/pallet_utility.rs | 99 ++ .../people-polkadot/src/weights/pallet_xcm.rs | 343 ++++++ .../src/weights/paritydb_weights.rs | 63 ++ ...lkadot_runtime_common_identity_migrator.rs | 91 ++ .../src/weights/rocksdb_weights.rs | 63 ++ .../people-polkadot/src/weights/xcm/mod.rs | 234 ++++ .../xcm/pallet_xcm_benchmarks_fungible.rs | 196 ++++ .../xcm/pallet_xcm_benchmarks_generic.rs | 354 +++++++ .../people/people-polkadot/src/xcm_config.rs | 313 ++++++ 63 files changed, 7167 insertions(+), 121 deletions(-) create mode 100644 integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/tests/people/people-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/tests/people/people-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs create mode 100644 integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs create mode 100644 integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs rename relay/polkadot/src/weights/{runtime_common_auctions.rs => polkadot_runtime_common_auctions.rs} (100%) rename relay/polkadot/src/weights/{runtime_common_claims.rs => polkadot_runtime_common_claims.rs} (100%) rename relay/polkadot/src/weights/{runtime_common_crowdloan.rs => polkadot_runtime_common_crowdloan.rs} (100%) create mode 100644 relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs rename relay/polkadot/src/weights/{runtime_common_paras_registrar.rs => polkadot_runtime_common_paras_registrar.rs} (100%) rename relay/polkadot/src/weights/{runtime_common_slots.rs => polkadot_runtime_common_slots.rs} (100%) create mode 100644 system-parachains/people/people-polkadot/Cargo.toml create mode 100644 system-parachains/people/people-polkadot/build.rs create mode 100644 system-parachains/people/people-polkadot/src/lib.rs create mode 100644 system-parachains/people/people-polkadot/src/people.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/block_weights.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/frame_system.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/mod.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_balances.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_identity.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_session.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_utility.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/xcm/mod.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs create mode 100644 system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs create mode 100644 system-parachains/people/people-polkadot/src/xcm_config.rs diff --git a/.github/workflows/integration-tests-matrix.json b/.github/workflows/integration-tests-matrix.json index bb5266dd5a..48ce7e5681 100644 --- a/.github/workflows/integration-tests-matrix.json +++ b/.github/workflows/integration-tests-matrix.json @@ -19,6 +19,10 @@ "name": "people-kusama", "package": "people-kusama-integration-tests" }, + { + "name": "people-polkadot", + "package": "people-polkadot-integration-tests" + }, { "name": "collectives-polkadot", "package": "collectives-polkadot-integration-tests" diff --git a/.github/workflows/runtimes-matrix.json b/.github/workflows/runtimes-matrix.json index 265924dc10..7df5878b7d 100644 --- a/.github/workflows/runtimes-matrix.json +++ b/.github/workflows/runtimes-matrix.json @@ -67,6 +67,12 @@ "path": "system-parachains/people/people-kusama", "is_relay": false }, + { + "name": "people-polkadot", + "package": "people-polkadot-runtime", + "path": "system-parachains/people/people-polkadot", + "is_relay": false + }, { "name": "encointer-kusama", "package": "encointer-kusama-runtime", diff --git a/CHANGELOG.md b/CHANGELOG.md index e0b1c75c2c..4122bdd62b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added + +- Add the Polkadot People Chain ([polkadot-fellows/runtimes#319](https://github.com/polkadot-fellows/runtimes/pull/319)) + ### Changed - Set max asset ID restriction for the creation of trusted assets ([polkadot-fellows/runtimes#346](https://github.com/polkadot-fellows/runtimes/pull/346)) @@ -24,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) - Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) -- Update price controller of broker pallet to use higher leadin, without adjusting the minimum price too much ([polkadot-fellows/runtimes#334](https://github.com/polkadot-fellows/runtimes/pull/334) +- Update price controller of broker pallet to use higher leadin, without adjusting the minimum price too much ([polkadot-fellows/runtimes#334](https://github.com/polkadot-fellows/runtimes/pull/334)) - Enable support for new hardware signers like the generic ledger app ([polkadot-fellows/runtimes#337](https://github.com/polkadot-fellows/runtimes/pull/337)) ### Changed diff --git a/Cargo.lock b/Cargo.lock index dae3c3fcc6..ca362d2002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2257,6 +2257,7 @@ dependencies = [ "pallet-staking", "parachains-common", "people-kusama-runtime", + "people-polkadot-runtime", "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", @@ -9898,6 +9899,108 @@ dependencies = [ "system-parachains-constants", ] +[[package]] +name = "people-polkadot-emulated-chain" +version = "1.0.0" +dependencies = [ + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "people-polkadot-runtime", + "polkadot-emulated-chain", + "sp-core 29.0.0", +] + +[[package]] +name = "people-polkadot-integration-tests" +version = "1.0.0" +dependencies = [ + "asset-test-utils", + "cumulus-pallet-parachain-system", + "emulated-integration-tests-common", + "frame-support", + "pallet-balances", + "pallet-identity", + "pallet-message-queue", + "parachains-common", + "parity-scale-codec", + "people-polkadot-runtime", + "polkadot-runtime", + "polkadot-runtime-common", + "polkadot-runtime-constants", + "polkadot-system-emulated-network", + "sp-runtime 32.0.0", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "people-polkadot-runtime" +version = "1.0.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "enumflags2", + "frame-benchmarking", + "frame-executive", + "frame-metadata-hash-extension", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-identity", + "pallet-message-queue", + "pallet-multisig", + "pallet-proxy", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "polkadot-runtime-constants", + "scale-info", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core 29.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime 32.0.0", + "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", + "system-parachains-constants", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -11254,6 +11357,7 @@ dependencies = [ "collectives-polkadot-emulated-chain", "emulated-integration-tests-common", "penpal-emulated-chain", + "people-polkadot-emulated-chain", "polkadot-emulated-chain", ] diff --git a/Cargo.toml b/Cargo.toml index 7ee18a76cd..54a5ae2360 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -170,6 +170,8 @@ penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/t penpal-runtime = { version = "0.15.1" } people-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-kusama" } people-kusama-runtime = { path = "system-parachains/people/people-kusama" } +people-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-polkadot" } +people-polkadot-runtime = { path = "system-parachains/people/people-polkadot" } polkadot-core-primitives = { version = "8.0.0", default-features = false } polkadot-emulated-chain = { path = "integration-tests/emulated/chains/relays/polkadot" } polkadot-parachain-primitives = { version = "7.0.0", default-features = false } @@ -246,6 +248,7 @@ members = [ "integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot", "integration-tests/emulated/chains/parachains/collectives/collectives-polkadot", "integration-tests/emulated/chains/parachains/people/people-kusama", + "integration-tests/emulated/chains/parachains/people/people-polkadot", "integration-tests/emulated/chains/parachains/testing/penpal", "integration-tests/emulated/chains/relays/kusama", "integration-tests/emulated/chains/relays/polkadot", @@ -259,6 +262,7 @@ members = [ "integration-tests/emulated/tests/bridges/bridge-hub-polkadot", "integration-tests/emulated/tests/collectives/collectives-polkadot", "integration-tests/emulated/tests/people/people-kusama", + "integration-tests/emulated/tests/people/people-polkadot", "relay/kusama", "relay/kusama/constants", "relay/polkadot", @@ -278,6 +282,7 @@ members = [ "system-parachains/encointer", "system-parachains/gluttons/glutton-kusama", "system-parachains/people/people-kusama", + "system-parachains/people/people-polkadot", "integration-tests/zombienet", ] diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 030dccbeb9..4d44340016 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -39,6 +39,7 @@ encointer-kusama-runtime = { workspace = true } glutton-kusama-runtime = { workspace = true } coretime-kusama-runtime = { workspace = true } people-kusama-runtime = { workspace = true } +people-polkadot-runtime = { workspace = true } [features] fast-runtime = ["kusama-runtime/fast-runtime", "polkadot-runtime/fast-runtime"] @@ -56,6 +57,7 @@ runtime-benchmarks = [ "pallet-staking/runtime-benchmarks", "parachains-common/runtime-benchmarks", "people-kusama-runtime/runtime-benchmarks", + "people-polkadot-runtime/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-runtime/runtime-benchmarks", "runtime-parachains/runtime-benchmarks", diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index c76e20c865..24162a4600 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -20,7 +20,7 @@ use crate::{ system_parachains_specs::{ AssetHubKusamaChainSpec, AssetHubPolkadotChainSpec, BridgeHubKusamaChainSpec, BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, EncointerKusamaChainSpec, - GluttonKusamaChainSpec, + GluttonKusamaChainSpec, PeopleKusamaChainSpec, PeoplePolkadotChainSpec, }, ChainSpec, }; @@ -90,6 +90,10 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result Ok(Box::new(EncointerKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("people-kusama") => + Ok(Box::new(PeopleKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("people-polkadot") => + Ok(Box::new(PeoplePolkadotChainSpec::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 index 4a72781717..913d976d56 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -84,6 +84,10 @@ fn main() -> Result<(), String> { "people-kusama-local", Box::new(system_parachains_specs::people_kusama_local_testnet_config) as Box<_>, ), + ( + "people-polkadot-local", + Box::new(system_parachains_specs::people_polkadot_local_testnet_config) as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 3031b50e9a..a3850184f3 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -50,6 +50,8 @@ pub type CoretimeKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extension pub type PeopleKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type PeoplePolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; + const ASSET_HUB_POLKADOT_ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); const ASSET_HUB_KUSAMA_ED: Balance = asset_hub_kusama_runtime::ExistentialDeposit::get(); @@ -66,6 +68,8 @@ const CORETIME_KUSAMA_ED: Balance = coretime_kusama_runtime::ExistentialDeposit: const PEOPLE_KUSAMA_ED: Balance = people_kusama_runtime::ExistentialDeposit::get(); +const PEOPLE_POLKADOT_ED: Balance = people_polkadot_runtime::ExistentialDeposit::get(); + /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; @@ -144,6 +148,13 @@ pub fn people_kusama_session_keys(keys: AuraId) -> people_kusama_runtime::Sessio people_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 people_polkadot_session_keys(keys: AuraId) -> people_polkadot_runtime::SessionKeys { + people_polkadot_runtime::SessionKeys { aura: keys } +} + // AssetHubPolkadot fn asset_hub_polkadot_genesis( invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, @@ -758,3 +769,77 @@ pub fn people_kusama_local_testnet_config() -> Result, String .build(), )) } + +// PeoplePolkadot +fn people_polkadot_genesis( + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> serde_json::Value { + serde_json::json!({ + "balances": people_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, PEOPLE_POLKADOT_ED * 4096 * 4096)) + .collect(), + }, + "parachainInfo": people_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + "collatorSelection": people_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: PEOPLE_POLKADOT_ED * 16, + ..Default::default() + }, + "session": people_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + people_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) +} + +fn people_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { + crate::system_parachains_specs::people_polkadot_genesis( + // initial collators. + invulnerables(), + testnet_accounts(), + para_id, + ) +} + +pub fn people_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()); + + Ok(Box::new( + PeoplePolkadotChainSpec::builder( + people_polkadot_runtime::WASM_BINARY.expect("PeoplePolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1004 }, + ) + .with_name("Polkadot People Local") + .with_id("people-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(crate::system_parachains_specs::people_polkadot_local_genesis( + 1004.into(), + )) + .with_properties(properties) + .build(), + )) +} diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml new file mode 100644 index 0000000000..8649747813 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "people-polkadot-emulated-chain" +authors.workspace = true +edition.workspace = true +version.workspace = true +license = "Apache-2.0" +description = "People Polkadot emulated chain used for integration tests" +publish = false + +[dependencies] + +# Substrate +sp-core = { workspace = true, default-features = true } +frame-support = { workspace = true, default-features = true } + +# Cumulus +parachains-common = { workspace = true, default-features = true } +cumulus-primitives-core = { workspace = true, default-features = true } +emulated-integration-tests-common = { workspace = true } + +# Local +people-polkadot-runtime = { workspace = true } +polkadot-emulated-chain = { workspace = true } diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs new file mode 100644 index 0000000000..557cca546c --- /dev/null +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs @@ -0,0 +1,62 @@ +// 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 sp_core::storage::Storage; + +// Cumulus +use cumulus_primitives_core::ParaId; +use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_XCM_VERSION}; +use parachains_common::Balance; + +pub const PARA_ID: u32 = 1004; +pub const ED: Balance = people_polkadot_runtime::ExistentialDeposit::get(); + +pub fn genesis() -> Storage { + let genesis_config = people_polkadot_runtime::RuntimeGenesisConfig { + system: people_polkadot_runtime::SystemConfig::default(), + parachain_info: people_polkadot_runtime::ParachainInfoConfig { + parachain_id: ParaId::from(PARA_ID), + ..Default::default() + }, + collator_selection: people_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: people_polkadot_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + people_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: people_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + people_polkadot_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs new file mode 100644 index 0000000000..fe1bab1b10 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs @@ -0,0 +1,52 @@ +// 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 genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impls::Parachain, xcm_emulator::decl_test_parachains, +}; + +// PeoplePolkadot Parachain declaration +decl_test_parachains! { + pub struct PeoplePolkadot { + genesis = genesis::genesis(), + on_init = { + people_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = people_polkadot_runtime, + core = { + XcmpMessageHandler: people_polkadot_runtime::XcmpQueue, + LocationToAccountId: people_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: people_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: people_polkadot_runtime::PolkadotXcm, + Balances: people_polkadot_runtime::Balances, + Identity: people_polkadot_runtime::Identity, + IdentityMigrator: people_polkadot_runtime::IdentityMigrator, + } + }, +} + +// PeoplePolkadot implementation +impl_accounts_helpers_for_parachain!(PeoplePolkadot); +impl_assert_events_helpers_for_parachain!(PeoplePolkadot); diff --git a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs index f207c1dab6..8bf8a354ce 100644 --- a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs +++ b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs @@ -39,6 +39,7 @@ decl_test_relay_chains! { AssetRate: polkadot_runtime::AssetRate, Hrmp: polkadot_runtime::Hrmp, Identity: polkadot_runtime::Identity, + IdentityMigrator: polkadot_runtime::IdentityMigrator, } }, } diff --git a/integration-tests/emulated/networks/polkadot-system/Cargo.toml b/integration-tests/emulated/networks/polkadot-system/Cargo.toml index 9e7c757374..e870ecbf6f 100644 --- a/integration-tests/emulated/networks/polkadot-system/Cargo.toml +++ b/integration-tests/emulated/networks/polkadot-system/Cargo.toml @@ -18,3 +18,4 @@ bridge-hub-polkadot-emulated-chain = { workspace = true } collectives-polkadot-emulated-chain = { workspace = true } penpal-emulated-chain = { workspace = true } polkadot-emulated-chain = { workspace = true } +people-polkadot-emulated-chain = { workspace = true } diff --git a/integration-tests/emulated/networks/polkadot-system/src/lib.rs b/integration-tests/emulated/networks/polkadot-system/src/lib.rs index bed1b549e2..408f651fc9 100644 --- a/integration-tests/emulated/networks/polkadot-system/src/lib.rs +++ b/integration-tests/emulated/networks/polkadot-system/src/lib.rs @@ -17,12 +17,14 @@ pub use asset_hub_polkadot_emulated_chain; pub use bridge_hub_polkadot_emulated_chain; pub use collectives_polkadot_emulated_chain; pub use penpal_emulated_chain; +pub use people_polkadot_emulated_chain; pub use polkadot_emulated_chain; use asset_hub_polkadot_emulated_chain::AssetHubPolkadot; use bridge_hub_polkadot_emulated_chain::BridgeHubPolkadot; use collectives_polkadot_emulated_chain::CollectivesPolkadot; use penpal_emulated_chain::{PenpalA, PenpalB}; +use people_polkadot_emulated_chain::PeoplePolkadot; use polkadot_emulated_chain::Polkadot; // Cumulus @@ -40,6 +42,7 @@ decl_test_networks! { CollectivesPolkadot, PenpalA, PenpalB, + PeoplePolkadot, ], bridge = () }, @@ -51,5 +54,6 @@ decl_test_sender_receiver_accounts_parameter_types! { BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, CollectivesPolkadotPara { sender: ALICE, receiver: BOB }, PenpalAPara { sender: ALICE, receiver: BOB }, - PenpalBPara { sender: ALICE, receiver: BOB } + PenpalBPara { sender: ALICE, receiver: BOB }, + PeoplePolkadotPara { sender: ALICE, receiver: BOB } } diff --git a/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml b/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml new file mode 100644 index 0000000000..b880ee1f05 --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "people-polkadot-integration-tests" +version.workspace = true +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "People Polkadot runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { workspace = true, default-features = true } + +# Substrate +sp-runtime = { workspace = true, default-features = true } +frame-support = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = true } +pallet-message-queue = { workspace = true, default-features = true } +pallet-identity = { workspace = true, default-features = true } + +# Polkadot +polkadot-runtime-common = { workspace = true, default-features = true } +xcm = { workspace = true, default-features = true } +xcm-executor = { workspace = true } + +# Cumulus +parachains-common = { workspace = true, default-features = true } +emulated-integration-tests-common = { workspace = true } +asset-test-utils = { workspace = true } +cumulus-pallet-parachain-system = { features = [ + "parameterized-consensus-hook", +], workspace = true, default-features = true } + +# Local +polkadot-runtime-constants = { workspace = true, default-features = true } +polkadot-runtime = { workspace = true } +people-polkadot-runtime = { workspace = true } +polkadot-system-emulated-network = { workspace = true } diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/lib.rs b/integration-tests/emulated/tests/people/people-polkadot/src/lib.rs new file mode 100644 index 0000000000..2f80c85e69 --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/lib.rs @@ -0,0 +1,61 @@ +// 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::Encode; + +// Substrate +pub use frame_support::{ + assert_err, assert_ok, + pallet_prelude::Weight, + sp_runtime::{AccountId32, DispatchError, DispatchResult}, + traits::fungibles::Inspect, +}; + +// Polkadot +pub use xcm::{ + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{Error, NetworkId::Polkadot as PolkadotId}, +}; + +// Cumulus +pub use asset_test_utils::xcm_helpers; +pub use emulated_integration_tests_common::{ + xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, +}; +pub use parachains_common::{AccountId, Balance}; +pub use polkadot_system_emulated_network::{ + people_polkadot_emulated_chain::{ + genesis::ED as PEOPLE_KUSAMA_ED, PeoplePolkadotParaPallet as PeoplePolkadotPallet, + }, + polkadot_emulated_chain::{genesis::ED as KUSAMA_ED, PolkadotRelayPallet as PolkadotPallet}, + PenpalAPara as PenpalA, PeoplePolkadotPara as PeoplePolkadot, + PeoplePolkadotParaReceiver as PeoplePolkadotReceiver, + PeoplePolkadotParaSender as PeoplePolkadotSender, PolkadotRelay as Polkadot, + PolkadotRelayReceiver as PolkadotReceiver, PolkadotRelaySender as PolkadotSender, +}; + +pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; +pub type SystemParaToRelayTest = Test; +pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; + +#[cfg(test)] +mod tests; diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs new file mode 100644 index 0000000000..80c00021ca --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs @@ -0,0 +1,17 @@ +// 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. + +mod reap_identity; +mod teleport; diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs new file mode 100644 index 0000000000..18226fd901 --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs @@ -0,0 +1,564 @@ +// 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. + +//! # OnReapIdentity Tests +//! +//! This file contains the test cases for migrating Identity data away from the Polkadot Relay +//! chain and to the Polkadot People parachain. This migration is part of the broader Minimal Relay +//! effort: +//! https://github.com/polkadot-fellows/RFCs/blob/main/text/0032-minimal-relay.md +//! +//! ## Overview +//! +//! The tests validate the robustness and correctness of the `OnReapIdentityHandler` +//! ensuring that it behaves as expected in various scenarios. Key aspects tested include: +//! +//! - **Deposit Handling**: Confirming that deposits are correctly migrated from the Relay Chain to +//! the People parachain in various scenarios (different `IdentityInfo` fields and different +//! numbers of sub-accounts). +//! +//! ### Test Scenarios +//! +//! The tests are categorized into several scenarios, each resulting in different deposits required +//! on the destination parachain. The tests ensure: +//! +//! - Reserved deposits on the Relay Chain are fully released; +//! - The freed deposit from the Relay Chain is sufficient for the parachain deposit; and +//! - The account will exist on the parachain. + +use crate::*; +use frame_support::BoundedVec; +use pallet_balances::Event as BalancesEvent; +use pallet_identity::{legacy::IdentityInfo, Data, Event as IdentityEvent}; +use people_polkadot_runtime::people::{ + BasicDeposit as BasicDepositParachain, ByteDeposit as ByteDepositParachain, + IdentityInfo as IdentityInfoParachain, SubAccountDeposit as SubAccountDepositParachain, +}; +use polkadot_runtime::{ + xcm_config::CheckAccount, BasicDeposit, ByteDeposit, MaxAdditionalFields, MaxSubAccounts, + RuntimeOrigin as PolkadotOrigin, SubAccountDeposit, +}; +use polkadot_runtime_constants::currency::*; +use polkadot_system_emulated_network::{ + polkadot_emulated_chain::PolkadotRelayPallet, PolkadotRelay, PolkadotRelaySender, +}; + +type Balance = u128; +type PolkadotIdentity = ::Identity; +type PolkadotBalances = ::Balances; +type PolkadotIdentityMigrator = ::IdentityMigrator; +type PeoplePolkadotIdentity = ::Identity; +type PeoplePolkadotBalances = ::Balances; + +#[derive(Clone, Debug)] +struct Identity { + relay: IdentityInfo, + para: IdentityInfoParachain, + subs: Subs, +} + +impl Identity { + fn new( + full: bool, + additional: Option>, + subs: Subs, + ) -> Self { + let pgp_fingerprint = [ + 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, + 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, + ]; + let make_data = |data: &[u8], full: bool| -> Data { + if full { + Data::Raw(data.to_vec().try_into().unwrap()) + } else { + Data::None + } + }; + let (github, discord) = additional + .as_ref() + .and_then(|vec| vec.first()) + .map(|(g, d)| (g.clone(), d.clone())) + .unwrap_or((Data::None, Data::None)); + Self { + relay: IdentityInfo { + display: make_data(b"xcm-test", full), + legal: make_data(b"The Xcm Test, Esq.", full), + web: make_data(b"https://visitme/", full), + riot: make_data(b"xcm-riot", full), + email: make_data(b"xcm-test@gmail.com", full), + pgp_fingerprint: Some(pgp_fingerprint), + image: make_data(b"xcm-test.png", full), + twitter: make_data(b"@xcm-test", full), + additional: additional.unwrap_or_default(), + }, + para: IdentityInfoParachain { + display: make_data(b"xcm-test", full), + legal: make_data(b"The Xcm Test, Esq.", full), + web: make_data(b"https://visitme/", full), + matrix: make_data(b"xcm-matrix@server", full), + email: make_data(b"xcm-test@gmail.com", full), + pgp_fingerprint: Some(pgp_fingerprint), + image: make_data(b"xcm-test.png", full), + twitter: make_data(b"@xcm-test", full), + github, + discord, + }, + subs, + } + } +} + +#[derive(Clone, Debug)] +enum Subs { + Zero, + Many(u32), +} + +enum IdentityOn<'a> { + Relay(&'a IdentityInfo), + Para(&'a IdentityInfoParachain), +} + +impl IdentityOn<'_> { + fn calculate_deposit(self) -> Balance { + match self { + IdentityOn::Relay(id) => { + let base_deposit = BasicDeposit::get(); + let byte_deposit = + ByteDeposit::get() * TryInto::::try_into(id.encoded_size()).unwrap(); + base_deposit + byte_deposit + }, + IdentityOn::Para(id) => { + let base_deposit = BasicDepositParachain::get(); + let byte_deposit = ByteDepositParachain::get() * + TryInto::::try_into(id.encoded_size()).unwrap(); + base_deposit + byte_deposit + }, + } + } +} + +/// Generate an `AccountId32` from a `u32`. +/// This creates a 32-byte array, initially filled with `255`, and then repeatedly fills it +/// with the 4-byte little-endian representation of the `u32` value, until the array is full. +/// +/// **Example**: +/// +/// `account_from_u32(5)` will return an `AccountId32` with the bytes +/// `[0, 5, 0, 0, 0, 0, 0, 0, 0, 5 ... ]` +fn account_from_u32(id: u32) -> AccountId32 { + let mut buffer = [255u8; 32]; + let id_bytes = id.to_le_bytes(); + let id_size = id_bytes.len(); + for chunk in buffer.chunks_mut(id_size) { + chunk.clone_from_slice(&id_bytes); + } + AccountId32::new(buffer) +} + +// Initialize the XCM Check Account with the existential deposit. We assume that it exists in +// reality and is necessary in the test because the remote deposit is less than the ED, and we +// cannot teleport (check out) an amount less than ED into a nonexistent account. +fn init_check_account() { + PolkadotRelay::fund_accounts(vec![(CheckAccount::get(), EXISTENTIAL_DEPOSIT)]); +} + +// Set up the Relay Chain with an identity. +fn set_id_relay(id: &Identity) -> Balance { + let mut total_deposit: Balance = 0; + + // Set identity and Subs on Relay Chain + PolkadotRelay::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_ok!(PolkadotIdentity::set_identity( + PolkadotOrigin::signed(PolkadotRelaySender::get()), + Box::new(id.relay.clone()) + )); + + if let Subs::Many(n) = id.subs { + let subs: Vec<_> = (0..n) + .map(|i| (account_from_u32(i), Data::Raw(b"name".to_vec().try_into().unwrap()))) + .collect(); + + assert_ok!(PolkadotIdentity::set_subs( + PolkadotOrigin::signed(PolkadotRelaySender::get()), + subs, + )); + } + + let reserved_balance = PolkadotBalances::reserved_balance(PolkadotRelaySender::get()); + let id_deposit = IdentityOn::Relay(&id.relay).calculate_deposit(); + + let total_deposit = match id.subs { + Subs::Zero => { + total_deposit = id_deposit; // No subs + assert_expected_events!( + PolkadotRelay, + vec![ + RuntimeEvent::Identity(IdentityEvent::IdentitySet { .. }) => {}, + RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { + who: *who == PolkadotRelaySender::get(), + amount: *amount == id_deposit, + }, + ] + ); + total_deposit + }, + Subs::Many(n) => { + let sub_account_deposit = n as Balance * SubAccountDeposit::get(); + total_deposit = + sub_account_deposit + IdentityOn::Relay(&id.relay).calculate_deposit(); + assert_expected_events!( + PolkadotRelay, + vec![ + RuntimeEvent::Identity(IdentityEvent::IdentitySet { .. }) => {}, + RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { + who: *who == PolkadotRelaySender::get(), + amount: *amount == id_deposit, + }, + RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { + who: *who == PolkadotRelaySender::get(), + amount: *amount == sub_account_deposit, + }, + ] + ); + total_deposit + }, + }; + + assert_eq!(reserved_balance, total_deposit); + }); + total_deposit +} + +// Set up the parachain with an identity and (maybe) sub accounts, but with zero deposits. +fn assert_set_id_parachain(id: &Identity) { + // Set identity and Subs on Parachain with zero deposit + PeoplePolkadot::execute_with(|| { + let free_bal = PeoplePolkadotBalances::free_balance(PeoplePolkadotSender::get()); + let reserved_balance = + PeoplePolkadotBalances::reserved_balance(PeoplePolkadotSender::get()); + + // total balance at Genesis should be zero + assert_eq!(reserved_balance + free_bal, 0); + + assert_ok!(PeoplePolkadotIdentity::set_identity_no_deposit( + &PeoplePolkadotSender::get(), + id.para.clone(), + )); + + match id.subs { + Subs::Zero => {}, + Subs::Many(n) => { + let subs: Vec<_> = (0..n) + .map(|ii| { + (account_from_u32(ii), Data::Raw(b"name".to_vec().try_into().unwrap())) + }) + .collect(); + assert_ok!(PeoplePolkadotIdentity::set_subs_no_deposit( + &PeoplePolkadotSender::get(), + subs, + )); + }, + } + + // No amount should be reserved as deposit amounts are set to 0. + let reserved_balance = + PeoplePolkadotBalances::reserved_balance(PeoplePolkadotSender::get()); + assert_eq!(reserved_balance, 0); + assert!(PeoplePolkadotIdentity::identity(PeoplePolkadotSender::get()).is_some()); + + let (_, sub_accounts) = PeoplePolkadotIdentity::subs_of(PeoplePolkadotSender::get()); + + match id.subs { + Subs::Zero => assert_eq!(sub_accounts.len(), 0), + Subs::Many(n) => assert_eq!(sub_accounts.len(), n as usize), + } + }); +} + +// Reap the identity on the Relay Chain and assert that the correct things happen there. +fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { + PolkadotRelay::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + let free_bal_before_reap = PolkadotBalances::free_balance(PolkadotRelaySender::get()); + let reserved_balance = PolkadotBalances::reserved_balance(PolkadotRelaySender::get()); + + assert_eq!(reserved_balance, total_deposit); + + assert_ok!(PolkadotIdentityMigrator::reap_identity( + // Note: Root for launch testing, Signed once we open migrations. + // PolkadotOrigin::signed(PolkadotRelaySender::get()), + PolkadotOrigin::root(), + PolkadotRelaySender::get() + )); + + let remote_deposit = match id.subs { + Subs::Zero => calculate_remote_deposit(id.relay.encoded_size() as u32, 0), + Subs::Many(n) => calculate_remote_deposit(id.relay.encoded_size() as u32, n), + }; + + assert_expected_events!( + PolkadotRelay, + vec![ + // `reap_identity` sums the identity and subs deposits and unreserves them in one + // call. Therefore, we only expect one `Unreserved` event. + RuntimeEvent::Balances(BalancesEvent::Unreserved { who, amount }) => { + who: *who == PolkadotRelaySender::get(), + amount: *amount == total_deposit, + }, + RuntimeEvent::IdentityMigrator( + polkadot_runtime_common::identity_migrator::Event::IdentityReaped { + who, + }) => { + who: *who == PeoplePolkadotSender::get(), + }, + ] + ); + // Identity should be gone. + assert!(PeoplePolkadotIdentity::identity(PolkadotRelaySender::get()).is_none()); + + // Subs should be gone. + let (_, sub_accounts) = PolkadotIdentity::subs_of(PolkadotRelaySender::get()); + assert_eq!(sub_accounts.len(), 0); + + let reserved_balance = PolkadotBalances::reserved_balance(PolkadotRelaySender::get()); + assert_eq!(reserved_balance, 0); + + // Free balance should be greater (i.e. the teleport should work even if 100% of an + // account's balance is reserved for Identity). + let free_bal_after_reap = PolkadotBalances::free_balance(PolkadotRelaySender::get()); + assert!(free_bal_after_reap > free_bal_before_reap); + + // Implicit: total_deposit > remote_deposit. As in, accounts should always have enough + // reserved for the parachain deposit. + assert_eq!(free_bal_after_reap, free_bal_before_reap + total_deposit - remote_deposit); + }); +} + +// Reaping the identity on the Relay Chain will have sent an XCM program to the parachain. Ensure +// that everything happens as expected. +fn assert_reap_parachain(id: &Identity) { + PeoplePolkadot::execute_with(|| { + let reserved_balance = + PeoplePolkadotBalances::reserved_balance(PeoplePolkadotSender::get()); + let id_deposit = IdentityOn::Para(&id.para).calculate_deposit(); + let total_deposit = match id.subs { + Subs::Zero => id_deposit, + Subs::Many(n) => id_deposit + n as Balance * SubAccountDepositParachain::get(), + }; + assert_reap_events(id_deposit, id); + assert_eq!(reserved_balance, total_deposit); + + // Should have at least one ED after in free balance after the reap. + assert!( + PeoplePolkadotBalances::free_balance(PeoplePolkadotSender::get()) >= PEOPLE_KUSAMA_ED + ); + }); +} + +// Assert the events that should happen on the parachain upon reaping an identity on the Relay +// Chain. +fn assert_reap_events(id_deposit: Balance, id: &Identity) { + type RuntimeEvent = ::RuntimeEvent; + match id.subs { + Subs::Zero => { + assert_expected_events!( + PeoplePolkadot, + vec![ + // Deposit and Endowed from teleport + RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {}, + RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {}, + // Amount reserved for identity info + RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { + who: *who == PeoplePolkadotSender::get(), + amount: *amount == id_deposit, + }, + // Confirmation from Migrator with individual identity and subs deposits + RuntimeEvent::IdentityMigrator( + polkadot_runtime_common::identity_migrator::Event::DepositUpdated { + who, identity, subs + }) => { + who: *who == PeoplePolkadotSender::get(), + identity: *identity == id_deposit, + subs: *subs == 0, + }, + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { .. }) => {}, + ] + ); + }, + Subs::Many(n) => { + let subs_deposit = n as Balance * SubAccountDepositParachain::get(); + assert_expected_events!( + PeoplePolkadot, + vec![ + // Deposit and Endowed from teleport + RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {}, + RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {}, + // Amount reserved for identity info + RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { + who: *who == PeoplePolkadotSender::get(), + amount: *amount == id_deposit, + }, + // Amount reserved for subs + RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { + who: *who == PeoplePolkadotSender::get(), + amount: *amount == subs_deposit, + }, + // Confirmation from Migrator with individual identity and subs deposits + RuntimeEvent::IdentityMigrator( + polkadot_runtime_common::identity_migrator::Event::DepositUpdated { + who, identity, subs + }) => { + who: *who == PeoplePolkadotSender::get(), + identity: *identity == id_deposit, + subs: *subs == subs_deposit, + }, + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { .. }) => {}, + ] + ); + }, + }; +} + +/// Duplicate of the impl of `ToParachainIdentityReaper` in the Polkadot runtime. +fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { + // Note: These `deposit` functions and `EXISTENTIAL_DEPOSIT` correspond to the Relay Chain's. + // Pulled in: use polkadot_runtime_constants::currency::*; + let para_basic_deposit = deposit(1, 17) / 100; + let para_byte_deposit = deposit(0, 1) / 100; + let para_sub_account_deposit = deposit(1, 53) / 100; + let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10; + + // pallet deposits + let id_deposit = + para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance)); + let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance); + + id_deposit + .saturating_add(subs_deposit) + .saturating_add(para_existential_deposit.saturating_mul(2)) +} + +// Represent some `additional` data that would not be migrated to the parachain. The encoded size, +// and thus the byte deposit, should decrease. +fn nonsensical_additional() -> BoundedVec<(Data, Data), MaxAdditionalFields> { + BoundedVec::try_from(vec![( + Data::Raw(b"fOo".to_vec().try_into().unwrap()), + Data::Raw(b"baR".to_vec().try_into().unwrap()), + )]) + .unwrap() +} + +// Represent some `additional` data that will be migrated to the parachain as first-class fields. +fn meaningful_additional() -> BoundedVec<(Data, Data), MaxAdditionalFields> { + BoundedVec::try_from(vec![ + ( + Data::Raw(b"github".to_vec().try_into().unwrap()), + Data::Raw(b"niels-username".to_vec().try_into().unwrap()), + ), + ( + Data::Raw(b"discord".to_vec().try_into().unwrap()), + Data::Raw(b"bohr-username".to_vec().try_into().unwrap()), + ), + ]) + .unwrap() +} + +// Execute a single test case. +fn assert_relay_para_flow(id: &Identity) { + init_check_account(); + let total_deposit = set_id_relay(id); + assert_set_id_parachain(id); + assert_reap_id_relay(total_deposit, id); + assert_reap_parachain(id); +} + +// Tests with empty `IdentityInfo`. + +#[test] +fn on_reap_identity_works_for_minimal_identity_with_zero_subs() { + assert_relay_para_flow(&Identity::new(false, None, Subs::Zero)); +} + +#[test] +fn on_reap_identity_works_for_minimal_identity() { + assert_relay_para_flow(&Identity::new(false, None, Subs::Many(1))); +} + +#[test] +fn on_reap_identity_works_for_minimal_identity_with_max_subs() { + assert_relay_para_flow(&Identity::new(false, None, Subs::Many(MaxSubAccounts::get()))); +} + +// Tests with full `IdentityInfo`. + +#[test] +fn on_reap_identity_works_for_full_identity_no_additional_zero_subs() { + assert_relay_para_flow(&Identity::new(true, None, Subs::Zero)); +} + +#[test] +fn on_reap_identity_works_for_full_identity_no_additional() { + assert_relay_para_flow(&Identity::new(true, None, Subs::Many(1))); +} + +#[test] +fn on_reap_identity_works_for_full_identity_no_additional_max_subs() { + assert_relay_para_flow(&Identity::new(true, None, Subs::Many(MaxSubAccounts::get()))); +} + +// Tests with full `IdentityInfo` and `additional` fields that will _not_ be migrated. + +#[test] +fn on_reap_identity_works_for_full_identity_nonsense_additional_zero_subs() { + assert_relay_para_flow(&Identity::new(true, Some(nonsensical_additional()), Subs::Zero)); +} + +#[test] +fn on_reap_identity_works_for_full_identity_nonsense_additional() { + assert_relay_para_flow(&Identity::new(true, Some(nonsensical_additional()), Subs::Many(1))); +} + +#[test] +fn on_reap_identity_works_for_full_identity_nonsense_additional_max_subs() { + assert_relay_para_flow(&Identity::new( + true, + Some(nonsensical_additional()), + Subs::Many(MaxSubAccounts::get()), + )); +} + +// Tests with full `IdentityInfo` and `additional` fields that will be migrated. + +#[test] +fn on_reap_identity_works_for_full_identity_meaningful_additional_zero_subs() { + assert_relay_para_flow(&Identity::new(true, Some(meaningful_additional()), Subs::Zero)); +} + +#[test] +fn on_reap_identity_works_for_full_identity_meaningful_additional() { + assert_relay_para_flow(&Identity::new(true, Some(meaningful_additional()), Subs::Many(1))); +} + +#[test] +fn on_reap_identity_works_for_full_identity_meaningful_additional_max_subs() { + assert_relay_para_flow(&Identity::new( + true, + Some(meaningful_additional()), + Subs::Many(MaxSubAccounts::get()), + )); +} diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs new file mode 100644 index 0000000000..197979170c --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs @@ -0,0 +1,260 @@ +// 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 people_polkadot_runtime::xcm_config::XcmConfig as PeoplePolkadotXcmConfig; +use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(627_959_000, 7_200))); + + assert_expected_events!( + Polkadot, + vec![ + // Amount to teleport is withdrawn from Sender + RuntimeEvent::Balances(pallet_balances::Event::Burned { 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::Minted { 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(PeoplePolkadot::para_id()), + Some(Weight::from_parts(304_266_000, 7_186)), + ); + + assert_expected_events!( + Polkadot, + vec![ + // Amount is withdrawn from Relay Chain's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Burned { 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::Minted { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { + Polkadot::assert_ump_queue_processed( + false, + Some(PeoplePolkadot::para_id()), + Some(Weight::from_parts(157_718_000, 3_593)), + ); +} + +fn para_origin_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + PeoplePolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 600_000_000, + 7_000, + ))); + + PeoplePolkadot::assert_parachain_system_ump_sent(); + + assert_expected_events!( + PeoplePolkadot, + vec![ + // Amount is withdrawn from Sender's account + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_dest_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + PeoplePolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(162_456_000, 0))); + + assert_expected_events!( + PeoplePolkadot, + vec![ + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Minted { 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 dest = Polkadot::child_location_of(PeoplePolkadot::para_id()); + let beneficiary_id = PeoplePolkadotReceiver::get(); + let test_args = TestContext { + sender: PolkadotSender::get(), + receiver: PeoplePolkadotReceiver::get(), + args: TestArgs::new_relay(dest, beneficiary_id, 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 delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, 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(); + + let amount_to_send: Balance = PEOPLE_KUSAMA_ED * 1000; + let destination = PeoplePolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + // Fund a sender + PeoplePolkadot::fund_accounts(vec![(PeoplePolkadotSender::get(), KUSAMA_ED * 2_000u128)]); + + let test_args = TestContext { + sender: PeoplePolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + 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; + + let delivery_fees = PeoplePolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, 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 = KUSAMA_ED * 1000; + let destination = PeoplePolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + // Fund a sender + PeoplePolkadot::fund_accounts(vec![(PeoplePolkadotSender::get(), KUSAMA_ED * 2_000u128)]); + + let test_args = TestContext { + sender: PeoplePolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + 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; + + let delivery_fees = PeoplePolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} diff --git a/relay/polkadot/constants/src/lib.rs b/relay/polkadot/constants/src/lib.rs index 49cc6b3560..58254291f5 100644 --- a/relay/polkadot/constants/src/lib.rs +++ b/relay/polkadot/constants/src/lib.rs @@ -72,7 +72,7 @@ pub mod fee { /// The block saturation level. Fees will be updates based on this value. pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); - /// Cost of every transaction byte at Kusama relay chain. + /// Cost of every transaction byte at Polkadot relay chain. pub const TRANSACTION_BYTE_FEE: Balance = 10 * super::currency::MILLICENTS; /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the @@ -129,6 +129,8 @@ pub mod system_parachain { pub const COLLECTIVES_ID: u32 = 1001; /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; + /// People parachain ID. + pub const PEOPLE_ID: u32 = 1004; // System parachains from Polkadot point of view. pub type SystemParachains = IsChildSystemParachain; diff --git a/relay/polkadot/src/impls.rs b/relay/polkadot/src/impls.rs index 8d2d76d224..efce64c99a 100644 --- a/relay/polkadot/src/impls.rs +++ b/relay/polkadot/src/impls.rs @@ -15,10 +15,170 @@ // along with Polkadot. If not, see . use super::*; +use codec::{Decode, Encode}; use core::marker::PhantomData; -use frame_support::traits::{tokens::ConversionFromAssetBalance, Contains}; +use frame_support::{ + defensive, + pallet_prelude::DispatchResult, + traits::{tokens::ConversionFromAssetBalance, Contains}, +}; +use frame_system::RawOrigin; use polkadot_primitives::Id as ParaId; +use polkadot_runtime_common::identity_migrator::{OnReapIdentity, WeightInfo}; +use polkadot_runtime_constants::system_parachain::PEOPLE_ID; +use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::IsChildSystemParachain; +use xcm_executor::traits::TransactAsset; + +/// A type containing the encoding of the People Chain pallets in its runtime. Used to construct any +/// remote calls. The codec index must correspond to the index of `IdentityMigrator` in the +/// `construct_runtime` of the remote chain. +#[derive(Encode, Decode)] +enum PeopleRuntimePallets { + #[codec(index = 248)] + IdentityMigrator(IdentityMigratorCalls), +} + +/// Call encoding for the calls needed from the Identity Migrator pallet. +#[derive(Encode, Decode)] +enum IdentityMigratorCalls { + #[codec(index = 1)] + PokeDeposit(AccountId), +} + +/// Type that implements `OnReapIdentity` that will send the deposit needed to store the same +/// information on a parachain, sends the deposit there, and then updates it. +pub struct ToParachainIdentityReaper(PhantomData<(Runtime, AccountId)>); +impl ToParachainIdentityReaper { + /// Calculate the balance needed on the remote chain based on the `IdentityInfo` and `Subs` on + /// this chain. The total includes: + /// + /// - Identity basic deposit + /// - `IdentityInfo` byte deposit + /// - Sub accounts deposit + /// - 2x existential deposit (1 for account existence, 1 such that the user can transact) + fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { + // Remote deposit constants. Parachain uses `deposit / 100` + // Source: + // https://github.com/polkadot-fellows/runtimes/blob/b0a3eff/system-parachains/constants/src/polkadot.rs#L70 + // + // Parachain Deposit Configuration: + // + // pub const BasicDeposit: Balance = deposit(1, 17); + // pub const ByteDeposit: Balance = deposit(0, 1); + // pub const SubAccountDeposit: Balance = deposit(1, 53); + // pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10; + let para_basic_deposit = deposit(1, 17) / 100; + let para_byte_deposit = deposit(0, 1) / 100; + let para_sub_account_deposit = deposit(1, 53) / 100; + let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10; + + // pallet deposits + let id_deposit = + para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance)); + let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance); + + id_deposit + .saturating_add(subs_deposit) + .saturating_add(para_existential_deposit.saturating_mul(2)) + } +} + +// Note / Warning: This implementation should only be used in a transactional context. If not, then +// an error could result in assets being burned. +impl OnReapIdentity for ToParachainIdentityReaper +where + Runtime: frame_system::Config + pallet_xcm::Config, + AccountId: Into<[u8; 32]> + Clone + Encode, +{ + fn on_reap_identity(who: &AccountId, fields: u32, subs: u32) -> DispatchResult { + use crate::{ + impls::IdentityMigratorCalls::PokeDeposit, + weights::polkadot_runtime_common_identity_migrator::WeightInfo as MigratorWeights, + }; + + let total_to_send = Self::calculate_remote_deposit(fields, subs); + + // define asset / destination from relay perspective + let dot = Asset { id: AssetId(Here.into_location()), fun: Fungible(total_to_send) }; + // People Chain + let destination: Location = Location::new(0, Parachain(PEOPLE_ID)); + + // Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support + // unpaid teleports. + + // withdraw the asset from `who` + let who_origin = + Junction::AccountId32 { network: None, id: who.clone().into() }.into_location(); + let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&dot, &who_origin, None) + .map_err(|err| { + defensive!( + "runtime::on_reap_identity: withdraw_asset(what: {:?}, who_origin: {:?}) error: {:?}", + (&dot, &who_origin, err) + ); + pallet_xcm::Error::::LowBalance + })?; + + // check out + xcm_config::LocalAssetTransactor::can_check_out( + &destination, + &dot, + // not used in AssetTransactor + &XcmContext { origin: None, message_id: [0; 32], topic: None }, + ) + .map_err(|err| { + log::error!( + target: "runtime::on_reap_identity", + "can_check_out(destination: {:?}, asset: {:?}, _) error: {:?}", + destination, dot, err + ); + pallet_xcm::Error::::CannotCheckOutTeleport + })?; + xcm_config::LocalAssetTransactor::check_out( + &destination, + &dot, + // not used in AssetTransactor + &XcmContext { origin: None, message_id: [0; 32], topic: None }, + ); + + // reanchor + let dot_reanchored: Assets = + vec![Asset { id: AssetId(Location::new(1, Here)), fun: Fungible(total_to_send) }] + .into(); + + let poke = PeopleRuntimePallets::::IdentityMigrator(PokeDeposit(who.clone())); + let remote_weight_limit = MigratorWeights::::poke_deposit().saturating_mul(2); + + // Actual program to execute on People Chain. + let program: Xcm<()> = Xcm(vec![ + // Unpaid as this is constructed by the system, once per user. The user shouldn't have + // their balance reduced by teleport fees for the favor of migrating. + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + // Receive the asset into holding. + ReceiveTeleportedAsset(dot_reanchored), + // Deposit into the user's account. + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: Junction::AccountId32 { network: None, id: who.clone().into() } + .into_location(), + }, + // Poke the deposit to reserve the appropriate amount on the parachain. + Transact { + origin_kind: OriginKind::Superuser, + require_weight_at_most: remote_weight_limit, + call: poke.encode().into(), + }, + ]); + + // send + >::send( + RawOrigin::Root.into(), + Box::new(VersionedLocation::V4(destination)), + Box::new(VersionedXcm::V4(program)), + )?; + Ok(()) + } +} // TODO: replace by types from polkadot-sdk https://github.com/paritytech/polkadot-sdk/pull/3659 /// Determines if the given `asset_kind` is a native asset. If it is, returns the balance without @@ -56,3 +216,33 @@ where I::ensure_successful(asset_kind) } } + +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmarks { + use super::{xcm_config::CheckAccount, ExistentialDeposit}; + use crate::Balances; + use frame_support::{ + dispatch::RawOrigin, + traits::{Currency, EnsureOrigin}, + }; + + pub struct InitializeReaperForBenchmarking(core::marker::PhantomData<(A, E)>); + impl, O>> + From>, E: EnsureOrigin> + EnsureOrigin for InitializeReaperForBenchmarking + { + type Success = E::Success; + + fn try_origin(o: O) -> Result { + E::try_origin(o) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + // initialize the XCM Check Account with the existential deposit + Balances::make_free_balance_be(&CheckAccount::get(), ExistentialDeposit::get()); + + // call the real implementation + E::try_successful_origin() + } + } +} diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index b319487250..fb9f0d1b95 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -22,7 +22,7 @@ use pallet_transaction_payment::FungibleAdapter; use polkadot_runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, + auctions, claims, crowdloan, identity_migrator, impl_runtime_weights, impls::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, @@ -134,6 +134,8 @@ use governance::{ pub mod impls; pub mod xcm_config; +use impls::ToParachainIdentityReaper; + pub const LOG_TARGET: &str = "runtime::polkadot"; use polkadot_runtime_common as runtime_common; @@ -150,7 +152,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, @@ -175,16 +177,19 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } -/// A type to identify `identity::request_judgement` calls. -pub struct IsIdentityJudgementRequestCall; -impl Contains for IsIdentityJudgementRequestCall { +/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, +/// locking the state of the pallet and preventing further updates to identities and sub-identities. +/// The locked state will be the genesis state of a new system chain and then removed from the Relay +/// Chain. +pub struct IsIdentityCall; +impl Contains for IsIdentityCall { fn contains(c: &RuntimeCall) -> bool { - matches!(c, RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. })) + matches!(c, RuntimeCall::Identity(_)) } } impl frame_system::Config for Runtime { - type BaseCallFilter = EverythingBut; + type BaseCallFilter = EverythingBut; type BlockWeights = BlockWeights; type BlockLength = BlockLength; type RuntimeOrigin = RuntimeOrigin; @@ -852,6 +857,18 @@ impl pallet_identity::Config for Runtime { type WeightInfo = weights::pallet_identity::WeightInfo; } +impl identity_migrator::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + // To be updated to `EnsureSigned` once the parachain is producing blocks. + #[cfg(not(feature = "runtime-benchmarks"))] + type Reaper = EnsureRoot; + #[cfg(feature = "runtime-benchmarks")] + type Reaper = + impls::benchmarks::InitializeReaperForBenchmarking>; + type ReapIdentityHandler = ToParachainIdentityReaper; + type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; +} + parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 100 * DOLLARS; @@ -1062,7 +1079,7 @@ impl claims::Config for Runtime { type Prefix = Prefix; /// Only Root can move a claim. type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_claims::WeightInfo; } parameter_types! { @@ -1450,7 +1467,7 @@ impl paras_registrar::Config for Runtime { type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; type DataDepositPerByte = ParaDataByteDeposit; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_paras_registrar::WeightInfo; } parameter_types! { @@ -1471,7 +1488,7 @@ impl slots::Config for Runtime { type LeasePeriod = LeasePeriod; type LeaseOffset = LeaseOffset; type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_slots::WeightInfo; } parameter_types! { @@ -1495,7 +1512,7 @@ impl crowdloan::Config for Runtime { type Registrar = Registrar; type Auctioneer = Auctions; type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_crowdloan::WeightInfo; } parameter_types! { @@ -1514,7 +1531,7 @@ impl auctions::Config for Runtime { type SampleLength = SampleLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_auctions::WeightInfo; } parameter_types! { @@ -1759,6 +1776,9 @@ construct_runtime! { // refer to block. See issue #160 for details. Mmr: pallet_mmr = 201, BeefyMmrLeaf: pallet_beefy_mmr = 202, + + // Pallet for migrating Identity to a parachain. To be removed post-migration. + IdentityMigrator: identity_migrator = 248, } } @@ -1933,11 +1953,10 @@ pub type SignedPayload = generic::SignedPayload; mod benches { frame_benchmarking::define_benchmarks!( // Polkadot - // NOTE: Make sure to prefix these with `polkadot_runtime_common::` so - // the that path resolves correctly in the generated file. [polkadot_runtime_common::auctions, Auctions] [polkadot_runtime_common::claims, Claims] [polkadot_runtime_common::crowdloan, Crowdloan] + [polkadot_runtime_common::identity_migrator, IdentityMigrator] [polkadot_runtime_common::slots, Slots] [polkadot_runtime_common::paras_registrar, Registrar] [runtime_parachains::configuration, Configuration] diff --git a/relay/polkadot/src/weights/mod.rs b/relay/polkadot/src/weights/mod.rs index 2b5daffde6..c4d8c00b0d 100644 --- a/relay/polkadot/src/weights/mod.rs +++ b/relay/polkadot/src/weights/mod.rs @@ -42,11 +42,12 @@ pub mod pallet_utility; pub mod pallet_vesting; pub mod pallet_whitelist; pub mod pallet_xcm; -pub mod runtime_common_auctions; -pub mod runtime_common_claims; -pub mod runtime_common_crowdloan; -pub mod runtime_common_paras_registrar; -pub mod runtime_common_slots; +pub mod polkadot_runtime_common_auctions; +pub mod polkadot_runtime_common_claims; +pub mod polkadot_runtime_common_crowdloan; +pub mod polkadot_runtime_common_identity_migrator; +pub mod polkadot_runtime_common_paras_registrar; +pub mod polkadot_runtime_common_slots; pub mod runtime_parachains_configuration; pub mod runtime_parachains_disputes; pub mod runtime_parachains_disputes_slashing; diff --git a/relay/polkadot/src/weights/runtime_common_auctions.rs b/relay/polkadot/src/weights/polkadot_runtime_common_auctions.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_auctions.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_auctions.rs diff --git a/relay/polkadot/src/weights/runtime_common_claims.rs b/relay/polkadot/src/weights/polkadot_runtime_common_claims.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_claims.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_claims.rs diff --git a/relay/polkadot/src/weights/runtime_common_crowdloan.rs b/relay/polkadot/src/weights/polkadot_runtime_common_crowdloan.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_crowdloan.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_crowdloan.rs diff --git a/relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs b/relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs new file mode 100644 index 0000000000..60d22ae11c --- /dev/null +++ b/relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs @@ -0,0 +1,99 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `polkadot_runtime_common::identity_migrator` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=polkadot_runtime_common::identity_migrator +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./polkadot-weights/ +// --header=./file_header.txt + +#![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 `polkadot_runtime_common::identity_migrator`. +pub struct WeightInfo(PhantomData); +impl polkadot_runtime_common::identity_migrator::WeightInfo for WeightInfo { + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// 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`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 20]`. + /// The range of component `s` is `[0, 100]`. + fn reap_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7522 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `11037 + r * (7 ±0) + s * (32 ±0)` + // Minimum execution time: 176_411_000 picoseconds. + Weight::from_parts(182_882_369, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 1_902 + .saturating_add(Weight::from_parts(1_581_866, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(s.into())) + } + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + fn poke_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `7242` + // Estimated: `11037` + // Minimum execution time: 142_331_000 picoseconds. + Weight::from_parts(145_781_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/relay/polkadot/src/weights/runtime_common_paras_registrar.rs b/relay/polkadot/src/weights/polkadot_runtime_common_paras_registrar.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_paras_registrar.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_paras_registrar.rs diff --git a/relay/polkadot/src/weights/runtime_common_slots.rs b/relay/polkadot/src/weights/polkadot_runtime_common_slots.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_slots.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_slots.rs diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index d4a18b6bde..87fbd6560b 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -139,6 +139,8 @@ parameter_types! { pub DotForCollectives: (AssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); pub BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); pub DotForBridgeHub: (AssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); + pub People: Location = Parachain(PEOPLE_ID).into_location(); + pub DotForPeople: (AssetFilter, Location) = (Dot::get(), People::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -147,6 +149,7 @@ pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, xcm_builder::Case, + xcm_builder::Case, ); pub struct CollectivesOrFellows; diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index d0e57af886..76dfd29c59 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -139,7 +139,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("people-kusama"), impl_name: create_runtime_str!("people-kusama"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -565,12 +565,14 @@ mod benches { [frame_system, SystemBench::] [pallet_balances, Balances] [pallet_identity, Identity] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_proxy, Proxy] [pallet_session, SessionBench::] [pallet_timestamp, Timestamp] [pallet_utility, Utility] // Cumulus + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_collator_selection, CollatorSelection] // XCM diff --git a/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs index fcea5fd1bf..36014a287a 100644 --- a/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -1,11 +1,12 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// 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 +// 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, @@ -13,41 +14,61 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Need to rerun +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-kusama-weights/ +// --header=./file_header.txt #![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; /// Weight functions for `cumulus_pallet_parachain_system`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { - /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) - /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) - /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1) - /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue Pages (r:0 w:16) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `12` - // Estimated: `8013` - // Minimum execution time: 1_622_000 picoseconds. - Weight::from_parts(1_709_000, 0) - .saturating_add(Weight::from_parts(0, 8013)) - // Standard Error: 22_138 - .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(4)) + // Estimated: `3517` + // Minimum execution time: 2_110_000 picoseconds. + Weight::from_parts(2_210_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + // Standard Error: 53_320 + .saturating_add(Weight::from_parts(193_333_537, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } } diff --git a/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs b/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs index fe1911b77a..02ad58d0a2 100644 --- a/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs +++ b/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs @@ -1,11 +1,12 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// 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 +// 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, @@ -13,143 +14,169 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Need to rerun +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_message_queue +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-kusama-weights/ +// --header=./file_header.txt #![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; /// Weight functions for `pallet_message_queue`. pub struct WeightInfo(PhantomData); impl pallet_message_queue::WeightInfo for WeightInfo { - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `189` - // Estimated: `7534` - // Minimum execution time: 13_668_000 picoseconds. - Weight::from_parts(13_668_000, 0) - .saturating_add(Weight::from_parts(0, 7534)) + // Measured: `223` + // Estimated: `6044` + // Minimum execution time: 14_630_000 picoseconds. + Weight::from_parts(15_410_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `184` - // Estimated: `7534` - // Minimum execution time: 11_106_000 picoseconds. - Weight::from_parts(11_106_000, 0) - .saturating_add(Weight::from_parts(0, 7534)) + // Measured: `218` + // Estimated: `6044` + // Minimum execution time: 12_680_000 picoseconds. + Weight::from_parts(13_110_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3517` - // Minimum execution time: 4_921_000 picoseconds. - Weight::from_parts(4_921_000, 0) + // Minimum execution time: 4_340_000 picoseconds. + Weight::from_parts(4_470_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 6_879_000 picoseconds. - Weight::from_parts(6_879_000, 0) + // Minimum execution time: 6_730_000 picoseconds. + Weight::from_parts(6_990_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 7_564_000 picoseconds. - Weight::from_parts(7_564_000, 0) + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_190_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `MessageQueue::BookStateFor` (r:0 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_item() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 59_963_000 picoseconds. - Weight::from_parts(59_963_000, 0) + // Minimum execution time: 158_961_000 picoseconds. + Weight::from_parts(160_341_000, 0) .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:0) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:0) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `99` - // Estimated: `5007` - // Minimum execution time: 7_200_000 picoseconds. - Weight::from_parts(7_200_000, 0) - .saturating_add(Weight::from_parts(0, 5007)) + // Measured: `171` + // Estimated: `3517` + // Minimum execution time: 8_270_000 picoseconds. + Weight::from_parts(8_490_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: // Measured: `65667` - // Estimated: `72567` - // Minimum execution time: 41_366_000 picoseconds. - Weight::from_parts(41_366_000, 0) - .saturating_add(Weight::from_parts(0, 72567)) + // Estimated: `69050` + // Minimum execution time: 55_080_000 picoseconds. + Weight::from_parts(55_891_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: // Measured: `65667` - // Estimated: `72567` - // Minimum execution time: 60_538_000 picoseconds. - Weight::from_parts(60_538_000, 0) - .saturating_add(Weight::from_parts(0, 72567)) + // Estimated: `69050` + // Minimum execution time: 74_080_000 picoseconds. + Weight::from_parts(74_860_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: // Measured: `65667` - // Estimated: `72567` - // Minimum execution time: 73_665_000 picoseconds. - Weight::from_parts(73_665_000, 0) - .saturating_add(Weight::from_parts(0, 72567)) + // Estimated: `69050` + // Minimum execution time: 109_091_000 picoseconds. + Weight::from_parts(110_080_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/people/people-kusama/src/weights/xcm/mod.rs b/system-parachains/people/people-kusama/src/weights/xcm/mod.rs index 37ea90fa3b..73e55b8559 100644 --- a/system-parachains/people/people-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/people/people-kusama/src/weights/xcm/mod.rs @@ -59,10 +59,8 @@ impl XcmWeightInfo for PeopleKusamaXcmWeight { fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_assets(XcmFungibleWeight::::withdraw_asset()) } - // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &Assets) -> Weight { - // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_parts(1_000_000_000_u64, 0) + fn reserve_asset_deposited(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_assets(XcmFungibleWeight::::receive_teleported_asset()) diff --git a/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 56d42a7e27..61e9373bb5 100644 --- a/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -94,6 +94,16 @@ impl WeightInfo { .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`) + pub(crate) 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)) + } /// 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) diff --git a/system-parachains/people/people-polkadot/Cargo.toml b/system-parachains/people/people-polkadot/Cargo.toml new file mode 100644 index 0000000000..281c091473 --- /dev/null +++ b/system-parachains/people/people-polkadot/Cargo.toml @@ -0,0 +1,208 @@ +[package] +authors.workspace = true +build = "build.rs" +description = "Polkadot People Parachain Runtime" +edition.workspace = true +license.workspace = true +name = "people-polkadot-runtime" +repository.workspace = true +version.workspace = true + +[dependencies] +enumflags2 = { workspace = true } +serde = { optional = true, features = ["derive"], workspace = true } +codec = { features = ["derive", "max-encoded-len"], workspace = true } +hex-literal = { workspace = true } +log = { workspace = true } +scale-info = { features = ["derive"], workspace = true } + +# Substrate +frame-benchmarking = { optional = true, workspace = true } +frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { optional = true, workspace = true } +pallet-aura = { features = ["experimental"], workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-identity = { workspace = true } +pallet-message-queue = { workspace = true } +pallet-multisig = { workspace = true } +pallet-proxy = { workspace = true } +pallet-session = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-utility = { workspace = true } +sp-api = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-aura = { workspace = true } +sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } +sp-inherents = { workspace = true } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-storage = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } + +# Polkadot +pallet-xcm = { workspace = true } +pallet-xcm-benchmarks = { optional = true, workspace = true } +polkadot-parachain-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } +polkadot-runtime-constants = { workspace = true } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } + +# Cumulus +cumulus-primitives-aura = { workspace = true } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-parachain-system = { features = [ + "parameterized-consensus-hook", +], workspace = true } +cumulus-pallet-session-benchmarking = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-utility = { workspace = true } +pallet-collator-selection = { workspace = true } +parachain-info = { workspace = true } +parachains-common = { workspace = true } +system-parachains-constants = { workspace = true } + +[build-dependencies] +substrate-wasm-builder = { optional = true, workspace = true } + +[features] +default = ["std"] +std = [ + "codec/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-aura/std", + "cumulus-primitives-core/std", + "cumulus-primitives-utility/std", + "enumflags2/std", + "frame-benchmarking?/std", + "frame-executive/std", + "frame-metadata-hash-extension/std", + "frame-support/std", + "frame-system-benchmarking?/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime?/std", + "polkadot-runtime-constants/std", + "log/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-collator-selection/std", + "pallet-identity/std", + "pallet-message-queue/std", + "pallet-multisig/std", + "pallet-proxy/std", + "pallet-session/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-utility/std", + "pallet-xcm-benchmarks?/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std", + "scale-info/std", + "serde", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-storage/std", + "sp-transaction-pool/std", + "sp-version/std", + "substrate-wasm-builder", + "system-parachains-constants/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", +] + +runtime-benchmarks = [ + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-proxy/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", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", +] + +try-runtime = [ + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-identity/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", + "pallet-proxy/try-runtime", + "pallet-session/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-common/try-runtime", + "sp-runtime/try-runtime", +] + +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + +# A feature that should be enabled when the runtime should be built for on-chain +# deployment. This will disable stuff that shouldn't be part of the on-chain wasm +# to make it smaller, like logging for example. +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/people/people-polkadot/build.rs b/system-parachains/people/people-polkadot/build.rs new file mode 100644 index 0000000000..e65608baae --- /dev/null +++ b/system-parachains/people/people-polkadot/build.rs @@ -0,0 +1,29 @@ +// 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(all(feature = "std", not(feature = "metadata-hash")))] +fn main() { + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) + .build() +} + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs new file mode 100644 index 0000000000..fbd9b96d40 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -0,0 +1,995 @@ +// 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_attr(not(feature = "std"), no_std)] +#![recursion_limit = "256"] +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +pub mod people; +mod weights; +pub mod xcm_config; + +use codec::{Decode, Encode, MaxEncodedLen}; +use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; +use frame_support::{ + construct_runtime, derive_impl, + dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, + traits::{ + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains, + EitherOfDiverse, EverythingBut, InstanceFilter, TransformOrigin, + }, + weights::{ConstantMultiplier, Weight}, + PalletId, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + EnsureRoot, +}; +use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; +use parachains_common::{ + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, + AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, + HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, +}; +use polkadot_runtime_common::{identity_migrator, BlockHashCount, SlowAdjustingFeeUpdate}; +use sp_api::impl_runtime_apis; +pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{BlakeTwo256, Block as BlockT}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, RuntimeDebug, +}; +pub use sp_runtime::{MultiAddress, Perbill, Permill}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; +use system_parachains_constants::polkadot::{consensus::*, currency::*, fee::WeightToFee}; +use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; +use xcm::latest::prelude::BodyId; +use xcm_config::{ + FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, StakingPot, + XcmConfig, XcmOriginToTransactDispatchOrigin, +}; + +/// The address format for describing accounts. +pub type Address = MultiAddress; + +/// Block type as expected by this runtime. +pub type Block = generic::Block; + +/// A Block signed with an [`sp_runtime::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_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, +); + +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; + +/// Migrations to apply on runtime upgrade. +pub type Migrations = ( + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, +); + +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, +>; + +impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + } +} + +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("people-polkadot"), + impl_name: create_runtime_str!("people-polkadot"), + authoring_version: 1, + spec_version: 1_002_006, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 0, + state_version: 1, +}; + +/// 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! { + 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 = 0; +} + +/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, +/// locking the state of the pallet and preventing updates to identities until the chain is stable. +pub struct IsIdentityCall; +impl Contains for IsIdentityCall { + fn contains(c: &RuntimeCall) -> bool { + matches!(c, RuntimeCall::Identity(_)) + } +} + +#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type BaseCallFilter = EverythingBut; + type AccountId = AccountId; + type Nonce = Nonce; + type Hash = Hash; + type Block = Block; + type BlockHashCount = BlockHashCount; + type DbWeight = RocksDbWeight; + type Version = Version; + type AccountData = pallet_balances::AccountData; + type SystemWeightInfo = weights::frame_system::WeightInfo; + type SS58Prefix = SS58Prefix; + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = ConstU32<16>; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; + type WeightInfo = weights::pallet_timestamp::WeightInfo; +} + +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +parameter_types! { + pub const ExistentialDeposit: Balance = SYSTEM_PARA_EXISTENTIAL_DEPOSIT; +} + +impl pallet_balances::Config for Runtime { + type Balance = Balance; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = weights::pallet_balances::WeightInfo; + type MaxLocks = ConstU32<50>; + type MaxReserves = ConstU32<50>; + type ReserveIdentifier = [u8; 8]; + type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + /// Relay Chain `TransactionByteFee` / 10. + pub const TransactionByteFee: Balance = MILLICENTS; +} + +impl pallet_transaction_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = + pallet_transaction_payment::FungibleAdapter>; + type OperationalFeeMultiplier = ConstU8<5>; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; +} + +parameter_types! { + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + +impl cumulus_pallet_parachain_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = parachain_info::Pallet; + type OutboundXcmpMessageSource = XcmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; + type ConsensusHook = ConsensusHook; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; +} + +type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, +>; + +parameter_types! { + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< + cumulus_primitives_core::AggregateMessageOrigin, + >; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type WeightInfo = weights::pallet_message_queue::WeightInfo; +} + +impl parachain_info::Config for Runtime {} + +impl cumulus_pallet_aura_ext::Config for Runtime {} + +parameter_types! { + // Fellows pluralistic body. + pub const FellowsBodyId: BodyId = BodyId::Technical; +} + +/// Privileged origin that represents Root or Fellows pluralistic body. +pub type RootOrFellows = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, +>; + +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ChannelInfo = ParachainSystem; + type VersionWrapper = PolkadotXcm; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type ControllerOrigin = RootOrFellows; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; +} + +pub const PERIOD: u32 = 6 * HOURS; +pub const OFFSET: u32 = 0; + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions, ConstU32>; + type NextSessionRotation = pallet_session::PeriodicSessions, ConstU32>; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; +} + +impl pallet_aura::Config for Runtime { + type AuthorityId = AuraId; + type DisabledValidators = (); + type MaxAuthorities = ConstU32<100_000>; + type AllowMultipleBlocksPerSlot = ConstBool; + type SlotDuration = ConstU64; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const SessionLength: BlockNumber = 6 * HOURS; + // StakingAdmin pluralistic body. + pub const StakingAdminBodyId: BodyId = BodyId::Defense; +} + +/// We allow Root and the `StakingAdmin` to execute privileged collator selection operations. +pub type CollatorSelectionUpdateOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, +>; + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = CollatorSelectionUpdateOrigin; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = ConstU32; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = weights::pallet_collator_selection::WeightInfo; +} + +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = system_para_deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = system_para_deposit(0, 32); +} + +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = ConstU32<100>; + type WeightInfo = weights::pallet_multisig::WeightInfo; +} + +/// The type used to represent the kinds of proxying allowed. +#[derive( + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, +)] +pub enum ProxyType { + /// Fully permissioned proxy. Can execute any call on behalf of _proxied_. + Any, + /// Can execute any call that does not transfer funds or assets. + NonTransfer, + /// Proxy with the ability to reject time-delay proxy announcements. + CancelProxy, + /// Proxy for all Identity pallet calls. + Identity, + /// Proxy for identity registrars. + IdentityJudgement, + /// Collator selection proxy. Can execute calls related to collator selection mechanism. + Collator, +} +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 { .. } | + // `request_judgement` puts up a deposit to transfer to a registrar + RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. }) + ), + ProxyType::CancelProxy => matches!( + c, + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } + ), + ProxyType::Identity => { + matches!( + c, + RuntimeCall::Identity { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } + ) + }, + ProxyType::IdentityJudgement => matches!( + c, + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) | + RuntimeCall::Multisig { .. } + ), + ProxyType::Collator => matches!( + c, + RuntimeCall::CollatorSelection { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } + ), + } + } + + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::Identity, ProxyType::IdentityJudgement) => true, + (ProxyType::NonTransfer, ProxyType::IdentityJudgement) => true, + (ProxyType::NonTransfer, ProxyType::Collator) => true, + _ => false, + } + } +} + +parameter_types! { + // One storage item; key size 32, value size 8. + pub const ProxyDepositBase: Balance = system_para_deposit(1, 40); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = system_para_deposit(0, 33); + pub const MaxProxies: u16 = 32; + // One storage item; key size 32, value size 16. + pub const AnnouncementDepositBase: Balance = system_para_deposit(1, 48); + pub const AnnouncementDepositFactor: Balance = system_para_deposit(0, 66); + pub const MaxPending: u16 = 32; +} + +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; +} + +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; +} + +// To be removed after migration is complete. +impl identity_migrator::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reaper = EnsureRoot; + type ReapIdentityHandler = (); + type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; +} + +// Create the runtime by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime + { + // System support stuff. + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, + + // Monetary stuff. + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + + // Collator support. The order of these 5 are important and shall not change. + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, + + // XCM & related + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, + + // Handy utilities. + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, + Proxy: pallet_proxy = 42, + + // The main stage. + Identity: pallet_identity = 50, + + // To migrate deposits + IdentityMigrator: identity_migrator = 248, + } +); + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + frame_benchmarking::define_benchmarks!( + // Substrate + [frame_system, SystemBench::] + [pallet_balances, Balances] + [pallet_identity, Identity] + [pallet_message_queue, MessageQueue] + [pallet_multisig, Multisig] + [pallet_proxy, Proxy] + [pallet_session, SessionBench::] + [pallet_timestamp, Timestamp] + [pallet_utility, Utility] + // Polkadot + [polkadot_runtime_common::identity_migrator, IdentityMigrator] + // Cumulus + [cumulus_pallet_parachain_system, ParachainSystem] + [cumulus_pallet_xcmp_queue, XcmpQueue] + [pallet_collator_selection, CollatorSelection] + // XCM + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] + [pallet_xcm_benchmarks::fungible, XcmBalances] + [pallet_xcm_benchmarks::generic, XcmGeneric] + ); +} + +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 cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime { + fn can_build_upon( + included_hash: ::Hash, + slot: cumulus_primitives_aura::Slot, + ) -> bool { + ConsensusHook::can_build_upon(included_hash, slot) + } + } + + 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 pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { + ParachainSystem::collect_collation_info(header) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + 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).unwrap() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + + // This is defined once again in dispatch_benchmark, because list_benchmarks! + // and add_benchmarks! are macros exported by define_benchmarks! macros and those types + // are referenced in that call. + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + + let mut list = Vec::::new(); + list_benchmarks!(list, extra); + + let storage_info = AllPalletsWithSystem::storage_info(); + (list, storage_info) + } + + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } + + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + impl cumulus_pallet_session_benchmarking::Config for Runtime {} + + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { + // Relay/native token can be teleported between People and Relay. + Some(( + Asset { + fun: Fungible(SYSTEM_PARA_EXISTENTIAL_DEPOSIT), + id: AssetId(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { + None + } + + fn get_asset() -> Asset { + Asset { + id: AssetId(Location::parent()), + fun: Fungible(ExistentialDeposit::get()), + } + } + } + + use xcm::latest::prelude::*; + use xcm_config::{PriceForParentDelivery, RelayLocation}; + + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + RelayLocation::get(), + ExistentialDeposit::get() + ).into()); + } + + impl pallet_xcm_benchmarks::Config for Runtime { + type XcmConfig = XcmConfig; + type AccountIdConverter = xcm_config::LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn valid_destination() -> Result { + Ok(RelayLocation::get()) + } + fn worst_case_holding(_depositable_count: u32) -> Assets { + // just concrete assets according to relay chain. + let assets: Vec = vec![ + Asset { + id: AssetId(RelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + } + ]; + assets.into() + } + } + + parameter_types! { + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( + RelayLocation::get(), + Asset { fun: Fungible(UNITS), id: AssetId(RelayLocation::get()) }, + )); + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; + pub const TrustedReserve: Option<(Location, Asset)> = None; + } + + impl pallet_xcm_benchmarks::fungible::Config for Runtime { + type TransactAsset = Balances; + + type CheckedAccount = CheckedAccount; + type TrustedTeleporter = TrustedTeleporter; + type TrustedReserve = TrustedReserve; + + fn get_asset() -> Asset { + Asset { + id: AssetId(RelayLocation::get()), + fun: Fungible(UNITS), + } + } + } + + impl pallet_xcm_benchmarks::generic::Config for Runtime { + type RuntimeCall = RuntimeCall; + type TransactAsset = Balances; + + fn worst_case_response() -> (u64, Response) { + (0u64, Response::Version(Default::default())) + } + + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { + Ok((RelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + } + + fn subscribe_origin() -> Result { + Ok(RelayLocation::get()) + } + + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { + let origin = RelayLocation::get(); + let assets: Assets = (AssetId(RelayLocation::get()), 1_000 * UNITS).into(); + let ticket = Location::new(0, []); + Ok((origin, ticket, assets)) + } + + fn fee_asset() -> Result { + Ok(Asset { + id: AssetId(RelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn export_message_origin_and_destination( + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { + Err(BenchmarkError::Skip) + } + } + + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + + 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(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + add_benchmarks!(params, batches); + + Ok(batches) + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } +} + +cumulus_pallet_parachain_system::register_validate_block! { + Runtime = Runtime, + BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, +} + +#[test] +fn test_ed_is_one_tenth_of_relay() { + let relay_ed = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT; + let people_ed = ExistentialDeposit::get(); + assert_eq!(relay_ed / 10, people_ed); +} diff --git a/system-parachains/people/people-polkadot/src/people.rs b/system-parachains/people/people-polkadot/src/people.rs new file mode 100644 index 0000000000..5f260c9a3d --- /dev/null +++ b/system-parachains/people/people-polkadot/src/people.rs @@ -0,0 +1,229 @@ +// 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 super::*; +use crate::xcm_config::LocationToAccountId; +use codec::{Decode, Encode, MaxEncodedLen}; +use enumflags2::{bitflags, BitFlags}; +use frame_support::{ + parameter_types, CloneNoBound, EqNoBound, PartialEqNoBound, RuntimeDebugNoBound, +}; +use pallet_identity::{Data, IdentityInformationProvider}; +use parachains_common::{impls::ToParentTreasury, DAYS}; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{AccountIdConversion, Verify}, + RuntimeDebug, +}; +use sp_std::prelude::*; + +parameter_types! { + // 27 | Min encoded size of `Registration` + // - 10 | Min encoded size of `IdentityInfo` + // -----| + // 17 | Min size without `IdentityInfo` (accounted for in byte deposit) + pub const BasicDeposit: Balance = system_para_deposit(1, 17); + pub const ByteDeposit: Balance = system_para_deposit(0, 1); + pub const SubAccountDeposit: Balance = system_para_deposit(1, 53); + pub RelayTreasuryAccount: AccountId = + parachains_common::TREASURY_PALLET_ID.into_account_truncating(); +} + +impl pallet_identity::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = ConstU32<100>; + type IdentityInformation = IdentityInfo; + type MaxRegistrars = ConstU32<20>; + type Slashed = ToParentTreasury; + type ForceOrigin = EnsureRoot; + type RegistrarOrigin = EnsureRoot; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type WeightInfo = weights::pallet_identity::WeightInfo; +} + +/// The fields that we use to identify the owner of an account with. Each corresponds to a field +/// in the `IdentityInfo` struct. +#[bitflags] +#[repr(u64)] +#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug)] +pub enum IdentityField { + Display, + Legal, + Web, + Matrix, + Email, + PgpFingerprint, + Image, + Twitter, + GitHub, + Discord, +} + +/// Information concerning the identity of the controller of an account. +#[derive( + CloneNoBound, + Encode, + Decode, + EqNoBound, + MaxEncodedLen, + PartialEqNoBound, + RuntimeDebugNoBound, + TypeInfo, +)] +#[codec(mel_bound())] +pub struct IdentityInfo { + /// A reasonable display name for the controller of the account. This should be whatever the + /// account is typically known as and should not be confusable with other entities, given + /// reasonable context. + /// + /// Stored as UTF-8. + pub display: Data, + + /// The full legal name in the local jurisdiction of the entity. This might be a bit + /// long-winded. + /// + /// Stored as UTF-8. + pub legal: Data, + + /// A representative website held by the controller of the account. + /// + /// NOTE: `https://` is automatically prepended. + /// + /// Stored as UTF-8. + pub web: Data, + + /// The Matrix (e.g. for Element) handle held by the controller of the account. Previously, + /// this was called `riot`. + /// + /// Stored as UTF-8. + pub matrix: Data, + + /// The email address of the controller of the account. + /// + /// Stored as UTF-8. + pub email: Data, + + /// The PGP/GPG public key of the controller of the account. + pub pgp_fingerprint: Option<[u8; 20]>, + + /// A graphic image representing the controller of the account. Should be a company, + /// organization or project logo or a headshot in the case of a human. + pub image: Data, + + /// The Twitter identity. The leading `@` character may be elided. + pub twitter: Data, + + /// The GitHub username of the controller of the account. + pub github: Data, + + /// The Discord username of the controller of the account. + pub discord: Data, +} + +impl IdentityInformationProvider for IdentityInfo { + type FieldsIdentifier = u64; + + fn has_identity(&self, fields: Self::FieldsIdentifier) -> bool { + self.fields().bits() & fields == fields + } + + #[cfg(feature = "runtime-benchmarks")] + fn create_identity_info() -> Self { + let data = Data::Raw(vec![0; 32].try_into().unwrap()); + + IdentityInfo { + display: data.clone(), + legal: data.clone(), + web: data.clone(), + matrix: data.clone(), + email: data.clone(), + pgp_fingerprint: Some([0; 20]), + image: data.clone(), + twitter: data.clone(), + github: data.clone(), + discord: data, + } + } + + #[cfg(feature = "runtime-benchmarks")] + fn all_fields() -> Self::FieldsIdentifier { + use enumflags2::BitFlag; + IdentityField::all().bits() + } +} + +impl IdentityInfo { + pub(crate) fn fields(&self) -> BitFlags { + let mut res = >::empty(); + if !self.display.is_none() { + res.insert(IdentityField::Display); + } + if !self.legal.is_none() { + res.insert(IdentityField::Legal); + } + if !self.web.is_none() { + res.insert(IdentityField::Web); + } + if !self.matrix.is_none() { + res.insert(IdentityField::Matrix); + } + if !self.email.is_none() { + res.insert(IdentityField::Email); + } + if self.pgp_fingerprint.is_some() { + res.insert(IdentityField::PgpFingerprint); + } + if !self.image.is_none() { + res.insert(IdentityField::Image); + } + if !self.twitter.is_none() { + res.insert(IdentityField::Twitter); + } + if !self.github.is_none() { + res.insert(IdentityField::GitHub); + } + if !self.discord.is_none() { + res.insert(IdentityField::Discord); + } + res + } +} + +/// A `Default` identity. This is given to users who get a username but have not set an identity. +impl Default for IdentityInfo { + fn default() -> Self { + IdentityInfo { + display: Data::None, + legal: Data::None, + web: Data::None, + matrix: Data::None, + email: Data::None, + pgp_fingerprint: None, + image: Data::None, + twitter: Data::None, + github: Data::None, + discord: Data::None, + } + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/block_weights.rs b/system-parachains/people/people-polkadot/src/weights/block_weights.rs new file mode 100644 index 0000000000..b2092d875c --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/block_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// 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. + +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/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..f0637269b7 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,74 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `3517` + // Minimum execution time: 2_200_000 picoseconds. + Weight::from_parts(2_270_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + // Standard Error: 22_140 + .saturating_add(Weight::from_parts(182_153_021, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs new file mode 100644 index 0000000000..c0d6b4506b --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -0,0 +1,152 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_xcmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_xcmp_queue +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_config_with_u32() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 5_120_000 picoseconds. + Weight::from_parts(5_300_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn enqueue_xcmp_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `82` + // Estimated: `3517` + // Minimum execution time: 13_990_000 picoseconds. + Weight::from_parts(14_220_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 3_110_000 picoseconds. + Weight::from_parts(3_250_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_280_000 picoseconds. + Weight::from_parts(4_430_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_310_000 picoseconds. + Weight::from_parts(7_500_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65711` + // Estimated: `69176` + // Minimum execution time: 112_531_000 picoseconds. + Weight::from_parts(113_601_000, 0) + .saturating_add(Weight::from_parts(0, 69176)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 55_230_000 picoseconds. + Weight::from_parts(55_871_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs b/system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs new file mode 100644 index 0000000000..332c3b324b --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// 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. + +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/people/people-polkadot/src/weights/frame_system.rs b/system-parachains/people/people-polkadot/src/weights/frame_system.rs new file mode 100644 index 0000000000..cfbe22d34c --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/frame_system.rs @@ -0,0 +1,187 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_system`. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_140_000 picoseconds. + Weight::from_parts(2_220_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(352, 0).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3932160]`. + fn remark_with_event(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_690_000 picoseconds. + Weight::from_parts(5_780_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_694, 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_690_000 picoseconds. + Weight::from_parts(3_940_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: `127` + // Estimated: `1612` + // Minimum execution time: 118_903_125_000 picoseconds. + Weight::from_parts(123_147_987_000, 0) + .saturating_add(Weight::from_parts(0, 1612)) + .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: 2_200_000 picoseconds. + Weight::from_parts(2_280_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_823 + .saturating_add(Weight::from_parts(912_309, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_260_000 picoseconds. + Weight::from_parts(2_320_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 983 + .saturating_add(Weight::from_parts(663_398, 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: `76 + p * (69 ±0)` + // Estimated: `77 + p * (70 ±0)` + // Minimum execution time: 4_170_000 picoseconds. + Weight::from_parts(4_270_000, 0) + .saturating_add(Weight::from_parts(0, 77)) + // Standard Error: 1_414 + .saturating_add(Weight::from_parts(1_322_415, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) + } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_930_000 picoseconds. + Weight::from_parts(20_060_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `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 apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `149` + // Estimated: `1634` + // Minimum execution time: 116_622_483_000 picoseconds. + Weight::from_parts(119_357_067_000, 0) + .saturating_add(Weight::from_parts(0, 1634)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/mod.rs b/system-parachains/people/people-polkadot/src/weights/mod.rs new file mode 100644 index 0000000000..dce959e817 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/mod.rs @@ -0,0 +1,40 @@ +// 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. + +//! Expose the auto generated weight files. + +pub mod block_weights; +pub mod cumulus_pallet_parachain_system; +pub mod cumulus_pallet_xcmp_queue; +pub mod extrinsic_weights; +pub mod frame_system; +pub mod pallet_balances; +pub mod pallet_collator_selection; +pub mod pallet_identity; +pub mod pallet_message_queue; +pub mod pallet_multisig; +pub mod pallet_proxy; +pub mod pallet_session; +pub mod pallet_timestamp; +pub mod pallet_utility; +pub mod pallet_xcm; +pub mod paritydb_weights; +pub mod polkadot_runtime_common_identity_migrator; +pub mod rocksdb_weights; +pub mod xcm; + +pub use block_weights::constants::BlockExecutionWeight; +pub use extrinsic_weights::constants::ExtrinsicBaseWeight; +pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs b/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs new file mode 100644 index 0000000000..d9709cf621 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs @@ -0,0 +1,161 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_240_000 picoseconds. + Weight::from_parts(51_560_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: 40_040_000 picoseconds. + Weight::from_parts(40_511_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: `174` + // Estimated: `3593` + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_550_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: `174` + // Estimated: `3593` + // Minimum execution time: 21_570_000 picoseconds. + Weight::from_parts(21_891_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: 52_510_000 picoseconds. + Weight::from_parts(53_180_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: 50_210_000 picoseconds. + Weight::from_parts(50_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`) + fn force_unreserve() -> Weight { + // Proof Size summary in bytes: + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 19_360_000 picoseconds. + Weight::from_parts(19_930_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (136 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 17_250_000 picoseconds. + Weight::from_parts(17_370_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 12_266 + .saturating_add(Weight::from_parts(15_362_474, 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())) + } + /// Storage: `Balances::InactiveIssuance` (r:1 w:0) + /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 6_520_000 picoseconds. + Weight::from_parts(6_841_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs new file mode 100644 index 0000000000..7b199a29eb --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs @@ -0,0 +1,282 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_collator_selection +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_collator_selection`. +pub struct WeightInfo(PhantomData); +impl pallet_collator_selection::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:20 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 20]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `197 + b * (79 ±0)` + // Estimated: `1188 + b * (2555 ±0)` + // Minimum execution time: 14_190_000 picoseconds. + Weight::from_parts(10_937_805, 0) + .saturating_add(Weight::from_parts(0, 1188)) + // Standard Error: 8_677 + .saturating_add(Weight::from_parts(3_916_619, 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())) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, 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 `b` is `[1, 19]`. + /// The range of component `c` is `[1, 99]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `795 + b * (32 ±0) + c * (53 ±0)` + // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 43_670_000 picoseconds. + Weight::from_parts(43_035_011, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 5_966 + .saturating_add(Weight::from_parts(65_164, 0).saturating_mul(b.into())) + // Standard Error: 1_130 + .saturating_add(Weight::from_parts(85_765, 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())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[5, 20]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `119 + b * (32 ±0)` + // Estimated: `6287` + // Minimum execution time: 13_920_000 picoseconds. + Weight::from_parts(14_097_131, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 847 + .saturating_add(Weight::from_parts(71_905, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn set_desired_candidates() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_050_000 picoseconds. + Weight::from_parts(5_230_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 100]`. + /// The range of component `k` is `[0, 100]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + c * (182 ±0) + k * (115 ±0)` + // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` + // Minimum execution time: 11_310_000 picoseconds. + Weight::from_parts(11_580_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 180_859 + .saturating_add(Weight::from_parts(5_976_256, 0).saturating_mul(c.into())) + // Standard Error: 180_859 + .saturating_add(Weight::from_parts(5_764_922, 0).saturating_mul(k.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(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `319 + c * (49 ±0)` + // Estimated: `6287` + // Minimum execution time: 29_880_000 picoseconds. + Weight::from_parts(30_707_589, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 696 + .saturating_add(Weight::from_parts(71_379, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, 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 `[1, 99]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `765 + c * (52 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 40_610_000 picoseconds. + Weight::from_parts(42_206_170, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 581 + .saturating_add(Weight::from_parts(89_595, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `905 + c * (53 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 60_730_000 picoseconds. + Weight::from_parts(62_334_826, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 1_195 + .saturating_add(Weight::from_parts(94_762, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// 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 `[3, 100]`. + fn leave_intent(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `347 + c * (48 ±0)` + // Estimated: `6287` + // Minimum execution time: 32_510_000 picoseconds. + Weight::from_parts(33_664_142, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 793 + .saturating_add(Weight::from_parts(79_554, 0).saturating_mul(c.into())) + .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: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + fn note_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `155` + // Estimated: `6196` + // Minimum execution time: 45_790_000 picoseconds. + Weight::from_parts(46_310_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:97 w:97) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + /// The range of component `c` is `[1, 100]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` + // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` + // Minimum execution time: 22_290_000 picoseconds. + Weight::from_parts(22_510_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 319_996 + .saturating_add(Weight::from_parts(14_036_037, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into())) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_identity.rs b/system-parachains/people/people-polkadot/src/weights/pallet_identity.rs new file mode 100644 index 0000000000..58d787b57f --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_identity.rs @@ -0,0 +1,437 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_identity` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_identity +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_identity`. +pub struct WeightInfo(PhantomData); +impl pallet_identity::WeightInfo for WeightInfo { + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 19]`. + fn add_registrar(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `32 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 10_170_000 picoseconds. + Weight::from_parts(10_910_573, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_475 + .saturating_add(Weight::from_parts(77_036, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 20]`. + fn set_identity(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `442 + r * (5 ±0)` + // Estimated: `4303` + // Minimum execution time: 21_900_000 picoseconds. + Weight::from_parts(22_556_446, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_301 + .saturating_add(Weight::from_parts(73_485, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:100 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 100]`. + fn set_subs_new(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `6723 + s * (2589 ±0)` + // Minimum execution time: 11_530_000 picoseconds. + Weight::from_parts(26_340_120, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_559 + .saturating_add(Weight::from_parts(3_752_733, 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)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) + } + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 100]`. + fn set_subs_old(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `194 + p * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 11_440_000 picoseconds. + Weight::from_parts(26_469_985, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_423 + .saturating_add(Weight::from_parts(1_527_524, 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()))) + } + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[0, 100]`. + fn clear_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `534 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 32_480_000 picoseconds. + Weight::from_parts(34_550_972, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_821 + .saturating_add(Weight::from_parts(40_875, 0).saturating_mul(r.into())) + // Standard Error: 745 + .saturating_add(Weight::from_parts(1_506_296, 0).saturating_mul(s.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()))) + } + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 20]`. + fn request_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `432 + r * (57 ±0)` + // Estimated: `4303` + // Minimum execution time: 32_880_000 picoseconds. + Weight::from_parts(33_710_626, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_752 + .saturating_add(Weight::from_parts(83_866, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 20]`. + fn cancel_request(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `463` + // Estimated: `4303` + // Minimum execution time: 30_611_000 picoseconds. + Weight::from_parts(31_279_114, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_248 + .saturating_add(Weight::from_parts(51_954, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 19]`. + fn set_fee(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_660_000 picoseconds. + Weight::from_parts(8_100_141, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_070 + .saturating_add(Weight::from_parts(65_495, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 19]`. + fn set_account_id(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_690_000 picoseconds. + Weight::from_parts(8_386_766, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 1_018 + .saturating_add(Weight::from_parts(70_921, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 19]`. + fn set_fields(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_630_000 picoseconds. + Weight::from_parts(8_157_028, 0) + .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 993 + .saturating_add(Weight::from_parts(60_239, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 19]`. + fn provide_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `510 + r * (57 ±0)` + // Estimated: `4303` + // Minimum execution time: 23_890_000 picoseconds. + Weight::from_parts(24_425_598, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_271 + .saturating_add(Weight::from_parts(82_894, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// 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: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `773 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 98_811_000 picoseconds. + Weight::from_parts(102_874_545, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 8_216 + .saturating_add(Weight::from_parts(87_859, 0).saturating_mul(r.into())) + // Standard Error: 1_603 + .saturating_add(Weight::from_parts(1_538_729, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 99]`. + fn add_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `475 + s * (36 ±0)` + // Estimated: `6723` + // Minimum execution time: 30_600_000 picoseconds. + Weight::from_parts(35_674_099, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 1_256 + .saturating_add(Weight::from_parts(59_432, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 100]`. + fn rename_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `591 + s * (3 ±0)` + // Estimated: `4303` + // Minimum execution time: 15_420_000 picoseconds. + Weight::from_parts(17_843_179, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 610 + .saturating_add(Weight::from_parts(19_463, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 100]`. + fn remove_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `638 + s * (35 ±0)` + // Estimated: `6723` + // Minimum execution time: 34_870_000 picoseconds. + Weight::from_parts(38_098_506, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 753 + .saturating_add(Weight::from_parts(44_603, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 99]`. + fn quit_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `704 + s * (37 ±0)` + // Estimated: `6723` + // Minimum execution time: 25_940_000 picoseconds. + Weight::from_parts(28_496_293, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 766 + .saturating_add(Weight::from_parts(49_994, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn add_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_370_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn remove_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 10_340_000 picoseconds. + Weight::from_parts(10_680_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::PendingUsernames` (r:1 w:0) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + fn set_username_for() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `4303` + // Minimum execution time: 76_551_000 picoseconds. + Weight::from_parts(77_370_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + fn accept_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `4303` + // Minimum execution time: 23_930_000 picoseconds. + Weight::from_parts(24_590_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + fn remove_expired_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3550` + // Minimum execution time: 14_430_000 picoseconds. + Weight::from_parts(15_291_000, 0) + .saturating_add(Weight::from_parts(0, 3550)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:0) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + fn set_primary_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `258` + // Estimated: `4303` + // Minimum execution time: 20_460_000 picoseconds. + Weight::from_parts(20_770_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + fn remove_dangling_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `98` + // Estimated: `4303` + // Minimum execution time: 12_460_000 picoseconds. + Weight::from_parts(12_850_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..f91a576921 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,183 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_message_queue +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `223` + // Estimated: `6044` + // Minimum execution time: 14_810_000 picoseconds. + Weight::from_parts(15_050_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `218` + // Estimated: `6044` + // Minimum execution time: 12_990_000 picoseconds. + Weight::from_parts(13_270_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_460_000 picoseconds. + Weight::from_parts(4_550_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_770_000 picoseconds. + Weight::from_parts(6_890_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_090_000 picoseconds. + Weight::from_parts(7_170_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::BookStateFor` (r:0 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 155_941_000 picoseconds. + Weight::from_parts(157_871_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:0) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `171` + // Estimated: `3517` + // Minimum execution time: 8_390_000 picoseconds. + Weight::from_parts(8_780_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `69050` + // Minimum execution time: 55_421_000 picoseconds. + Weight::from_parts(56_290_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `69050` + // Minimum execution time: 74_790_000 picoseconds. + Weight::from_parts(75_821_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `69050` + // Minimum execution time: 107_001_000 picoseconds. + Weight::from_parts(107_981_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs b/system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs new file mode 100644 index 0000000000..ec3ea01a82 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs @@ -0,0 +1,162 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_multisig` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_multisig +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_multisig`. +pub struct WeightInfo(PhantomData); +impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 13_090_000 picoseconds. + Weight::from_parts(13_559_872, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(473, 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`) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `263 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 42_160_000 picoseconds. + Weight::from_parts(35_003_454, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 370 + .saturating_add(Weight::from_parts(78_069, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_465, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `282` + // Estimated: `6811` + // Minimum execution time: 27_510_000 picoseconds. + Weight::from_parts(20_107_020, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 385 + .saturating_add(Weight::from_parts(81_571, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_442, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `388 + s * (33 ±0)` + // Estimated: `6811` + // Minimum execution time: 47_311_000 picoseconds. + Weight::from_parts(37_786_802, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 447 + .saturating_add(Weight::from_parts(102_532, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_507, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `263 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 32_231_000 picoseconds. + Weight::from_parts(33_396_272, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 498 + .saturating_add(Weight::from_parts(83_284, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `282` + // Estimated: `6811` + // Minimum execution time: 17_960_000 picoseconds. + Weight::from_parts(18_711_852, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 424 + .saturating_add(Weight::from_parts(80_456, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `454 + s * (1 ±0)` + // Estimated: `6811` + // Minimum execution time: 33_150_000 picoseconds. + Weight::from_parts(34_338_146, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 534 + .saturating_add(Weight::from_parts(81_790, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs b/system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs new file mode 100644 index 0000000000..f0d4a05bd6 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs @@ -0,0 +1,223 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_proxy` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_proxy +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: 15_460_000 picoseconds. + Weight::from_parts(16_025_809, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 791 + .saturating_add(Weight::from_parts(31_899, 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: `454 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 39_530_000 picoseconds. + Weight::from_parts(39_017_116, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_364 + .saturating_add(Weight::from_parts(168_242, 0).saturating_mul(a.into())) + // Standard Error: 1_409 + .saturating_add(Weight::from_parts(40_679, 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: `369 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 27_260_000 picoseconds. + Weight::from_parts(27_734_700, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_166 + .saturating_add(Weight::from_parts(160_940, 0).saturating_mul(a.into())) + // Standard Error: 1_205 + .saturating_add(Weight::from_parts(1_830, 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: `369 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 27_110_000 picoseconds. + Weight::from_parts(27_556_536, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_131 + .saturating_add(Weight::from_parts(161_653, 0).saturating_mul(a.into())) + // Standard Error: 1_168 + .saturating_add(Weight::from_parts(5_215, 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: `386 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 35_810_000 picoseconds. + Weight::from_parts(35_426_638, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_167 + .saturating_add(Weight::from_parts(142_989, 0).saturating_mul(a.into())) + // Standard Error: 1_205 + .saturating_add(Weight::from_parts(34_318, 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: 25_710_000 picoseconds. + Weight::from_parts(26_128_239, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 867 + .saturating_add(Weight::from_parts(44_158, 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: 25_700_000 picoseconds. + Weight::from_parts(26_214_188, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 903 + .saturating_add(Weight::from_parts(51_793, 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: 23_280_000 picoseconds. + Weight::from_parts(23_861_316, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 851 + .saturating_add(Weight::from_parts(34_051, 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: 26_780_000 picoseconds. + Weight::from_parts(27_483_607, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 831 + .saturating_add(Weight::from_parts(9_777, 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: 24_090_000 picoseconds. + Weight::from_parts(24_764_858, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 771 + .saturating_add(Weight::from_parts(35_188, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_session.rs b/system-parachains/people/people-polkadot/src/weights/pallet_session.rs new file mode 100644 index 0000000000..dca8dd1b8f --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_session.rs @@ -0,0 +1,78 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_session` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_session +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_session`. +pub struct WeightInfo(PhantomData); +impl pallet_session::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:1 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_keys() -> Weight { + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3763` + // Minimum execution time: 19_851_000 picoseconds. + Weight::from_parts(20_160_000, 0) + .saturating_add(Weight::from_parts(0, 3763)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn purge_keys() -> Weight { + // Proof Size summary in bytes: + // Measured: `280` + // Estimated: `3745` + // Minimum execution time: 14_400_000 picoseconds. + Weight::from_parts(14_980_000, 0) + .saturating_add(Weight::from_parts(0, 3745)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs b/system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs new file mode 100644 index 0000000000..f42bac65d0 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs @@ -0,0 +1,72 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: `Aura::CurrentSlot` (r:1 w:0) + /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `49` + // Estimated: `1493` + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_290_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `57` + // Estimated: `0` + // Minimum execution time: 3_730_000 picoseconds. + Weight::from_parts(3_810_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_utility.rs b/system-parachains/people/people-polkadot/src/weights/pallet_utility.rs new file mode 100644 index 0000000000..0d29a06cd1 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_utility.rs @@ -0,0 +1,99 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: 4_840_000 picoseconds. + Weight::from_parts(19_759_881, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_783 + .saturating_add(Weight::from_parts(3_256_436, 0).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_690_000 picoseconds. + Weight::from_parts(4_810_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: 4_800_000 picoseconds. + Weight::from_parts(10_130_008, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 810 + .saturating_add(Weight::from_parts(3_493_316, 0).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_780_000 picoseconds. + Weight::from_parts(6_990_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: 4_770_000 picoseconds. + Weight::from_parts(9_219_590, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 902 + .saturating_add(Weight::from_parts(3_279_047, 0).saturating_mul(c.into())) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs b/system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..e1f6f855be --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs @@ -0,0 +1,343 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + /// 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 send() -> Weight { + // Proof Size summary in bytes: + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 22_770_000 picoseconds. + Weight::from_parts(23_410_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// 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 teleport_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 71_851_000 picoseconds. + Weight::from_parts(73_250_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn reserve_transfer_assets() -> 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)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_assets() -> 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)) + } + fn execute() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_670_000 picoseconds. + Weight::from_parts(8_910_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_xcm_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_690_000 picoseconds. + Weight::from_parts(7_971_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn force_default_xcm_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_670_000 picoseconds. + Weight::from_parts(2_770_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) + /// 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: `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: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_subscribe_version_notify() -> Weight { + // Proof Size summary in bytes: + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 29_420_000 picoseconds. + Weight::from_parts(30_080_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(7)) + .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: `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: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_unsubscribe_version_notify() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3720` + // Minimum execution time: 33_950_000 picoseconds. + Weight::from_parts(34_320_000, 0) + .saturating_add(Weight::from_parts(0, 3720)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) + /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn force_suspension() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_720_000 picoseconds. + Weight::from_parts(2_860_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_supported_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `89` + // Estimated: `13454` + // Minimum execution time: 21_080_000 picoseconds. + Weight::from_parts(21_380_000, 0) + .saturating_add(Weight::from_parts(0, 13454)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_version_notifiers() -> Weight { + // Proof Size summary in bytes: + // Measured: `93` + // Estimated: `13458` + // Minimum execution time: 21_130_000 picoseconds. + Weight::from_parts(21_671_000, 0) + .saturating_add(Weight::from_parts(0, 13458)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn already_notified_target() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `15946` + // Minimum execution time: 23_400_000 picoseconds. + Weight::from_parts(23_830_000, 0) + .saturating_add(Weight::from_parts(0, 15946)) + .saturating_add(T::DbWeight::get().reads(6)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`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::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 notify_current_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `6046` + // Minimum execution time: 29_080_000 picoseconds. + Weight::from_parts(29_690_000, 0) + .saturating_add(Weight::from_parts(0, 6046)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn notify_target_migration_fail() -> Weight { + // Proof Size summary in bytes: + // Measured: `136` + // Estimated: `11026` + // Minimum execution time: 13_850_000 picoseconds. + Weight::from_parts(14_260_000, 0) + .saturating_add(Weight::from_parts(0, 11026)) + .saturating_add(T::DbWeight::get().reads(4)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_version_notify_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `100` + // Estimated: `13465` + // Minimum execution time: 21_370_000 picoseconds. + Weight::from_parts(21_670_000, 0) + .saturating_add(Weight::from_parts(0, 13465)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`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::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 migrate_and_notify_old_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `13471` + // Minimum execution time: 39_450_000 picoseconds. + Weight::from_parts(39_870_000, 0) + .saturating_add(Weight::from_parts(0, 13471)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `32` + // Estimated: `1517` + // Minimum execution time: 4_710_000 picoseconds. + Weight::from_parts(4_850_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7669` + // Estimated: `11134` + // Minimum execution time: 32_190_000 picoseconds. + Weight::from_parts(32_650_000, 0) + .saturating_add(Weight::from_parts(0, 11134)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) + /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn claim_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 42_130_000 picoseconds. + Weight::from_parts(43_061_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs b/system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs new file mode 100644 index 0000000000..4338d928d8 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// 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. + +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/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs b/system-parachains/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs new file mode 100644 index 0000000000..bcd87b2cc1 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs @@ -0,0 +1,91 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `polkadot_runtime_common::identity_migrator` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=polkadot_runtime_common::identity_migrator +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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 `polkadot_runtime_common::identity_migrator`. +pub struct WeightInfo(PhantomData); +impl polkadot_runtime_common::identity_migrator::WeightInfo for WeightInfo { + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 20]`. + /// The range of component `s` is `[0, 100]`. + fn reap_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `741 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 36_130_000 picoseconds. + Weight::from_parts(38_663_715, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 4_799 + .saturating_add(Weight::from_parts(49_078, 0).saturating_mul(r.into())) + // Standard Error: 983 + .saturating_add(Weight::from_parts(1_498_325, 0).saturating_mul(s.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()))) + } + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + fn poke_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `706` + // Estimated: `6723` + // Minimum execution time: 51_511_000 picoseconds. + Weight::from_parts(52_060_000, 0) + .saturating_add(Weight::from_parts(0, 6723)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs b/system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs new file mode 100644 index 0000000000..1d115d963f --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// 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. + +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/people/people-polkadot/src/weights/xcm/mod.rs b/system-parachains/people/people-polkadot/src/weights/xcm/mod.rs new file mode 100644 index 0000000000..09214d2288 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/xcm/mod.rs @@ -0,0 +1,234 @@ +// 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. + +mod pallet_xcm_benchmarks_fungible; +mod pallet_xcm_benchmarks_generic; + +use crate::{xcm_config::MaxAssetsIntoHolding, Runtime}; +use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; +use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; + +trait WeighAssets { + fn weigh_assets(&self, weight: Weight) -> Weight; +} + +const MAX_ASSETS: u64 = 100; + +impl WeighAssets for AssetFilter { + fn weigh_assets(&self, weight: Weight) -> Weight { + match self { + Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64), + Self::Wild(asset) => match asset { + All => weight.saturating_mul(MAX_ASSETS), + AllOf { fun, .. } => match fun { + WildFungibility::Fungible => weight, + // Magic number 2 has to do with the fact that we could have up to 2 times + // MaxAssetsIntoHolding in the worst-case scenario. + WildFungibility::NonFungible => + weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), + }, + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + }, + } + } +} + +impl WeighAssets for Assets { + fn weigh_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().iter().count() as u64) + } +} + +pub struct PeoplePolkadotXcmWeight(core::marker::PhantomData); +impl XcmWeightInfo for PeoplePolkadotXcmWeight { + fn withdraw_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::withdraw_asset()) + } + fn reserve_asset_deposited(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::reserve_asset_deposited()) + } + fn receive_teleported_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::receive_teleported_asset()) + } + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() + } + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::transfer_asset()) + } + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::transfer_reserve_asset()) + } + fn transact( + _origin_type: &OriginKind, + _require_weight_at_most: &Weight, + _call: &DoubleEncoded, + ) -> Weight { + XcmGeneric::::transact() + } + fn hrmp_new_channel_open_request( + _sender: &u32, + _max_message_size: &u32, + _max_capacity: &u32, + ) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() + } + fn descend_origin(_who: &InteriorLocation) -> Weight { + XcmGeneric::::descend_origin() + } + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() + } + + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { + // Hardcoded till the XCM pallet is fixed + let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); + let weight = assets.weigh_assets(XcmFungibleWeight::::deposit_asset()); + hardcoded_weight.min(weight) + } + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::deposit_reserve_asset()) + } + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { + Weight::MAX + } + fn initiate_reserve_withdraw( + assets: &AssetFilter, + _reserve: &Location, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) + } + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::initiate_teleport()) + } + fn report_holding(_response_info: &QueryResponseInfo, _assets: &AssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { + XcmGeneric::::expect_transact_status() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX + } + fn lock_asset(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn unlock_asset(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn note_unlockable(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn request_unlock(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() + } + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() + } + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() + } + fn alias_origin(_: &Location) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX + } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs new file mode 100644 index 0000000000..0e88fdcd88 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -0,0 +1,196 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_xcm_benchmarks::fungible` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm_benchmarks::fungible +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --header=./file_header.txt + +#![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 WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + pub(crate) fn withdraw_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `3593` + // Minimum execution time: 33_500_000 picoseconds. + Weight::from_parts(34_110_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + pub(crate) fn transfer_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `153` + // Estimated: `6196` + // Minimum execution time: 46_640_000 picoseconds. + Weight::from_parts(47_210_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(crate) fn transfer_reserve_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `223` + // Estimated: `6196` + // Minimum execution time: 70_580_000 picoseconds. + Weight::from_parts(71_501_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`) + pub(crate) 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)) + } + /// 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(crate) fn initiate_reserve_withdraw() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 30_191_000 picoseconds. + Weight::from_parts(31_000_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn receive_teleported_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_620_000 picoseconds. + Weight::from_parts(3_760_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(crate) fn deposit_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 25_940_000 picoseconds. + Weight::from_parts(26_410_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .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: `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 deposit_reserve_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `122` + // Estimated: `3593` + // Minimum execution time: 58_880_000 picoseconds. + Weight::from_parts(60_061_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`) + pub(crate) fn initiate_teleport() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_220_000 picoseconds. + Weight::from_parts(25_890_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/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs new file mode 100644 index 0000000000..b87da9230b --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -0,0 +1,354 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_xcm_benchmarks::generic` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm_benchmarks::generic +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/xcm/pallet_xcm_benchmarks_generic.rs +// --header=./file_header.txt + +#![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 WeightInfo { + /// 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(crate) fn report_holding() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 29_021_000 picoseconds. + Weight::from_parts(29_450_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn buy_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_740_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:0) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn query_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `32` + // Estimated: `3497` + // Minimum execution time: 8_230_000 picoseconds. + Weight::from_parts(8_410_000, 0) + .saturating_add(Weight::from_parts(0, 3497)) + .saturating_add(T::DbWeight::get().reads(1)) + } + pub(crate) fn transact() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_080_000 picoseconds. + Weight::from_parts(8_320_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_470_000 picoseconds. + Weight::from_parts(2_570_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: 1_560_000 picoseconds. + Weight::from_parts(1_650_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: 1_560_000 picoseconds. + Weight::from_parts(1_650_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: 1_510_000 picoseconds. + Weight::from_parts(1_600_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: 1_660_000 picoseconds. + Weight::from_parts(1_760_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: 1_540_000 picoseconds. + Weight::from_parts(1_610_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(crate) fn report_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_160_000 picoseconds. + Weight::from_parts(26_070_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) + /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn claim_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 11_680_000 picoseconds. + Weight::from_parts(11_990_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + pub(crate) fn trap() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_630_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`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::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 subscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 23_610_000 picoseconds. + Weight::from_parts(24_350_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn unsubscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_960_000 picoseconds. + Weight::from_parts(4_140_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: 2_090_000 picoseconds. + Weight::from_parts(2_200_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: 1_710_000 picoseconds. + Weight::from_parts(1_820_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: 1_490_000 picoseconds. + Weight::from_parts(1_620_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: 1_530_000 picoseconds. + Weight::from_parts(1_620_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: 1_760_000 picoseconds. + Weight::from_parts(1_910_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(crate) fn query_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 29_350_000 picoseconds. + Weight::from_parts(29_990_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn expect_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_471_000 picoseconds. + Weight::from_parts(4_600_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(crate) fn report_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_621_000 picoseconds. + Weight::from_parts(26_120_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn clear_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_600_000 picoseconds. + Weight::from_parts(1_700_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: 1_540_000 picoseconds. + Weight::from_parts(1_630_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: 1_500_000 picoseconds. + Weight::from_parts(1_590_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: 1_550_000 picoseconds. + Weight::from_parts(1_610_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: 1_550_000 picoseconds. + Weight::from_parts(1_610_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/system-parachains/people/people-polkadot/src/xcm_config.rs b/system-parachains/people/people-polkadot/src/xcm_config.rs new file mode 100644 index 0000000000..099c56e123 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/xcm_config.rs @@ -0,0 +1,313 @@ +// 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 super::{ + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, + PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, +}; +use crate::{TransactionByteFee, CENTS}; +use frame_support::{ + parameter_types, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, +}; +use frame_system::EnsureRoot; +use pallet_xcm::XcmPassthrough; +use parachains_common::{ + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, + }, + TREASURY_PALLET_ID, +}; +use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_constants::system_parachain; +use sp_runtime::traits::AccountIdConversion; +use xcm::latest::prelude::*; +use xcm_builder::{ + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, + FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, +}; +use xcm_executor::{traits::ConvertLocation, XcmExecutor}; + +parameter_types! { + pub const RootLocation: Location = Location::here(); + pub const RelayLocation: Location = Location::parent(); + pub const RelayNetwork: Option = Some(NetworkId::Polkadot); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; + pub const GovernanceLocation: Location = Location::parent(); + pub FellowshipLocation: Location = Location::new(1, Parachain(system_parachain::COLLECTIVES_ID)); + /// The asset ID for the asset that we use to pay for message delivery fees. Just DOT. + pub FeeAssetId: AssetId = AssetId(RelayLocation::get()); + /// The base fee for the message delivery fees. + pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + pub RelayTreasuryLocation: Location = + (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); +} + +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + BaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + BaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; + +/// Type for specifying how a `Location` 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, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, +); + +/// Means for transacting the native currency on this chain. +pub type FungibleTransactor = FungibleAdapter< + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // Convert an XCM `Location` 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` that can +/// bias 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 that they control. + SovereignSignedViaLocation, + // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when + // recognized. + RelayChainAsNative, + // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when + // recognized. + 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, +); + +pub struct LocalPlurality; +impl Contains for LocalPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (0, [Plurality { .. }])) + } +} + +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } +} + +/// A location matching the Core Technical Fellowship. +pub struct FellowsPlurality; +impl Contains for FellowsPlurality { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + ( + 1, + [ + Parachain(system_parachain::COLLECTIVES_ID), + Plurality { id: BodyId::Technical, .. } + ] + ) + ) + } +} + +pub type Barrier = TrailingSetTopicAsId< + DenyThenTry< + DenyReserveTransferToRelayChain, + ( + // Allow local users to buy weight credit. + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // Parent and its pluralities (i.e. governance bodies) get free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + FellowsPlurality, + Equals, + )>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, + ), + >, +>; + +/// 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 = ( + RelayOrOtherSystemParachains, + Equals, + Equals, + FellowsPlurality, + LocalPlurality, +); + +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = FungibleTransactor; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + // People chain does not recognize a reserve location for any asset. Users must teleport DOT + // where allowed (e.g. with the Relay Chain). + type IsReserve = (); + /// Only allow teleportation of DOT. + type IsTeleporter = ConcreteAssetFromSystem; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = WeightInfoBounds< + crate::weights::xcm::PeoplePolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type Trader = UsingComponents< + WeightToFee, + RelayLocation, + AccountId, + Balances, + ResolveTo, + >; + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; +} + +/// Converts a local signed origin into an XCM location. 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<( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +)>; + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + // We want to disallow users sending (arbitrary) XCM programs from this chain. + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // Anyone can execute XCM messages locally. + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Everything; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location. + type Weigher = WeightInfoBounds< + crate::weights::xcm::PeoplePolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; + type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); +} + +impl cumulus_pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} + +#[test] +fn treasury_pallet_account_not_none() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} From 42db2ce076d35245de7b3b5c496338f95d2f42bc Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Thu, 13 Jun 2024 20:30:55 +0200 Subject: [PATCH 19/20] Trigger Release v1.2.6 (#349) Triggers the release of https://github.com/polkadot-fellows/runtimes/issues/344 for the Polkadot People launch. --- CHANGELOG.md | 11 ++++++++++- relay/kusama/src/lib.rs | 2 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 4 ++-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- .../collectives/collectives-polkadot/src/lib.rs | 2 +- system-parachains/coretime/coretime-kusama/src/lib.rs | 2 +- system-parachains/encointer/src/lib.rs | 2 +- system-parachains/gluttons/glutton-kusama/src/lib.rs | 2 +- 10 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4122bdd62b..1a49244ba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,16 @@ 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.2.6] 13.06.2024 + +Note: This release only affects the following runtimes and is not a full system release: + +- Polkadot Relay Chain +- Polkadot Asset Hub +- Polkadot People +- Kusama Relay Chain +- Kusama Asset Hub +- Kusama People ### Added diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 2c81b5268c..ded3ff7838 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -161,7 +161,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, 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 1e0ad3b0a3..6af57dad08 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -112,7 +112,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 15, @@ -128,7 +128,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 15, 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 3f5d1a65bb..e7de6ca0a8 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 15, 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 a12f23e4b3..a04370ad49 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -166,7 +166,7 @@ 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_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 5, 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 6c82529b91..0ca3bb2db0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -179,7 +179,7 @@ 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_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 4, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index d9fcdf62aa..22209336a1 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -115,7 +115,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 7, diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 2f0754ce62..4df9a13435 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -134,7 +134,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("coretime-kusama"), impl_name: create_runtime_str!("coretime-kusama"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 68389d8430..0bfa686116 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -125,7 +125,7 @@ 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_002_005, + spec_version: 1_002_006, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 4, diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 0431a2e0ce..82a33b746b 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -89,7 +89,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("glutton"), impl_name: create_runtime_str!("glutton"), authoring_version: 1, - spec_version: 1_002_005, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From cbef935ff419af523977f074957e1e741e945b0a Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:58:43 +0200 Subject: [PATCH 20/20] Polkadot People Phase 2 (Triggers Release 1.2.7) (#350) Phase 2 of the Polkadot People launch, as described in the [forum post](https://forum.polkadot.network/t/people-chain-launch-and-identity-migration-plan/5930). Should not be applied until the People Chain is running and deposits have been migrated from the Relay Chain. Built on top of https://github.com/polkadot-fellows/runtimes/pull/349 and should be merged after. --- CHANGELOG.md | 11 +++++++++++ .../people-polkadot/src/tests/reap_identity.rs | 3 +-- relay/polkadot/src/lib.rs | 8 +++++--- .../people/people-polkadot/src/lib.rs | 17 ++++------------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a49244ba0..2c1d8a0048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.2.7] 14.06.2024 + +Note: This release only affects the following runtimes and is not a full system release: + +- Polkadot Relay Chain +- Polkadot People + +### Changed + +- Updated Relay and People configurations to complete launch ([polkadot-fellows/runtimes#350](https://github.com/polkadot-fellows/runtimes/pull/350)) + ## [1.2.6] 13.06.2024 Note: This release only affects the following runtimes and is not a full system release: diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs index 18226fd901..fb67e9e0e1 100644 --- a/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs @@ -301,8 +301,7 @@ fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { assert_ok!(PolkadotIdentityMigrator::reap_identity( // Note: Root for launch testing, Signed once we open migrations. - // PolkadotOrigin::signed(PolkadotRelaySender::get()), - PolkadotOrigin::root(), + PolkadotOrigin::signed(PolkadotRelaySender::get()), PolkadotRelaySender::get() )); diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index fb9f0d1b95..a3826f1eac 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -136,6 +136,9 @@ pub mod xcm_config; use impls::ToParachainIdentityReaper; +#[cfg(not(feature = "runtime-benchmarks"))] +use frame_system::EnsureSigned; + pub const LOG_TARGET: &str = "runtime::polkadot"; use polkadot_runtime_common as runtime_common; @@ -152,7 +155,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 1_002_006, + spec_version: 1_002_007, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, @@ -859,9 +862,8 @@ impl pallet_identity::Config for Runtime { impl identity_migrator::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // To be updated to `EnsureSigned` once the parachain is producing blocks. #[cfg(not(feature = "runtime-benchmarks"))] - type Reaper = EnsureRoot; + type Reaper = EnsureSigned; #[cfg(feature = "runtime-benchmarks")] type Reaper = impls::benchmarks::InitializeReaperForBenchmarking>; diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs index fbd9b96d40..717c1f7b91 100644 --- a/system-parachains/people/people-polkadot/src/lib.rs +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -31,8 +31,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains, - EitherOfDiverse, EverythingBut, InstanceFilter, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -128,7 +128,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("people-polkadot"), impl_name: create_runtime_str!("people-polkadot"), authoring_version: 1, - spec_version: 1_002_006, + spec_version: 1_002_007, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, @@ -166,18 +166,9 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } -/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, -/// locking the state of the pallet and preventing updates to identities until the chain is stable. -pub struct IsIdentityCall; -impl Contains for IsIdentityCall { - fn contains(c: &RuntimeCall) -> bool { - matches!(c, RuntimeCall::Identity(_)) - } -} - #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type BaseCallFilter = EverythingBut; + type BaseCallFilter = Everything; type AccountId = AccountId; type Nonce = Nonce; type Hash = Hash;