mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Rococo & Westend People Chain (#2281)
Rococo and Westend runtimes for the "People Chain". This chain contains the Identity pallet with plans to migrate all related data from the Relay Chain. Changes `IdentityInfo` to: - Remove `additional_fields`. - Add `github` and `discord` as first class fields. From scraping chain data, these were the only two additional fields used (for the Fellowship and Ambassador Program, respectively). - Rename `riot` to `matrix`. Note: This will use the script in https://github.com/paritytech/polkadot-sdk/pull/2025 to generate the genesis state. TODO: - [x] https://github.com/paritytech/polkadot-sdk/pull/1814 and integration of the Identity Migrator pallet for migration. - [x] Tests: https://github.com/paritytech/polkadot-sdk/pull/2373 --------- Co-authored-by: Muharem <ismailov.m.h@gmail.com> Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: Dónal Murray <donal.murray@parity.io> Co-authored-by: Richard Melkonian <35300528+0xmovses@users.noreply.github.com> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
@@ -0,0 +1,195 @@
|
||||
[package]
|
||||
name = "people-rococo-runtime"
|
||||
version = "0.1.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Rococo's People parachain runtime"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder", optional = true }
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
||||
enumflags2 = { version = "0.7.7" }
|
||||
hex-literal = { version = "0.4.1" }
|
||||
log = { version = "0.4.20", default-features = false }
|
||||
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.171", optional = true, features = ["derive"] }
|
||||
smallvec = "1.11.0"
|
||||
|
||||
# Substrate
|
||||
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-executive = { path = "../../../../../substrate/frame/executive", default-features = false }
|
||||
frame-support = { path = "../../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../../substrate/frame/system", default-features = false }
|
||||
frame-system-benchmarking = { path = "../../../../../substrate/frame/system/benchmarking", default-features = false, optional = true }
|
||||
frame-system-rpc-runtime-api = { path = "../../../../../substrate/frame/system/rpc/runtime-api", default-features = false }
|
||||
frame-try-runtime = { path = "../../../../../substrate/frame/try-runtime", default-features = false, optional = true }
|
||||
pallet-aura = { path = "../../../../../substrate/frame/aura", default-features = false }
|
||||
pallet-authorship = { path = "../../../../../substrate/frame/authorship", default-features = false }
|
||||
pallet-balances = { path = "../../../../../substrate/frame/balances", default-features = false }
|
||||
pallet-identity = { path = "../../../../../substrate/frame/identity", default-features = false }
|
||||
pallet-message-queue = { path = "../../../../../substrate/frame/message-queue", default-features = false }
|
||||
pallet-multisig = { path = "../../../../../substrate/frame/multisig", default-features = false }
|
||||
pallet-session = { path = "../../../../../substrate/frame/session", default-features = false }
|
||||
pallet-timestamp = { path = "../../../../../substrate/frame/timestamp", default-features = false }
|
||||
pallet-transaction-payment = { path = "../../../../../substrate/frame/transaction-payment", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { path = "../../../../../substrate/frame/transaction-payment/rpc/runtime-api", default-features = false }
|
||||
pallet-utility = { path = "../../../../../substrate/frame/utility", default-features = false }
|
||||
sp-api = { path = "../../../../../substrate/primitives/api", default-features = false }
|
||||
sp-block-builder = { path = "../../../../../substrate/primitives/block-builder", default-features = false }
|
||||
sp-consensus-aura = { path = "../../../../../substrate/primitives/consensus/aura", default-features = false }
|
||||
sp-core = { path = "../../../../../substrate/primitives/core", default-features = false }
|
||||
sp-genesis-builder = { path = "../../../../../substrate/primitives/genesis-builder", default-features = false }
|
||||
sp-inherents = { path = "../../../../../substrate/primitives/inherents", default-features = false }
|
||||
sp-offchain = { path = "../../../../../substrate/primitives/offchain", default-features = false }
|
||||
sp-runtime = { path = "../../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-session = { path = "../../../../../substrate/primitives/session", default-features = false }
|
||||
sp-std = { path = "../../../../../substrate/primitives/std", default-features = false }
|
||||
sp-storage = { path = "../../../../../substrate/primitives/storage", default-features = false }
|
||||
sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-pool", default-features = false }
|
||||
sp-version = { path = "../../../../../substrate/primitives/version", default-features = false }
|
||||
|
||||
# Polkadot
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false }
|
||||
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false }
|
||||
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false }
|
||||
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false }
|
||||
rococo-runtime-constants = { path = "../../../../../polkadot/runtime/rococo/constants", default-features = false }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false }
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false }
|
||||
|
||||
# Cumulus
|
||||
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
|
||||
cumulus-pallet-dmp-queue = { path = "../../../../pallets/dmp-queue", default-features = false }
|
||||
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
|
||||
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }
|
||||
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
|
||||
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false }
|
||||
cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false }
|
||||
cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false }
|
||||
pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false }
|
||||
parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false }
|
||||
parachains-common = { path = "../../../common", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"cumulus-pallet-aura-ext/std",
|
||||
"cumulus-pallet-dmp-queue/std",
|
||||
"cumulus-pallet-parachain-system/std",
|
||||
"cumulus-pallet-session-benchmarking/std",
|
||||
"cumulus-pallet-xcm/std",
|
||||
"cumulus-pallet-xcmp-queue/std",
|
||||
"cumulus-primitives-core/std",
|
||||
"cumulus-primitives-utility/std",
|
||||
"enumflags2/std",
|
||||
"frame-benchmarking?/std",
|
||||
"frame-executive/std",
|
||||
"frame-support/std",
|
||||
"frame-system-benchmarking?/std",
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"frame-try-runtime?/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-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-core-primitives/std",
|
||||
"polkadot-parachain-primitives/std",
|
||||
"polkadot-runtime-common/std",
|
||||
"rococo-runtime-constants/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",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
|
||||
runtime-benchmarks = [
|
||||
"cumulus-pallet-dmp-queue/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-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-dmp-queue/try-runtime",
|
||||
"cumulus-pallet-parachain-system/try-runtime",
|
||||
"cumulus-pallet-xcm/try-runtime",
|
||||
"cumulus-pallet-xcmp-queue/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-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-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",
|
||||
]
|
||||
|
||||
experimental = ["pallet-aura/experimental"]
|
||||
@@ -0,0 +1,26 @@
|
||||
// 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(feature = "std")]
|
||||
fn main() {
|
||||
substrate_wasm_builder::WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
.import_memory()
|
||||
.build()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn main() {}
|
||||
@@ -0,0 +1,845 @@
|
||||
// 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 cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
|
||||
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::{
|
||||
ConstBool, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, EverythingBut,
|
||||
TransformOrigin,
|
||||
},
|
||||
weights::{ConstantMultiplier, Weight},
|
||||
PalletId,
|
||||
};
|
||||
use frame_system::{
|
||||
limits::{BlockLength, BlockWeights},
|
||||
EnsureRoot,
|
||||
};
|
||||
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use parachains_common::{
|
||||
impls::DealWithFees,
|
||||
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
|
||||
rococo::{consensus::*, currency::*, fee::WeightToFee},
|
||||
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::Block as BlockT,
|
||||
transaction_validity::{TransactionSource, TransactionValidity},
|
||||
ApplyExtrinsicResult,
|
||||
};
|
||||
pub use sp_runtime::{MultiAddress, Perbill, Permill};
|
||||
use sp_std::prelude::*;
|
||||
#[cfg(feature = "std")]
|
||||
use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
use xcm::latest::prelude::BodyId;
|
||||
use xcm_config::{
|
||||
FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, XcmConfig,
|
||||
XcmOriginToTransactDispatchOrigin,
|
||||
};
|
||||
|
||||
/// The address format for describing accounts.
|
||||
pub type Address = MultiAddress<AccountId, ()>;
|
||||
|
||||
/// Block type as expected by this runtime.
|
||||
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
|
||||
/// A Block signed with an [`sp_runtime::Justification`].
|
||||
pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
|
||||
/// BlockId type as expected by this runtime.
|
||||
pub type BlockId = generic::BlockId<Block>;
|
||||
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
frame_system::CheckNonZeroSender<Runtime>,
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
frame_system::CheckGenesis<Runtime>,
|
||||
frame_system::CheckEra<Runtime>,
|
||||
frame_system::CheckNonce<Runtime>,
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||
);
|
||||
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic =
|
||||
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||
|
||||
/// Migrations to apply on runtime upgrade.
|
||||
pub type Migrations = ();
|
||||
|
||||
/// Executive: handles dispatch to the various modules.
|
||||
pub type Executive = frame_executive::Executive<
|
||||
Runtime,
|
||||
Block,
|
||||
frame_system::ChainContext<Runtime>,
|
||||
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-rococo"),
|
||||
impl_name: create_runtime_str!("people-rococo"),
|
||||
authoring_version: 1,
|
||||
spec_version: 1_000,
|
||||
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 = 42;
|
||||
}
|
||||
|
||||
pub struct IdentityCalls;
|
||||
impl Contains<RuntimeCall> for IdentityCalls {
|
||||
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<IdentityCalls>;
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
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<Balance>;
|
||||
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
|
||||
type SS58Prefix = SS58Prefix;
|
||||
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
|
||||
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<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_authorship::Config for Runtime {
|
||||
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
|
||||
type EventHandler = (CollatorSelection,);
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const ExistentialDeposit: Balance = 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<Runtime>;
|
||||
type MaxLocks = ConstU32<50>;
|
||||
type MaxReserves = ConstU32<50>;
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type RuntimeFreezeReason = RuntimeFreezeReason;
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
type FreezeIdentifier = ();
|
||||
type MaxHolds = ConstU32<0>;
|
||||
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::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||
type OperationalFeeMultiplier = ConstU8<5>;
|
||||
type WeightToFee = WeightToFee;
|
||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
|
||||
}
|
||||
|
||||
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<Runtime>;
|
||||
type OutboundXcmpMessageSource = XcmpQueue;
|
||||
type DmpQueue = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
|
||||
type ReservedDmpWeight = ReservedDmpWeight;
|
||||
type XcmpMessageHandler = XcmpQueue;
|
||||
type ReservedXcmpWeight = ReservedXcmpWeight;
|
||||
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;
|
||||
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
|
||||
Runtime,
|
||||
RELAY_CHAIN_SLOT_DURATION_MILLIS,
|
||||
BLOCK_PROCESSING_VELOCITY,
|
||||
UNINCLUDED_SEGMENT_CAPACITY,
|
||||
>;
|
||||
type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
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<XcmConfig>,
|
||||
RuntimeCall,
|
||||
>;
|
||||
type Size = u32;
|
||||
// The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin:
|
||||
type QueueChangeHandler = NarrowOriginToSibling<XcmpQueue>;
|
||||
type QueuePausedQuery = NarrowOriginToSibling<XcmpQueue>;
|
||||
type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>;
|
||||
type MaxStale = sp_core::ConstU32<8>;
|
||||
type ServiceWeight = MessageQueueServiceWeight;
|
||||
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
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<AccountId>,
|
||||
EnsureXcm<IsVoiceOfBody<FellowshipLocation, FellowsBodyId>>,
|
||||
>;
|
||||
|
||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ChannelInfo = ParachainSystem;
|
||||
type VersionWrapper = PolkadotXcm;
|
||||
type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
|
||||
type MaxInboundSuspended = sp_core::ConstU32<1_000>;
|
||||
type ControllerOrigin = RootOrFellows;
|
||||
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||
type PriceForSiblingDelivery = PriceForSiblingParachainDelivery;
|
||||
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
pub const PERIOD: u32 = 6 * HOURS;
|
||||
pub const OFFSET: u32 = 0;
|
||||
|
||||
impl pallet_session::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ValidatorId = <Self as frame_system::Config>::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<PERIOD>, ConstU32<OFFSET>>;
|
||||
type NextSessionRotation = pallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type SessionManager = CollatorSelection;
|
||||
// Essentially just Aura, but let's be pedantic.
|
||||
type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
|
||||
type Keys = SessionKeys;
|
||||
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_aura::Config for Runtime {
|
||||
type AuthorityId = AuraId;
|
||||
type DisabledValidators = ();
|
||||
type MaxAuthorities = ConstU32<100_000>;
|
||||
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||
#[cfg(feature = "experimental")]
|
||||
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
|
||||
}
|
||||
|
||||
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<AccountId>,
|
||||
EnsureXcm<IsVoiceOfBody<GovernanceLocation, StakingAdminBodyId>>,
|
||||
>;
|
||||
|
||||
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<PERIOD>;
|
||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||
type ValidatorRegistration = Session;
|
||||
type WeightInfo = weights::pallet_collator_selection::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
// One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
|
||||
pub const DepositBase: Balance = deposit(1, 88);
|
||||
// Additional storage item size of 32 bytes.
|
||||
pub const DepositFactor: Balance = deposit(0, 32);
|
||||
}
|
||||
|
||||
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<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_utility::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type PalletsOrigin = OriginCaller;
|
||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
// To be removed after migration is complete.
|
||||
impl identity_migrator::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Reaper = EnsureRoot<AccountId>;
|
||||
type ReapIdentityHandler = ();
|
||||
type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
construct_runtime!(
|
||||
pub enum Runtime
|
||||
{
|
||||
// System support stuff.
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
|
||||
ParachainSystem: cumulus_pallet_parachain_system::{
|
||||
Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
|
||||
} = 1,
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
|
||||
ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 3,
|
||||
|
||||
// Monetary stuff.
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
|
||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
|
||||
|
||||
// Collator support. The order of these 5 are important and shall not change.
|
||||
Authorship: pallet_authorship::{Pallet, Storage} = 20,
|
||||
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
|
||||
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
|
||||
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
|
||||
|
||||
// XCM & related
|
||||
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
|
||||
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
|
||||
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
|
||||
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 34,
|
||||
|
||||
// Handy utilities.
|
||||
Utility: pallet_utility::{Pallet, Call, Event} = 40,
|
||||
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 41,
|
||||
|
||||
// The main stage.
|
||||
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 50,
|
||||
|
||||
// To migrate deposits
|
||||
IdentityMigrator: identity_migrator::{Pallet, Call, Event<T>} = 248,
|
||||
}
|
||||
);
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
#[macro_use]
|
||||
extern crate frame_benchmarking;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benches {
|
||||
define_benchmarks!(
|
||||
// Substrate
|
||||
[frame_system, SystemBench::<Runtime>]
|
||||
[pallet_balances, Balances]
|
||||
[pallet_identity, Identity]
|
||||
[pallet_multisig, Multisig]
|
||||
[pallet_session, SessionBench::<Runtime>]
|
||||
[pallet_utility, Utility]
|
||||
[pallet_timestamp, Timestamp]
|
||||
// Polkadot
|
||||
[polkadot_runtime_common::identity_migrator, IdentityMigrator]
|
||||
// Cumulus
|
||||
[cumulus_pallet_xcmp_queue, XcmpQueue]
|
||||
[pallet_collator_selection, CollatorSelection]
|
||||
// XCM
|
||||
[pallet_xcm, PalletXcmExtrinsiscsBenchmark::<Runtime>]
|
||||
[pallet_xcm_benchmarks::fungible, XcmBalances]
|
||||
[pallet_xcm_benchmarks::generic, XcmGeneric]
|
||||
);
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
|
||||
fn slot_duration() -> sp_consensus_aura::SlotDuration {
|
||||
sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())
|
||||
}
|
||||
|
||||
fn authorities() -> Vec<AuraId> {
|
||||
Aura::authorities().into_inner()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block)
|
||||
}
|
||||
|
||||
fn initialize_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialize_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
OpaqueMetadata::new(Runtime::metadata().into())
|
||||
}
|
||||
|
||||
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
|
||||
Runtime::metadata_at_version(version)
|
||||
}
|
||||
|
||||
fn metadata_versions() -> sp_std::vec::Vec<u32> {
|
||||
Runtime::metadata_versions()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_block_builder::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
|
||||
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::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<Block> for Runtime {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(header: &<Block as BlockT>::Header) {
|
||||
Executive::offchain_worker(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_session::SessionKeys<Block> for Runtime {
|
||||
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
|
||||
SessionKeys::generate(seed)
|
||||
}
|
||||
|
||||
fn decode_session_keys(
|
||||
encoded: Vec<u8>,
|
||||
) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {
|
||||
SessionKeys::decode_into_raw_public_keys(&encoded)
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_info(uxt, len)
|
||||
}
|
||||
fn query_fee_details(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
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<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
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<Block> for Runtime {
|
||||
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
|
||||
ParachainSystem::collect_collation_info(header)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> 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<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
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::<Runtime>;
|
||||
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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<u8>) -> 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::<Runtime>::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 {
|
||||
fn reachable_dest() -> Option<MultiLocation> {
|
||||
Some(Parent.into())
|
||||
}
|
||||
|
||||
fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> {
|
||||
// Relay/native token can be teleported between People and Relay.
|
||||
Some((
|
||||
MultiAsset {
|
||||
fun: Fungible(EXISTENTIAL_DEPOSIT),
|
||||
id: Concrete(Parent.into())
|
||||
},
|
||||
Parent.into(),
|
||||
))
|
||||
}
|
||||
|
||||
fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_config::{PriceForParentDelivery, RelayLocation};
|
||||
|
||||
parameter_types! {
|
||||
pub ExistentialDepositMultiAsset: Option<MultiAsset> = 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,
|
||||
ExistentialDepositMultiAsset,
|
||||
PriceForParentDelivery,
|
||||
>;
|
||||
fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
|
||||
Ok(RelayLocation::get())
|
||||
}
|
||||
fn worst_case_holding(_depositable_count: u32) -> MultiAssets {
|
||||
// just concrete assets according to relay chain.
|
||||
let assets: Vec<MultiAsset> = vec![
|
||||
MultiAsset {
|
||||
id: Concrete(RelayLocation::get()),
|
||||
fun: Fungible(1_000_000 * UNITS),
|
||||
}
|
||||
];
|
||||
assets.into()
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some((
|
||||
RelayLocation::get(),
|
||||
MultiAsset { fun: Fungible(UNITS), id: Concrete(RelayLocation::get()) },
|
||||
));
|
||||
pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None;
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
|
||||
}
|
||||
|
||||
impl pallet_xcm_benchmarks::fungible::Config for Runtime {
|
||||
type TransactAsset = Balances;
|
||||
|
||||
type CheckedAccount = CheckedAccount;
|
||||
type TrustedTeleporter = TrustedTeleporter;
|
||||
type TrustedReserve = TrustedReserve;
|
||||
|
||||
fn get_multi_asset() -> MultiAsset {
|
||||
MultiAsset {
|
||||
id: Concrete(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<(MultiAssets, MultiAssets), BenchmarkError> {
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> {
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> {
|
||||
Ok((RelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into()))
|
||||
}
|
||||
|
||||
fn subscribe_origin() -> Result<MultiLocation, BenchmarkError> {
|
||||
Ok(RelayLocation::get())
|
||||
}
|
||||
|
||||
fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> {
|
||||
let origin = RelayLocation::get();
|
||||
let assets: MultiAssets = (Concrete(RelayLocation::get()), 1_000 * UNITS).into();
|
||||
let ticket = MultiLocation { parents: 0, interior: Here };
|
||||
Ok((origin, ticket, assets))
|
||||
}
|
||||
|
||||
fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn export_message_origin_and_destination(
|
||||
) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> {
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> {
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
}
|
||||
|
||||
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
|
||||
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = 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::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
add_benchmarks!(params, batches);
|
||||
|
||||
Ok(batches)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn create_default_config() -> Vec<u8> {
|
||||
create_default_config::<RuntimeGenesisConfig>()
|
||||
}
|
||||
|
||||
fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_config::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cumulus_pallet_parachain_system::register_validate_block! {
|
||||
Runtime = Runtime,
|
||||
BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
// 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, traits::ConstU32, CloneNoBound, EqNoBound, PartialEqNoBound,
|
||||
RuntimeDebugNoBound,
|
||||
};
|
||||
use pallet_identity::{Data, IdentityInformationProvider};
|
||||
use parachains_common::impls::ToParentTreasury;
|
||||
use scale_info::TypeInfo;
|
||||
use sp_runtime::{traits::AccountIdConversion, 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 = deposit(1, 17);
|
||||
pub const ByteDeposit: Balance = deposit(0, 1);
|
||||
pub const SubAccountDeposit: Balance = deposit(1, 53);
|
||||
pub RelayTreasuryAccount: AccountId =
|
||||
parachains_common::polkadot::account::POLKADOT_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<RelayTreasuryAccount, LocationToAccountId, Runtime>;
|
||||
type ForceOrigin = EnsureRoot<Self::AccountId>;
|
||||
type RegistrarOrigin = EnsureRoot<Self::AccountId>;
|
||||
type WeightInfo = weights::pallet_identity::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
/// 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())]
|
||||
#[cfg_attr(test, derive(frame_support::DefaultNoBound))]
|
||||
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<IdentityField> {
|
||||
let mut res = <BitFlags<IdentityField>>::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
|
||||
}
|
||||
}
|
||||
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
// 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.
|
||||
|
||||
//! Need to rerun
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `cumulus_pallet_parachain_system`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> cumulus_pallet_parachain_system::WeightInfo for WeightInfo<T> {
|
||||
/// 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)
|
||||
/// 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))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
// 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.
|
||||
|
||||
//! Need to rerun
|
||||
|
||||
#![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<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
|
||||
/// 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_000_000 picoseconds.
|
||||
Weight::from_parts(6_000_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: 14_000_000 picoseconds.
|
||||
Weight::from_parts(15_000_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_000_000 picoseconds.
|
||||
Weight::from_parts(3_000_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_000_000 picoseconds.
|
||||
Weight::from_parts(4_000_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: 44_000_000 picoseconds.
|
||||
Weight::from_parts(45_000_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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: 67_000_000 picoseconds.
|
||||
Weight::from_parts(73_000_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)
|
||||
fn on_idle_large_msg() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `65710`
|
||||
// Estimated: `69175`
|
||||
// Minimum execution time: 49_000_000 picoseconds.
|
||||
Weight::from_parts(55_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69175))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `frame_system`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=frame_system
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/frame_system.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `frame_system`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
|
||||
/// 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_356_000 picoseconds.
|
||||
Weight::from_parts(1_100_689, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 0
|
||||
.saturating_add(Weight::from_parts(412, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// The range of component `b` is `[0, 3932160]`.
|
||||
fn remark_with_event(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_879_000 picoseconds.
|
||||
Weight::from_parts(8_041_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 0
|
||||
.saturating_add(Weight::from_parts(1_451, 0).saturating_mul(b.into()))
|
||||
}
|
||||
fn set_code() -> Weight {
|
||||
Weight::from_parts(1_000_000, 0)
|
||||
}
|
||||
/// Storage: System Digest (r:1 w:1)
|
||||
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: unknown `0x3a686561707061676573` (r:0 w:1)
|
||||
/// Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1)
|
||||
fn set_heap_pages() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 4_358_000 picoseconds.
|
||||
Weight::from_parts(4_537_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1485))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Skipped Metadata (r:0 w:0)
|
||||
/// Proof Skipped: 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_373_000 picoseconds.
|
||||
Weight::from_parts(2_395_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_727
|
||||
.saturating_add(Weight::from_parts(690_266, 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: 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_513_000 picoseconds.
|
||||
Weight::from_parts(2_540_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 815
|
||||
.saturating_add(Weight::from_parts(505_090, 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: 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: `68 + p * (69 ±0)`
|
||||
// Estimated: `66 + p * (70 ±0)`
|
||||
// Minimum execution time: 4_242_000 picoseconds.
|
||||
Weight::from_parts(4_308_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 66))
|
||||
// Standard Error: 1_130
|
||||
.saturating_add(Weight::from_parts(1_032_054, 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: 33_027_000 picoseconds.
|
||||
Weight::from_parts(33_027_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: `System::Digest` (r:1 w:1)
|
||||
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
|
||||
fn apply_authorized_upgrade() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `22`
|
||||
// Estimated: `1518`
|
||||
// Minimum execution time: 118_101_992_000 picoseconds.
|
||||
Weight::from_parts(118_101_992_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1518))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
@@ -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_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 paritydb_weights::constants::ParityDbWeight;
|
||||
pub use rocksdb_weights::constants::RocksDbWeight;
|
||||
@@ -0,0 +1,150 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_balances
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_balances.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
/// 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: 63_775_000 picoseconds.
|
||||
Weight::from_parts(64_181_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: 47_986_000 picoseconds.
|
||||
Weight::from_parts(48_308_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: 18_083_000 picoseconds.
|
||||
Weight::from_parts(18_380_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: 26_341_000 picoseconds.
|
||||
Weight::from_parts(26_703_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: 66_227_000 picoseconds.
|
||||
Weight::from_parts(67_321_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: 59_472_000 picoseconds.
|
||||
Weight::from_parts(60_842_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: 21_497_000 picoseconds.
|
||||
Weight::from_parts(21_684_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: System Account (r:999 w:999)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// The range of component `u` is `[1, 1000]`.
|
||||
fn upgrade_accounts(u: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + u * (136 ±0)`
|
||||
// Estimated: `990 + u * (2603 ±0)`
|
||||
// Minimum execution time: 20_385_000 picoseconds.
|
||||
Weight::from_parts(20_587_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 10_001
|
||||
.saturating_add(Weight::from_parts(16_801_557, 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()))
|
||||
}
|
||||
}
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_collator_selection`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_collator_selection
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_collator_selection.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_collator_selection`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Session NextKeys (r:100 w:0)
|
||||
/// Proof Skipped: 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(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// The range of component `b` is `[1, 100]`.
|
||||
fn set_invulnerables(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `214 + b * (78 ±0)`
|
||||
// Estimated: `1203 + b * (2554 ±0)`
|
||||
// Minimum execution time: 14_702_000 picoseconds.
|
||||
Weight::from_parts(14_995_989, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1203))
|
||||
// Standard Error: 2_975
|
||||
.saturating_add(Weight::from_parts(2_630_139, 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, 2554).saturating_mul(b.into()))
|
||||
}
|
||||
/// 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: 6_916_000 picoseconds.
|
||||
Weight::from_parts(7_224_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||
fn set_candidacy_bond(_c: u32, _k: u32) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_388_000 picoseconds.
|
||||
Weight::from_parts(7_677_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: CollatorSelection Candidates (r:1 w:1)
|
||||
/// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, 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: CollatorSelection Invulnerables (r:1 w:0)
|
||||
/// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// Storage: Session NextKeys (r:1 w:0)
|
||||
/// Proof Skipped: 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, 999]`.
|
||||
fn register_as_candidate(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1104 + c * (48 ±0)`
|
||||
// Estimated: `49487 + c * (49 ±0)`
|
||||
// Minimum execution time: 42_377_000 picoseconds.
|
||||
Weight::from_parts(34_785_115, 0)
|
||||
.saturating_add(Weight::from_parts(0, 49487))
|
||||
// Standard Error: 1_226
|
||||
.saturating_add(Weight::from_parts(101_867, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: CollatorSelection Candidates (r:1 w:1)
|
||||
/// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, 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 `[6, 1000]`.
|
||||
fn leave_intent(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `428 + c * (48 ±0)`
|
||||
// Estimated: `49487`
|
||||
// Minimum execution time: 33_648_000 picoseconds.
|
||||
Weight::from_parts(24_533_176, 0)
|
||||
.saturating_add(Weight::from_parts(0, 49487))
|
||||
// Standard Error: 1_388
|
||||
.saturating_add(Weight::from_parts(103_733, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: 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: 44_705_000 picoseconds.
|
||||
Weight::from_parts(45_288_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Session NextKeys (r:1 w:0)
|
||||
/// Proof Skipped: 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 Candidates (r:1 w:1)
|
||||
/// Proof: CollatorSelection Candidates (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: `757 + b * (32 ±0) + c * (53 ±0)`
|
||||
// Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
|
||||
// Minimum execution time: 52_720_000 picoseconds.
|
||||
Weight::from_parts(56_102_459, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 12_957
|
||||
.saturating_add(Weight::from_parts(26_422, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 2_456
|
||||
.saturating_add(Weight::from_parts(128_528, 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()))
|
||||
}
|
||||
fn update_bond(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `306 + c * (50 ±0)`
|
||||
// Estimated: `6287`
|
||||
// Minimum execution time: 34_814_000 picoseconds.
|
||||
Weight::from_parts(36_371_520, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_391
|
||||
.saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
fn take_candidate_slot(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `306 + c * (50 ±0)`
|
||||
// Estimated: `6287`
|
||||
// Minimum execution time: 34_814_000 picoseconds.
|
||||
Weight::from_parts(36_371_520, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_391
|
||||
.saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: CollatorSelection Invulnerables (r:1 w:1)
|
||||
/// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
|
||||
/// The range of component `b` is `[1, 100]`.
|
||||
fn remove_invulnerable(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `119 + b * (32 ±0)`
|
||||
// Estimated: `4687`
|
||||
// Minimum execution time: 183_054_000 picoseconds.
|
||||
Weight::from_parts(197_205_427, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4687))
|
||||
// Standard Error: 13_533
|
||||
.saturating_add(Weight::from_parts(376_231, 0).saturating_mul(b.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: CollatorSelection Candidates (r:1 w:0)
|
||||
/// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen)
|
||||
/// Storage: CollatorSelection LastAuthoredBlock (r:999 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(3202), added: 3697, 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:995 w:995)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 1000]`.
|
||||
/// The range of component `c` is `[1, 1000]`.
|
||||
fn new_session(r: u32, c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `22815 + c * (97 ±0) + r * (116 ±0)`
|
||||
// Estimated: `49487 + c * (2519 ±0) + r * (2602 ±0)`
|
||||
// Minimum execution time: 16_845_000 picoseconds.
|
||||
Weight::from_parts(16_962_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 49487))
|
||||
// Standard Error: 858_960
|
||||
.saturating_add(Weight::from_parts(30_464_644, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.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, 2602).saturating_mul(r.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,315 @@
|
||||
// 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.
|
||||
|
||||
//! Taken from Rococo Relay Chain. Needs to rerun.
|
||||
|
||||
#![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<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
|
||||
/// 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: 12_290_000 picoseconds.
|
||||
Weight::from_parts(12_664_362, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_347
|
||||
.saturating_add(Weight::from_parts(88_179, 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(7538), added: 10013, 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: `11003`
|
||||
// Minimum execution time: 31_373_000 picoseconds.
|
||||
Weight::from_parts(30_435_545, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 2_307
|
||||
.saturating_add(Weight::from_parts(92_753, 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(7538), added: 10013, 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: `11003 + s * (2589 ±0)`
|
||||
// Minimum execution time: 9_251_000 picoseconds.
|
||||
Weight::from_parts(22_039_210, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 40_779
|
||||
.saturating_add(Weight::from_parts(2_898_525, 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(7538), added: 10013, 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: `11003`
|
||||
// Minimum execution time: 9_329_000 picoseconds.
|
||||
Weight::from_parts(24_055_061, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 3_428
|
||||
.saturating_add(Weight::from_parts(1_130_604, 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(7538), added: 10013, 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: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 53_365_000 picoseconds.
|
||||
Weight::from_parts(35_391_422, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 1_353
|
||||
.saturating_add(Weight::from_parts(1_074_019, 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(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
fn request_judgement(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `367 + r * (57 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 32_509_000 picoseconds.
|
||||
Weight::from_parts(31_745_585, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 2_214
|
||||
.saturating_add(Weight::from_parts(83_822, 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(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
fn cancel_request(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `398 + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 29_609_000 picoseconds.
|
||||
Weight::from_parts(28_572_602, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 2_528
|
||||
.saturating_add(Weight::from_parts(85_593, 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_793_000 picoseconds.
|
||||
Weight::from_parts(8_173_888, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_569
|
||||
.saturating_add(Weight::from_parts(72_367, 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_708_000 picoseconds.
|
||||
Weight::from_parts(8_091_149, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 869
|
||||
.saturating_add(Weight::from_parts(87_993, 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_601_000 picoseconds.
|
||||
Weight::from_parts(8_038_414, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_041
|
||||
.saturating_add(Weight::from_parts(82_588, 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(7538), added: 10013, mode: MaxEncodedLen)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn provide_judgement(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `445 + r * (57 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 23_114_000 picoseconds.
|
||||
Weight::from_parts(22_076_548, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 2_881
|
||||
.saturating_add(Weight::from_parts(109_812, 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(7538), added: 10013, 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: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 70_007_000 picoseconds.
|
||||
Weight::from_parts(50_186_495, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 6_533
|
||||
.saturating_add(Weight::from_parts(15_486, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 1_275
|
||||
.saturating_add(Weight::from_parts(1_085_117, 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(7538), added: 10013, 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: `11003`
|
||||
// Minimum execution time: 28_453_000 picoseconds.
|
||||
Weight::from_parts(33_165_934, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 1_217
|
||||
.saturating_add(Weight::from_parts(65_401, 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(7538), added: 10013, 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: `11003`
|
||||
// Minimum execution time: 12_846_000 picoseconds.
|
||||
Weight::from_parts(14_710_284, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 496
|
||||
.saturating_add(Weight::from_parts(19_539, 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(7538), added: 10013, 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: `11003`
|
||||
// Minimum execution time: 32_183_000 picoseconds.
|
||||
Weight::from_parts(35_296_731, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 854
|
||||
.saturating_add(Weight::from_parts(52_028, 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: 24_941_000 picoseconds.
|
||||
Weight::from_parts(27_433_059, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6723))
|
||||
// Standard Error: 856
|
||||
.saturating_add(Weight::from_parts(57_463, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
// 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.
|
||||
|
||||
//! Need to rerun
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_message_queue`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
|
||||
/// 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))
|
||||
.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: `184`
|
||||
// Estimated: `7534`
|
||||
// Minimum execution time: 11_106_000 picoseconds.
|
||||
Weight::from_parts(11_106_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7534))
|
||||
.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_921_000 picoseconds.
|
||||
Weight::from_parts(4_921_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_879_000 picoseconds.
|
||||
Weight::from_parts(6_879_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_564_000 picoseconds.
|
||||
Weight::from_parts(7_564_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69050))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
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)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// 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))
|
||||
.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: `72567`
|
||||
// Minimum execution time: 41_366_000 picoseconds.
|
||||
Weight::from_parts(41_366_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 72567))
|
||||
.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: `72567`
|
||||
// Minimum execution time: 60_538_000 picoseconds.
|
||||
Weight::from_parts(60_538_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 72567))
|
||||
.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: `72567`
|
||||
// Minimum execution time: 73_665_000 picoseconds.
|
||||
Weight::from_parts(73_665_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 72567))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_multisig`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_multisig
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_multisig.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_multisig`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
|
||||
/// 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: 11_056_000 picoseconds.
|
||||
Weight::from_parts(11_510_137, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1
|
||||
.saturating_add(Weight::from_parts(528, 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: 41_105_000 picoseconds.
|
||||
Weight::from_parts(34_947_072, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 499
|
||||
.saturating_add(Weight::from_parts(67_375, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 4
|
||||
.saturating_add(Weight::from_parts(1_227, 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: 26_640_000 picoseconds.
|
||||
Weight::from_parts(21_515_344, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 943
|
||||
.saturating_add(Weight::from_parts(58_769, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 9
|
||||
.saturating_add(Weight::from_parts(1_233, 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: 45_875_000 picoseconds.
|
||||
Weight::from_parts(38_052_994, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 507
|
||||
.saturating_add(Weight::from_parts(82_957, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 4
|
||||
.saturating_add(Weight::from_parts(1_277, 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_359_000 picoseconds.
|
||||
Weight::from_parts(33_845_761, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 623
|
||||
.saturating_add(Weight::from_parts(69_809, 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: 18_791_000 picoseconds.
|
||||
Weight::from_parts(20_017_375, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 466
|
||||
.saturating_add(Weight::from_parts(64_780, 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_132_000 picoseconds.
|
||||
Weight::from_parts(34_485_734, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 601
|
||||
.saturating_add(Weight::from_parts(70_191, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_session`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_session
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_session.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_session`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Session NextKeys (r:1 w:1)
|
||||
/// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Session KeyOwner (r:1 w:1)
|
||||
/// Proof Skipped: 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: 17_809_000 picoseconds.
|
||||
Weight::from_parts(18_215_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 Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Session KeyOwner (r:0 w:1)
|
||||
/// Proof Skipped: 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: 13_565_000 picoseconds.
|
||||
Weight::from_parts(13_841_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3744))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_timestamp`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_timestamp
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_timestamp.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_timestamp`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
|
||||
/// 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_796_000 picoseconds.
|
||||
Weight::from_parts(8_128_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_268_000 picoseconds.
|
||||
Weight::from_parts(3_351_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_utility`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_utility
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_utility.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_utility`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
|
||||
/// 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: 7_032_000 picoseconds.
|
||||
Weight::from_parts(7_713_695, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_526
|
||||
.saturating_add(Weight::from_parts(4_329_716, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_961_000 picoseconds.
|
||||
Weight::from_parts(5_064_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_955_000 picoseconds.
|
||||
Weight::from_parts(17_856_282, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 3_463
|
||||
.saturating_add(Weight::from_parts(4_554_734, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_841_000 picoseconds.
|
||||
Weight::from_parts(9_004_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: 6_737_000 picoseconds.
|
||||
Weight::from_parts(7_653_355, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 3_915
|
||||
.saturating_add(Weight::from_parts(4_372_646, 0).saturating_mul(c.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,342 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_xcm
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/pallet_xcm.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
/// Proof Skipped: 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: 25_931_000 picoseconds.
|
||||
Weight::from_parts(26_340_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)
|
||||
fn teleport_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 25_691_000 picoseconds.
|
||||
Weight::from_parts(25_971_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1489))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Proof Skipped: 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: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:2 w:2)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn transfer_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `496`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 146_932_000 picoseconds.
|
||||
Weight::from_parts(153_200_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(12))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Proof Skipped: 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)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:0 w:1)
|
||||
/// Proof Skipped: 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: 9_572_000 picoseconds.
|
||||
Weight::from_parts(9_924_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1)
|
||||
/// Proof Skipped: 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_997_000 picoseconds.
|
||||
Weight::from_parts(3_136_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: PolkadotXcm VersionNotifiers (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm QueryCounter (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm QueryCounter (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm Queries (r:0 w:1)
|
||||
/// Proof Skipped: 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: 30_271_000 picoseconds.
|
||||
Weight::from_parts(30_819_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 Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm Queries (r:0 w:1)
|
||||
/// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured)
|
||||
fn force_unsubscribe_version_notify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `220`
|
||||
// Estimated: `3685`
|
||||
// Minimum execution time: 32_302_000 picoseconds.
|
||||
Weight::from_parts(32_807_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3685))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: PolkadotXcm XcmExecutionSuspended (r:0 w:1)
|
||||
/// Proof Skipped: 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_960_000 picoseconds.
|
||||
Weight::from_parts(3_094_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:4 w:2)
|
||||
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
fn migrate_supported_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `95`
|
||||
// Estimated: `10985`
|
||||
// Minimum execution time: 14_877_000 picoseconds.
|
||||
Weight::from_parts(15_296_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10985))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: PolkadotXcm VersionNotifiers (r:4 w:2)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
fn migrate_version_notifiers() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `99`
|
||||
// Estimated: `10989`
|
||||
// Minimum execution time: 14_835_000 picoseconds.
|
||||
Weight::from_parts(15_115_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10989))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
fn already_notified_target() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `13471`
|
||||
// Minimum execution time: 15_368_000 picoseconds.
|
||||
Weight::from_parts(15_596_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13471))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
}
|
||||
/// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
/// Proof Skipped: 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: 28_025_000 picoseconds.
|
||||
Weight::from_parts(28_524_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:3 w:0)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
fn notify_target_migration_fail() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `136`
|
||||
// Estimated: `8551`
|
||||
// Minimum execution time: 8_166_000 picoseconds.
|
||||
Weight::from_parts(8_314_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8551))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
}
|
||||
/// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
fn migrate_version_notify_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `10996`
|
||||
// Minimum execution time: 14_871_000 picoseconds.
|
||||
Weight::from_parts(15_374_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10996))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2)
|
||||
/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn migrate_and_notify_old_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `112`
|
||||
// Estimated: `11002`
|
||||
// Minimum execution time: 33_611_000 picoseconds.
|
||||
Weight::from_parts(34_008_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11002))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.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: `103`
|
||||
// Estimated: `1588`
|
||||
// Minimum execution time: 5_496_000 picoseconds.
|
||||
Weight::from_parts(5_652_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1588))
|
||||
.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: `7740`
|
||||
// Estimated: `11205`
|
||||
// Minimum execution time: 26_140_000 picoseconds.
|
||||
Weight::from_parts(26_824_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11205))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `polkadot_runtime_common::identity_migrator`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-11-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `sbtb`, CPU: `13th Gen Intel(R) Core(TM) i7-1365U`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/release/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=rococo-dev
|
||||
// --steps=2
|
||||
// --repeat=1
|
||||
// --pallet=polkadot_runtime_common::identity_migrator
|
||||
// --extrinsic=*
|
||||
// --output=./migrator-release.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `polkadot_runtime_common::identity_migrator`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> polkadot_runtime_common::identity_migrator::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `7292 + r * (8 ±0) + s * (32 ±0)`
|
||||
// Estimated: `11003 + r * (8 ±0) + s * (33 ±0)`
|
||||
// Minimum execution time: 163_756_000 picoseconds.
|
||||
Weight::from_parts(158_982_500, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 1_143_629
|
||||
.saturating_add(Weight::from_parts(238_675, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 228_725
|
||||
.saturating_add(Weight::from_parts(1_529_645, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
.saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into()))
|
||||
.saturating_add(Weight::from_parts(0, 33).saturating_mul(s.into()))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `7229`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 137_570_000 picoseconds.
|
||||
Weight::from_parts(137_570_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
// 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 frame_support::weights::Weight;
|
||||
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 WeighMultiAssets {
|
||||
fn weigh_multi_assets(&self, weight: Weight) -> Weight;
|
||||
}
|
||||
|
||||
const MAX_ASSETS: u64 = 100;
|
||||
|
||||
impl WeighMultiAssets for MultiAssetFilter {
|
||||
fn weigh_multi_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 WeighMultiAssets for MultiAssets {
|
||||
fn weigh_multi_assets(&self, weight: Weight) -> Weight {
|
||||
weight.saturating_mul(self.inner().iter().count() as u64)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PeopleRococoXcmWeight<Call>(core::marker::PhantomData<Call>);
|
||||
impl<Call> XcmWeightInfo<Call> for PeopleRococoXcmWeight<Call> {
|
||||
fn withdraw_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
// Currently there is no trusted reserve
|
||||
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
|
||||
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
|
||||
Weight::from_parts(1_000_000_000_u64, 0)
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
|
||||
}
|
||||
fn query_response(
|
||||
_query_id: &u64,
|
||||
_response: &Response,
|
||||
_max_weight: &Weight,
|
||||
_querier: &Option<MultiLocation>,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::query_response()
|
||||
}
|
||||
fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::transfer_asset())
|
||||
}
|
||||
fn transfer_reserve_asset(
|
||||
assets: &MultiAssets,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::transfer_reserve_asset())
|
||||
}
|
||||
fn transact(
|
||||
_origin_type: &OriginKind,
|
||||
_require_weight_at_most: &Weight,
|
||||
_call: &DoubleEncoded<Call>,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::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::<Runtime>::clear_origin()
|
||||
}
|
||||
fn descend_origin(_who: &InteriorMultiLocation) -> Weight {
|
||||
XcmGeneric::<Runtime>::descend_origin()
|
||||
}
|
||||
fn report_error(_query_response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_error()
|
||||
}
|
||||
|
||||
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
|
||||
// Hardcoded till the XCM pallet is fixed
|
||||
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
|
||||
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
|
||||
hardcoded_weight.min(weight)
|
||||
}
|
||||
fn deposit_reserve_asset(
|
||||
assets: &MultiAssetFilter,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
|
||||
}
|
||||
fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn initiate_reserve_withdraw(
|
||||
assets: &MultiAssetFilter,
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
|
||||
}
|
||||
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_holding()
|
||||
}
|
||||
fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight {
|
||||
XcmGeneric::<Runtime>::buy_execution()
|
||||
}
|
||||
fn refund_surplus() -> Weight {
|
||||
XcmGeneric::<Runtime>::refund_surplus()
|
||||
}
|
||||
fn set_error_handler(_xcm: &Xcm<Call>) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_error_handler()
|
||||
}
|
||||
fn set_appendix(_xcm: &Xcm<Call>) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_appendix()
|
||||
}
|
||||
fn clear_error() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_error()
|
||||
}
|
||||
fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight {
|
||||
XcmGeneric::<Runtime>::claim_asset()
|
||||
}
|
||||
fn trap(_code: &u64) -> Weight {
|
||||
XcmGeneric::<Runtime>::trap()
|
||||
}
|
||||
fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight {
|
||||
XcmGeneric::<Runtime>::subscribe_version()
|
||||
}
|
||||
fn unsubscribe_version() -> Weight {
|
||||
XcmGeneric::<Runtime>::unsubscribe_version()
|
||||
}
|
||||
fn burn_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::burn_asset())
|
||||
}
|
||||
fn expect_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::expect_asset())
|
||||
}
|
||||
fn expect_origin(_origin: &Option<MultiLocation>) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_origin()
|
||||
}
|
||||
fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_error()
|
||||
}
|
||||
fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_transact_status()
|
||||
}
|
||||
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::query_pallet()
|
||||
}
|
||||
fn expect_pallet(
|
||||
_index: &u32,
|
||||
_name: &Vec<u8>,
|
||||
_module_name: &Vec<u8>,
|
||||
_crate_major: &u32,
|
||||
_min_crate_minor: &u32,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_pallet()
|
||||
}
|
||||
fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_transact_status()
|
||||
}
|
||||
fn clear_transact_status() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_transact_status()
|
||||
}
|
||||
fn universal_origin(_: &Junction) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn set_fees_mode(_: &bool) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_fees_mode()
|
||||
}
|
||||
fn set_topic(_topic: &[u8; 32]) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_topic()
|
||||
}
|
||||
fn clear_topic() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_topic()
|
||||
}
|
||||
fn alias_origin(_: &MultiLocation) -> Weight {
|
||||
// XCM Executor does not currently support alias origin operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn unpaid_execution(_: &WeightLimit, _: &Option<MultiLocation>) -> Weight {
|
||||
XcmGeneric::<Runtime>::unpaid_execution()
|
||||
}
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --template=./templates/xcm-bench-template.hbs
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
pub fn withdraw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_309_000 picoseconds.
|
||||
Weight::from_parts(23_777_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
pub fn transfer_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `153`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 48_808_000 picoseconds.
|
||||
Weight::from_parts(49_427_000, 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 Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn transfer_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `223`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 71_204_000 picoseconds.
|
||||
Weight::from_parts(72_121_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
pub fn receive_teleported_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_559_000 picoseconds.
|
||||
Weight::from_parts(3_616_000, 0)
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
pub fn deposit_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `52`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 25_042_000 picoseconds.
|
||||
Weight::from_parts(25_630_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
// Storage: ParachainInfo ParachainId (r:1 w:0)
|
||||
// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn deposit_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `122`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 49_030_000 picoseconds.
|
||||
Weight::from_parts(49_828_000, 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 Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn initiate_teleport() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `70`
|
||||
// Estimated: `3535`
|
||||
// Minimum execution time: 27_142_000 picoseconds.
|
||||
Weight::from_parts(27_416_000, 3535)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+347
@@ -0,0 +1,347 @@
|
||||
// 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.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("people-kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --template=./templates/xcm-bench-template.hbs
|
||||
// --chain=people-kusama-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_xcm_benchmarks::generic
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::generic`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// 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 Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn report_holding() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `70`
|
||||
// Estimated: `3535`
|
||||
// Minimum execution time: 30_210_000 picoseconds.
|
||||
Weight::from_parts(30_864_000, 3535)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn buy_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_808_000 picoseconds.
|
||||
Weight::from_parts(2_848_000, 0)
|
||||
}
|
||||
// Storage: PolkadotXcm Queries (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn query_response() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32`
|
||||
// Estimated: `3497`
|
||||
// Minimum execution time: 10_353_000 picoseconds.
|
||||
Weight::from_parts(10_569_000, 3497)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
pub fn transact() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 12_074_000 picoseconds.
|
||||
Weight::from_parts(12_280_000, 0)
|
||||
}
|
||||
pub fn refund_surplus() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_080_000 picoseconds.
|
||||
Weight::from_parts(3_161_000, 0)
|
||||
}
|
||||
pub fn set_error_handler() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_649_000 picoseconds.
|
||||
Weight::from_parts(2_732_000, 0)
|
||||
}
|
||||
pub fn set_appendix() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_652_000 picoseconds.
|
||||
Weight::from_parts(2_749_000, 0)
|
||||
}
|
||||
pub fn clear_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_642_000 picoseconds.
|
||||
Weight::from_parts(2_704_000, 0)
|
||||
}
|
||||
pub fn descend_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_438_000 picoseconds.
|
||||
Weight::from_parts(3_508_000, 0)
|
||||
}
|
||||
pub fn clear_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_626_000 picoseconds.
|
||||
Weight::from_parts(2_701_000, 0)
|
||||
}
|
||||
// Storage: ParachainInfo ParachainId (r:1 w:0)
|
||||
// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn report_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `70`
|
||||
// Estimated: `3535`
|
||||
// Minimum execution time: 24_737_000 picoseconds.
|
||||
Weight::from_parts(25_106_000, 3535)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: PolkadotXcm AssetTraps (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn claim_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `90`
|
||||
// Estimated: `3555`
|
||||
// Minimum execution time: 14_712_000 picoseconds.
|
||||
Weight::from_parts(14_976_000, 3555)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
pub fn trap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_689_000 picoseconds.
|
||||
Weight::from_parts(2_739_000, 0)
|
||||
}
|
||||
// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn subscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `38`
|
||||
// Estimated: `3503`
|
||||
// Minimum execution time: 26_478_000 picoseconds.
|
||||
Weight::from_parts(26_695_000, 3503)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn unsubscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_811_000 picoseconds.
|
||||
Weight::from_parts(5_062_000, 0)
|
||||
.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 Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `70`
|
||||
// Estimated: `3535`
|
||||
// Minimum execution time: 26_945_000 picoseconds.
|
||||
Weight::from_parts(28_093_000, 3535)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_144_000 picoseconds.
|
||||
Weight::from_parts(4_217_000, 0)
|
||||
}
|
||||
pub fn expect_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_726_000 picoseconds.
|
||||
Weight::from_parts(2_802_000, 0)
|
||||
}
|
||||
pub fn expect_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_719_000 picoseconds.
|
||||
Weight::from_parts(2_790_000, 0)
|
||||
}
|
||||
pub fn expect_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_660_000 picoseconds.
|
||||
Weight::from_parts(2_742_000, 0)
|
||||
}
|
||||
pub fn expect_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_874_000 picoseconds.
|
||||
Weight::from_parts(2_940_000, 0)
|
||||
}
|
||||
// Storage: ParachainInfo ParachainId (r:1 w:0)
|
||||
// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn query_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `70`
|
||||
// Estimated: `3535`
|
||||
// Minimum execution time: 27_235_000 picoseconds.
|
||||
Weight::from_parts(27_811_000, 3535)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn expect_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_807_000 picoseconds.
|
||||
Weight::from_parts(4_918_000, 0)
|
||||
}
|
||||
// Storage: ParachainInfo ParachainId (r:1 w:0)
|
||||
// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
|
||||
// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
|
||||
// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
|
||||
pub fn report_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `70`
|
||||
// Estimated: `3535`
|
||||
// Minimum execution time: 24_698_000 picoseconds.
|
||||
Weight::from_parts(25_077_000, 3535)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn clear_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_613_000 picoseconds.
|
||||
Weight::from_parts(2_703_000, 0)
|
||||
}
|
||||
pub fn set_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_602_000 picoseconds.
|
||||
Weight::from_parts(2_661_000, 0)
|
||||
}
|
||||
pub fn clear_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_557_000 picoseconds.
|
||||
Weight::from_parts(2_655_000, 0)
|
||||
}
|
||||
pub fn set_fees_mode() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_724_000 picoseconds.
|
||||
Weight::from_parts(2_760_000, 0)
|
||||
}
|
||||
pub fn unpaid_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_764_000 picoseconds.
|
||||
Weight::from_parts(2_872_000, 0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,320 @@
|
||||
// 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, ParachainInfo, ParachainSystem, PolkadotXcm,
|
||||
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use crate::{TransactionByteFee, CENTS};
|
||||
use frame_support::{
|
||||
match_types, parameter_types,
|
||||
traits::{ConstU32, Contains, Equals, Everything, Nothing},
|
||||
};
|
||||
use frame_system::EnsureRoot;
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::{
|
||||
impls::ToStakingPot,
|
||||
xcm_config::{
|
||||
AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains,
|
||||
},
|
||||
TREASURY_PALLET_ID,
|
||||
};
|
||||
use polkadot_parachain_primitives::primitives::Sibling;
|
||||
use sp_runtime::traits::AccountIdConversion;
|
||||
use xcm::latest::prelude::*;
|
||||
#[allow(deprecated)]
|
||||
use xcm_builder::CurrencyAdapter;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||
DenyThenTry, DescribeTerminus, EnsureXcmOrigin, HashedDescription, IsConcrete,
|
||||
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
||||
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
||||
XcmFeeToAccount,
|
||||
};
|
||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||
|
||||
parameter_types! {
|
||||
pub const RootLocation: MultiLocation = MultiLocation::here();
|
||||
pub const RelayLocation: MultiLocation = MultiLocation::parent();
|
||||
pub const RelayNetwork: Option<NetworkId> = Some(NetworkId::Rococo);
|
||||
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||
pub UniversalLocation: InteriorMultiLocation =
|
||||
X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into()));
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
pub const MaxAssetsIntoHolding: u32 = 64;
|
||||
pub const GovernanceLocation: MultiLocation = MultiLocation::parent();
|
||||
pub const FellowshipLocation: MultiLocation = MultiLocation::parent();
|
||||
/// The asset ID for the asset that we use to pay for message delivery fees. Just ROC.
|
||||
pub FeeAssetId: AssetId = Concrete(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: MultiLocation =
|
||||
(Parent, PalletInstance(rococo_runtime_constants::TREASURY_PALLET_ID)).into();
|
||||
}
|
||||
|
||||
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 `MultiLocation` can be converted into an `AccountId`. This is used
|
||||
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
|
||||
/// `Transact` in order to determine the dispatch Origin.
|
||||
pub type LocationToAccountId = (
|
||||
// The parent (Relay-chain) origin converts to the parent `AccountId`.
|
||||
ParentIsPreset<AccountId>,
|
||||
// Sibling parachain origins convert to AccountId via the `ParaId::into`.
|
||||
SiblingParachainConvertsVia<Sibling, AccountId>,
|
||||
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
|
||||
AccountId32Aliases<RelayNetwork, AccountId>,
|
||||
// Here/local root location to `AccountId`.
|
||||
HashedDescription<AccountId, DescribeTerminus>,
|
||||
);
|
||||
|
||||
/// Means for transacting the native currency on this chain.
|
||||
#[allow(deprecated)]
|
||||
pub type CurrencyTransactor = CurrencyAdapter<
|
||||
// Use this currency:
|
||||
Balances,
|
||||
// Use this currency when it is a fungible asset matching the given location or name:
|
||||
IsConcrete<RelayLocation>,
|
||||
// Do a simple punn to convert an `AccountId32` `MultiLocation` into a native chain
|
||||
// `AccountId`:
|
||||
LocationToAccountId,
|
||||
// Our chain's `AccountId` 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<LocationToAccountId, RuntimeOrigin>,
|
||||
// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
|
||||
// recognized.
|
||||
RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
|
||||
// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when
|
||||
// recognized.
|
||||
SiblingParachainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
|
||||
// Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a
|
||||
// transaction from the Root origin.
|
||||
ParentAsSuperuser<RuntimeOrigin>,
|
||||
// Native signed account converter; this just converts an `AccountId32` origin into a normal
|
||||
// `RuntimeOrigin::Signed` origin of the same 32-byte value.
|
||||
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
|
||||
// XCM origins can be represented natively under the XCM pallet's `Xcm` origin.
|
||||
XcmPassthrough<RuntimeOrigin>,
|
||||
);
|
||||
|
||||
match_types! {
|
||||
pub type LocalPlurality: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 0, interior: X1(Plurality { .. }) }
|
||||
};
|
||||
pub type ParentOrParentsPlurality: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 1, interior: Here } |
|
||||
MultiLocation { parents: 1, interior: X1(Plurality { .. }) }
|
||||
};
|
||||
pub type ParentOrSiblings: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 1, interior: Here } |
|
||||
MultiLocation { parents: 1, interior: X1(Parachain(_)) }
|
||||
};
|
||||
}
|
||||
|
||||
/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
|
||||
/// account for proof size weights.
|
||||
///
|
||||
/// Calls that are allowed through this filter must:
|
||||
/// 1. Have a fixed weight;
|
||||
/// 2. Cannot lead to another call being made;
|
||||
/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters.
|
||||
pub struct SafeCallFilter;
|
||||
impl Contains<RuntimeCall> for SafeCallFilter {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
{
|
||||
if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
matches!(
|
||||
call,
|
||||
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) |
|
||||
RuntimeCall::System(
|
||||
frame_system::Call::set_heap_pages { .. } |
|
||||
frame_system::Call::set_code { .. } |
|
||||
frame_system::Call::set_code_without_checks { .. } |
|
||||
frame_system::Call::kill_prefix { .. },
|
||||
) | RuntimeCall::ParachainSystem(..) |
|
||||
RuntimeCall::Timestamp(..) |
|
||||
RuntimeCall::Balances(..) |
|
||||
RuntimeCall::CollatorSelection(
|
||||
pallet_collator_selection::Call::set_desired_candidates { .. } |
|
||||
pallet_collator_selection::Call::set_candidacy_bond { .. } |
|
||||
pallet_collator_selection::Call::register_as_candidate { .. } |
|
||||
pallet_collator_selection::Call::leave_intent { .. } |
|
||||
pallet_collator_selection::Call::set_invulnerables { .. } |
|
||||
pallet_collator_selection::Call::add_invulnerable { .. } |
|
||||
pallet_collator_selection::Call::remove_invulnerable { .. },
|
||||
) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
|
||||
RuntimeCall::XcmpQueue(..) |
|
||||
RuntimeCall::MessageQueue(..) |
|
||||
RuntimeCall::Identity(..) |
|
||||
RuntimeCall::IdentityMigrator(..)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub type Barrier = TrailingSetTopicAsId<
|
||||
DenyThenTry<
|
||||
DenyReserveTransferToRelayChain,
|
||||
(
|
||||
// Allow local users to buy weight credit.
|
||||
TakeWeightCredit,
|
||||
// Expected responses are OK.
|
||||
AllowKnownQueryResponses<PolkadotXcm>,
|
||||
WithComputedOrigin<
|
||||
(
|
||||
// If the message is one that immediately attemps to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent and its pluralities (i.e. governance bodies) get free execution.
|
||||
AllowExplicitUnpaidExecutionFrom<ParentOrParentsPlurality>,
|
||||
// Subscriptions for version tracking are OK.
|
||||
AllowSubscriptionsFrom<ParentOrSiblings>,
|
||||
),
|
||||
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<AllSiblingSystemParachains, Runtime>,
|
||||
Equals<RelayTreasuryLocation>,
|
||||
Equals<RootLocation>,
|
||||
LocalPlurality,
|
||||
);
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = XcmRouter;
|
||||
type AssetTransactor = CurrencyTransactor;
|
||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||
// People chain does not recognize a reserve location for any asset. Users must teleport ROC
|
||||
// where allowed (e.g. with the Relay Chain).
|
||||
type IsReserve = ();
|
||||
/// Only allow teleportation of ROC.
|
||||
type IsTeleporter = ConcreteAssetFromSystem<RelayLocation>;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type Barrier = Barrier;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::PeopleRococoXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type Trader =
|
||||
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||
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<Self::AssetTransactor, AccountId, TreasuryAccount>,
|
||||
>;
|
||||
type MessageExporter = ();
|
||||
type UniversalAliases = Nothing;
|
||||
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
|
||||
type SafeCallFilter = SafeCallFilter;
|
||||
type Aliasers = Nothing;
|
||||
}
|
||||
|
||||
/// Converts a local signed origin into an XCM multilocation. Forms the basis for local origins
|
||||
/// sending/executing XCMs.
|
||||
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;
|
||||
|
||||
/// 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<ParachainSystem, PolkadotXcm, ()>,
|
||||
// ..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<RuntimeOrigin, ()>;
|
||||
type XcmRouter = XcmRouter;
|
||||
// We support local origins dispatching XCM executions in principle...
|
||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||
// ... but disallow generic XCM execution. As a result only teleports are allowed.
|
||||
type XcmExecuteFilter = Nothing;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type XcmTeleportFilter = Everything;
|
||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::PeopleRococoXcmWeight<RuntimeCall>,
|
||||
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<Runtime>;
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
type MaxRemoteLockConsumers = ConstU32<0>;
|
||||
type RemoteLockConsumerIdentifier = ();
|
||||
}
|
||||
|
||||
impl cumulus_pallet_xcm::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
}
|
||||
Reference in New Issue
Block a user