Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pallet-transaction-payment-rpc-runtime-api = { workspace = true }
pallet-treasury = { workspace = true }
pallet-uniques = { workspace = true }
pallet-utility = { workspace = true }
pallet-verify-signature = { workspace = true }
pallet-vesting = { workspace = true }
pallet-whitelist = { workspace = true }
sp-api = { workspace = true }
Expand Down Expand Up @@ -122,6 +123,7 @@ cumulus-primitives-core = { workspace = true }
cumulus-primitives-utility = { workspace = true }
pallet-collator-selection = { workspace = true }
pallet-message-queue = { workspace = true }
pallet-meta-tx = { workspace = true }
parachain-info = { workspace = true }
parachains-common = { workspace = true }
testnet-parachains-constants = { features = ["westend"], workspace = true }
Expand Down Expand Up @@ -179,6 +181,7 @@ runtime-benchmarks = [
"pallet-fast-unstake/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-meta-tx/runtime-benchmarks",
"pallet-migrations/runtime-benchmarks",
"pallet-multi-asset-bounties/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
Expand All @@ -201,6 +204,7 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-uniques/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-verify-signature/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
Expand Down Expand Up @@ -253,6 +257,7 @@ try-runtime = [
"pallet-fast-unstake/try-runtime",
"pallet-indices/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-meta-tx/try-runtime",
"pallet-migrations/try-runtime",
"pallet-multi-asset-bounties/try-runtime",
"pallet-multisig/try-runtime",
Expand All @@ -275,6 +280,7 @@ try-runtime = [
"pallet-treasury/try-runtime",
"pallet-uniques/try-runtime",
"pallet-utility/try-runtime",
"pallet-verify-signature/try-runtime",
"pallet-vesting/try-runtime",
"pallet-whitelist/try-runtime",
"pallet-xcm-bridge-hub-router/try-runtime",
Expand Down Expand Up @@ -334,6 +340,7 @@ std = [
"pallet-fast-unstake/std",
"pallet-indices/std",
"pallet-message-queue/std",
"pallet-meta-tx/std",
"pallet-migrations/std",
"pallet-multi-asset-bounties/std",
"pallet-multisig/std",
Expand All @@ -360,6 +367,7 @@ std = [
"pallet-treasury/std",
"pallet-uniques/std",
"pallet-utility/std",
"pallet-verify-signature/std",
"pallet-vesting/std",
"pallet-whitelist/std",
"pallet-xcm-benchmarks?/std",
Expand Down
33 changes: 32 additions & 1 deletion cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ use sp_runtime::{
generic, impl_opaque_keys,
traits::{AccountIdConversion, BlakeTwo256, Block as BlockT, ConvertInto, Saturating, Verify},
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult, Debug, FixedU128, Perbill, Permill,
ApplyExtrinsicResult, Debug, FixedU128, MultiSignature, MultiSigner, Perbill, Permill,
};
#[cfg(feature = "std")]
use sp_version::NativeVersion;
Expand Down Expand Up @@ -1242,6 +1242,35 @@ impl pallet_migrations::Config for Runtime {
type WeightInfo = weights::pallet_migrations::WeightInfo<Runtime>;
}

pub type MetaTxExtension = (
pallet_verify_signature::VerifySignature<Runtime>,
pallet_meta_tx::MetaTxMarker<Runtime>,
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);

impl pallet_meta_tx::Config for Runtime {
type WeightInfo = weights::pallet_meta_tx::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
type Extension = MetaTxExtension;
#[cfg(feature = "runtime-benchmarks")]
type Extension = pallet_meta_tx::WeightlessExtension<Runtime>;
}

impl pallet_verify_signature::Config for Runtime {
type Signature = MultiSignature;
type AccountIdentifier = MultiSigner;
type WeightInfo = weights::pallet_verify_signature::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}

parameter_types! {
pub MaximumSchedulerWeight: frame_support::weights::Weight = Perbill::from_percent(80) *
RuntimeBlockWeights::get().max_block;
Expand Down Expand Up @@ -1356,6 +1385,8 @@ construct_runtime!(
Multisig: pallet_multisig = 41,
Proxy: pallet_proxy = 42,
Indices: pallet_indices = 43,
MetaTx: pallet_meta_tx = 44,
VerifySignature: pallet_verify_signature = 45,

// The main stage.
Assets: pallet_assets::<Instance1> = 50,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub mod pallet_election_provider_multi_block_unsigned;
pub mod pallet_election_provider_multi_block_verifier;
pub mod pallet_indices;
pub mod pallet_message_queue;
pub mod pallet_meta_tx;
pub mod pallet_migrations;
pub mod pallet_multisig;
pub mod pallet_nft_fractionalization;
Expand All @@ -57,6 +58,7 @@ pub mod pallet_transaction_payment;
pub mod pallet_treasury;
pub mod pallet_uniques;
pub mod pallet_utility;
pub mod pallet_verify_signature;
pub mod pallet_vesting;
pub mod pallet_whitelist;
pub mod pallet_xcm;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// 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_meta_tx`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-11-08, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024

// Executed Command:
// ./target/debug/polkadot
// benchmark
// pallet
// --chain=westend-dev
// --steps=50
// --repeat=2
// --pallet=pallet-meta-tx
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./polkadot/runtime/westend/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_meta_tx`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_meta_tx::WeightInfo for WeightInfo<T> {
fn bare_dispatch() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 138_000_000 picoseconds.
Weight::from_parts(140_000_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// 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_verify_signature`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-01-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ys-ssygq-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024

// Executed Command:
// target/production/polkadot
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_verify_signature
// --chain=westend-dev
// --header=./polkadot/file_header.txt
// --output=./polkadot/runtime/westend/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_verify_signature`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_verify_signature::WeightInfo for WeightInfo<T> {
fn verify_signature() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 42_915_000 picoseconds.
Weight::from_parts(43_522_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
Loading