where
- Suffix: SignedExtensionSchema,
+ Suffix: TransactionExtensionSchema,
{
fn from_params(
spec_version: u32,
@@ -321,9 +326,9 @@ where
genesis_hash: Hash,
nonce: Nonce,
tip: Balance,
- extra: (Suffix::Payload, Suffix::AdditionalSigned),
+ extra: (Suffix::Payload, Suffix::Implicit),
) -> Self {
- GenericSignedExtension::new(
+ GenericTransactionExtension::new(
(
(
(), // non-zero sender
@@ -365,7 +370,7 @@ where
}
/// Signed extension that is used by most chains.
-pub type CommonSignedExtension = SuffixedCommonSignedExtension<()>;
+pub type CommonTransactionExtension = SuffixedCommonTransactionExtension<()>;
#[cfg(test)]
mod tests {
diff --git a/bridges/primitives/runtime/src/extensions.rs b/bridges/primitives/runtime/src/extensions.rs
index d896bc92efffc4e8fcb427ffa7057dece6f17241..a31e7b5bb47a64ec2333bbaba3e9c520aa53ef5a 100644
--- a/bridges/primitives/runtime/src/extensions.rs
+++ b/bridges/primitives/runtime/src/extensions.rs
@@ -20,135 +20,138 @@ use codec::{Compact, Decode, Encode};
use impl_trait_for_tuples::impl_for_tuples;
use scale_info::{StaticTypeInfo, TypeInfo};
use sp_runtime::{
- traits::{DispatchInfoOf, SignedExtension},
+ impl_tx_ext_default,
+ traits::{Dispatchable, TransactionExtension, TransactionExtensionBase},
transaction_validity::TransactionValidityError,
};
use sp_std::{fmt::Debug, marker::PhantomData};
-/// Trait that describes some properties of a `SignedExtension` that are needed in order to send a
-/// transaction to the chain.
-pub trait SignedExtensionSchema: Encode + Decode + Debug + Eq + Clone + StaticTypeInfo {
+/// Trait that describes some properties of a `TransactionExtension` that are needed in order to
+/// send a transaction to the chain.
+pub trait TransactionExtensionSchema:
+ Encode + Decode + Debug + Eq + Clone + StaticTypeInfo
+{
/// A type of the data encoded as part of the transaction.
type Payload: Encode + Decode + Debug + Eq + Clone + StaticTypeInfo;
/// Parameters which are part of the payload used to produce transaction signature,
/// but don't end up in the transaction itself (i.e. inherent part of the runtime).
- type AdditionalSigned: Encode + Debug + Eq + Clone + StaticTypeInfo;
+ type Implicit: Encode + Decode + Debug + Eq + Clone + StaticTypeInfo;
}
-impl SignedExtensionSchema for () {
+impl TransactionExtensionSchema for () {
type Payload = ();
- type AdditionalSigned = ();
+ type Implicit = ();
}
-/// An implementation of `SignedExtensionSchema` using generic params.
+/// An implementation of `TransactionExtensionSchema` using generic params.
#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo)]
-pub struct GenericSignedExtensionSchema(PhantomData<(P, S)>);
+pub struct GenericTransactionExtensionSchema
(PhantomData<(P, S)>);
-impl
SignedExtensionSchema for GenericSignedExtensionSchema
+impl
TransactionExtensionSchema for GenericTransactionExtensionSchema
where
P: Encode + Decode + Debug + Eq + Clone + StaticTypeInfo,
- S: Encode + Debug + Eq + Clone + StaticTypeInfo,
+ S: Encode + Decode + Debug + Eq + Clone + StaticTypeInfo,
{
type Payload = P;
- type AdditionalSigned = S;
+ type Implicit = S;
}
-/// The `SignedExtensionSchema` for `frame_system::CheckNonZeroSender`.
-pub type CheckNonZeroSender = GenericSignedExtensionSchema<(), ()>;
+/// The `TransactionExtensionSchema` for `frame_system::CheckNonZeroSender`.
+pub type CheckNonZeroSender = GenericTransactionExtensionSchema<(), ()>;
-/// The `SignedExtensionSchema` for `frame_system::CheckSpecVersion`.
-pub type CheckSpecVersion = GenericSignedExtensionSchema<(), u32>;
+/// The `TransactionExtensionSchema` for `frame_system::CheckSpecVersion`.
+pub type CheckSpecVersion = GenericTransactionExtensionSchema<(), u32>;
-/// The `SignedExtensionSchema` for `frame_system::CheckTxVersion`.
-pub type CheckTxVersion = GenericSignedExtensionSchema<(), u32>;
+/// The `TransactionExtensionSchema` for `frame_system::CheckTxVersion`.
+pub type CheckTxVersion = GenericTransactionExtensionSchema<(), u32>;
-/// The `SignedExtensionSchema` for `frame_system::CheckGenesis`.
-pub type CheckGenesis = GenericSignedExtensionSchema<(), Hash>;
+/// The `TransactionExtensionSchema` for `frame_system::CheckGenesis`.
+pub type CheckGenesis = GenericTransactionExtensionSchema<(), Hash>;
-/// The `SignedExtensionSchema` for `frame_system::CheckEra`.
-pub type CheckEra = GenericSignedExtensionSchema;
+/// The `TransactionExtensionSchema` for `frame_system::CheckEra`.
+pub type CheckEra = GenericTransactionExtensionSchema;
-/// The `SignedExtensionSchema` for `frame_system::CheckNonce`.
-pub type CheckNonce = GenericSignedExtensionSchema, ()>;
+/// The `TransactionExtensionSchema` for `frame_system::CheckNonce`.
+pub type CheckNonce = GenericTransactionExtensionSchema, ()>;
-/// The `SignedExtensionSchema` for `frame_system::CheckWeight`.
-pub type CheckWeight = GenericSignedExtensionSchema<(), ()>;
+/// The `TransactionExtensionSchema` for `frame_system::CheckWeight`.
+pub type CheckWeight = GenericTransactionExtensionSchema<(), ()>;
-/// The `SignedExtensionSchema` for `pallet_transaction_payment::ChargeTransactionPayment`.
-pub type ChargeTransactionPayment = GenericSignedExtensionSchema, ()>;
+/// The `TransactionExtensionSchema` for `pallet_transaction_payment::ChargeTransactionPayment`.
+pub type ChargeTransactionPayment =
+ GenericTransactionExtensionSchema, ()>;
-/// The `SignedExtensionSchema` for `polkadot-runtime-common::PrevalidateAttests`.
-pub type PrevalidateAttests = GenericSignedExtensionSchema<(), ()>;
+/// The `TransactionExtensionSchema` for `polkadot-runtime-common::PrevalidateAttests`.
+pub type PrevalidateAttests = GenericTransactionExtensionSchema<(), ()>;
-/// The `SignedExtensionSchema` for `BridgeRejectObsoleteHeadersAndMessages`.
-pub type BridgeRejectObsoleteHeadersAndMessages = GenericSignedExtensionSchema<(), ()>;
+/// The `TransactionExtensionSchema` for `BridgeRejectObsoleteHeadersAndMessages`.
+pub type BridgeRejectObsoleteHeadersAndMessages = GenericTransactionExtensionSchema<(), ()>;
-/// The `SignedExtensionSchema` for `RefundBridgedParachainMessages`.
+/// The `TransactionExtensionSchema` for `RefundBridgedParachainMessages`.
/// This schema is dedicated for `RefundBridgedParachainMessages` signed extension as
/// wildcard/placeholder, which relies on the scale encoding for `()` or `((), ())`, or `((), (),
/// ())` is the same. So runtime can contains any kind of tuple:
/// `(BridgeRefundBridgeHubRococoMessages)`
/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWestendMessages)`
/// `(BridgeRefundParachainMessages1, ..., BridgeRefundParachainMessagesN)`
-pub type RefundBridgedParachainMessagesSchema = GenericSignedExtensionSchema<(), ()>;
+pub type RefundBridgedParachainMessagesSchema = GenericTransactionExtensionSchema<(), ()>;
#[impl_for_tuples(1, 12)]
-impl SignedExtensionSchema for Tuple {
+impl TransactionExtensionSchema for Tuple {
for_tuples!( type Payload = ( #( Tuple::Payload ),* ); );
- for_tuples!( type AdditionalSigned = ( #( Tuple::AdditionalSigned ),* ); );
+ for_tuples!( type Implicit = ( #( Tuple::Implicit ),* ); );
}
/// A simplified version of signed extensions meant for producing signed transactions
/// and signed payloads in the client code.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
-pub struct GenericSignedExtension {
+pub struct GenericTransactionExtension {
/// A payload that is included in the transaction.
pub payload: S::Payload,
#[codec(skip)]
// It may be set to `None` if extensions are decoded. We are never reconstructing transactions
- // (and it makes no sense to do that) => decoded version of `SignedExtensions` is only used to
- // read fields of the `payload`. And when resigning transaction, we're reconstructing
- // `SignedExtensions` from scratch.
- additional_signed: Option,
+ // (and it makes no sense to do that) => decoded version of `TransactionExtensions` is only
+ // used to read fields of the `payload`. And when resigning transaction, we're reconstructing
+ // `TransactionExtensions` from scratch.
+ implicit: Option,
}
-impl GenericSignedExtension {
- /// Create new `GenericSignedExtension` object.
- pub fn new(payload: S::Payload, additional_signed: Option) -> Self {
- Self { payload, additional_signed }
+impl GenericTransactionExtension {
+ /// Create new `GenericTransactionExtension` object.
+ pub fn new(payload: S::Payload, implicit: Option) -> Self {
+ Self { payload, implicit }
}
}
-impl SignedExtension for GenericSignedExtension
+impl TransactionExtensionBase for GenericTransactionExtension
where
- S: SignedExtensionSchema,
+ S: TransactionExtensionSchema,
S::Payload: Send + Sync,
- S::AdditionalSigned: Send + Sync,
+ S::Implicit: Send + Sync,
{
const IDENTIFIER: &'static str = "Not needed.";
- type AccountId = ();
- type Call = ();
- type AdditionalSigned = S::AdditionalSigned;
- type Pre = ();
+ type Implicit = S::Implicit;
- fn additional_signed(&self) -> Result {
+ fn implicit(&self) -> Result {
// we shall not ever see this error in relay, because we are never signing decoded
// transactions. Instead we're constructing and signing new transactions. So the error code
// is kinda random here
- self.additional_signed.clone().ok_or(
- frame_support::unsigned::TransactionValidityError::Unknown(
+ self.implicit
+ .clone()
+ .ok_or(frame_support::unsigned::TransactionValidityError::Unknown(
frame_support::unsigned::UnknownTransaction::Custom(0xFF),
- ),
- )
+ ))
}
+}
+impl TransactionExtension for GenericTransactionExtension
+where
+ C: Dispatchable,
+ S: TransactionExtensionSchema,
+ S::Payload: Send + Sync,
+ S::Implicit: Send + Sync,
+{
+ type Pre = ();
+ type Val = ();
- fn pre_dispatch(
- self,
- _who: &Self::AccountId,
- _call: &Self::Call,
- _info: &DispatchInfoOf,
- _len: usize,
- ) -> Result {
- Ok(())
- }
+ impl_tx_ext_default!(C; Context; validate prepare);
}
diff --git a/bridges/primitives/test-utils/src/lib.rs b/bridges/primitives/test-utils/src/lib.rs
index f23ddd1a10d3681900b024999aef279ea6fcb91d..1d80890779bf8310b393d585749e96f9577196a1 100644
--- a/bridges/primitives/test-utils/src/lib.rs
+++ b/bridges/primitives/test-utils/src/lib.rs
@@ -129,7 +129,7 @@ pub fn make_justification_for_header(
votes_ancestries.push(child.clone());
}
- // The header we need to use when pre-commiting is the one at the highest height
+ // The header we need to use when pre-committing is the one at the highest height
// on our chain.
let precommit_candidate = chain.last().map(|h| (h.hash(), *h.number())).unwrap();
unsigned_precommits.push(precommit_candidate);
diff --git a/bridges/snowbridge/runtime/test-common/Cargo.toml b/bridges/snowbridge/runtime/test-common/Cargo.toml
index 4e8b311cb97812bb94140aa02405b3a174064a8f..5f169e82f49346742bd97028da583105bf02335d 100644
--- a/bridges/snowbridge/runtime/test-common/Cargo.toml
+++ b/bridges/snowbridge/runtime/test-common/Cargo.toml
@@ -181,6 +181,7 @@ runtime-benchmarks = [
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-transaction-payment/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs
index 57353638e197acf255b73080c6802e94647c2090..051eb6764c8ce97a8305a07bdddb8f06f61fe4bc 100644
--- a/cumulus/client/parachain-inherent/src/lib.rs
+++ b/cumulus/client/parachain-inherent/src/lib.rs
@@ -159,7 +159,7 @@ impl ParachainInherentDataProvider {
target: LOG_TARGET,
relay_parent = ?relay_parent,
error = ?e,
- "An error occured during requesting the downward messages.",
+ "An error occurred during requesting the downward messages.",
);
})
.ok()?;
@@ -171,7 +171,7 @@ impl ParachainInherentDataProvider {
target: LOG_TARGET,
relay_parent = ?relay_parent,
error = ?e,
- "An error occured during requesting the inbound HRMP messages.",
+ "An error occurred during requesting the inbound HRMP messages.",
);
})
.ok()?;
diff --git a/cumulus/pallets/collator-selection/src/benchmarking.rs b/cumulus/pallets/collator-selection/src/benchmarking.rs
index 2c40f4dd0eac4a8a2ad3aed7f162a4379ccdbc93..e2af74a6e60ef00ca9d1111518d86df3fdfb0656 100644
--- a/cumulus/pallets/collator-selection/src/benchmarking.rs
+++ b/cumulus/pallets/collator-selection/src/benchmarking.rs
@@ -22,9 +22,7 @@ use super::*;
#[allow(unused)]
use crate::Pallet as CollatorSelection;
use codec::Decode;
-use frame_benchmarking::{
- account, impl_benchmark_test_suite, v2::*, whitelisted_caller, BenchmarkError,
-};
+use frame_benchmarking::{account, v2::*, whitelisted_caller, BenchmarkError};
use frame_support::traits::{Currency, EnsureOrigin, Get, ReservableCurrency};
use frame_system::{pallet_prelude::BlockNumberFor, EventRecord, RawOrigin};
use pallet_authorship::EventHandler;
diff --git a/cumulus/pallets/xcmp-queue/src/lib.rs b/cumulus/pallets/xcmp-queue/src/lib.rs
index 5b900769622afa3cba2c47f493ebff1a279b182b..e92169be16b0b8466582f3dd143d9e3e1807a42d 100644
--- a/cumulus/pallets/xcmp-queue/src/lib.rs
+++ b/cumulus/pallets/xcmp-queue/src/lib.rs
@@ -600,7 +600,7 @@ impl Pallet {
let QueueConfigData { drop_threshold, .. } = >::get();
let fp = T::XcmpQueue::footprint(sender);
// Assume that it will not fit into the current page:
- let new_pages = fp.pages.saturating_add(1);
+ let new_pages = fp.ready_pages.saturating_add(1);
if new_pages > drop_threshold {
// This should not happen since the channel should have been suspended in
// [`on_queue_changed`].
@@ -663,12 +663,12 @@ impl OnQueueChanged for Pallet {
let mut suspended_channels = >::get();
let suspended = suspended_channels.contains(¶);
- if suspended && fp.pages <= resume_threshold {
+ if suspended && fp.ready_pages <= resume_threshold {
Self::send_signal(para, ChannelSignal::Resume);
suspended_channels.remove(¶);
>::put(suspended_channels);
- } else if !suspended && fp.pages >= suspend_threshold {
+ } else if !suspended && fp.ready_pages >= suspend_threshold {
log::warn!("XCMP queue for sibling {:?} is full; suspending channel.", para);
Self::send_signal(para, ChannelSignal::Suspend);
diff --git a/cumulus/pallets/xcmp-queue/src/mock.rs b/cumulus/pallets/xcmp-queue/src/mock.rs
index 08ab58ce816046336fcba0a2318bd2ff77227e5f..1fb88cafd93c425833d38c0904f59490cc479294 100644
--- a/cumulus/pallets/xcmp-queue/src/mock.rs
+++ b/cumulus/pallets/xcmp-queue/src/mock.rs
@@ -247,6 +247,7 @@ impl> EnqueueMessage for EnqueueToLocalStorage
}
}
footprint.pages = footprint.storage.size as u32 / 16; // Number does not matter
+ footprint.ready_pages = footprint.pages;
footprint
}
}
diff --git a/cumulus/parachain-template/pallets/template/README.md b/cumulus/parachain-template/pallets/template/README.md
deleted file mode 100644
index 5a6461233465c327d233fc5d97bdb3a6a85f8fd9..0000000000000000000000000000000000000000
--- a/cumulus/parachain-template/pallets/template/README.md
+++ /dev/null
@@ -1 +0,0 @@
-License: Unlicense
diff --git a/cumulus/parachain-template/pallets/template/src/benchmarking.rs b/cumulus/parachain-template/pallets/template/src/benchmarking.rs
deleted file mode 100644
index 8bba2a09867dea1d55e487661c01fd72acdf4dc9..0000000000000000000000000000000000000000
--- a/cumulus/parachain-template/pallets/template/src/benchmarking.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-//! Benchmarking setup for pallet-parachain-template
-
-use super::*;
-
-#[allow(unused)]
-use crate::Pallet as Template;
-use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller};
-use frame_system::RawOrigin;
-
-benchmarks! {
- do_something {
- let s in 0 .. 100;
- let caller: T::AccountId = whitelisted_caller();
- }: _(RawOrigin::Signed(caller), s)
- verify {
- assert_eq!(Something::::get(), Some(s));
- }
-}
-
-impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test,);
diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs
index dad2c4ac0cb54c161d89fb51c36cf8918f0834ef..c12dad68c740a121c1125b4c3514e51ea7f2db73 100644
--- a/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs
+++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs
@@ -15,6 +15,10 @@
mod genesis;
pub use genesis::{genesis, PenpalAssetOwner, PenpalSudoAcccount, ED, PARA_ID_A, PARA_ID_B};
+pub use penpal_runtime::xcm_config::{
+ CustomizableAssetFromSystemAssetHub, LocalTeleportableToAssetHub,
+ LocalTeleportableToAssetHubV3, XcmConfig,
+};
// Substrate
use frame_support::traits::OnInitialize;
diff --git a/cumulus/parachains/integration-tests/emulated/common/src/impls.rs b/cumulus/parachains/integration-tests/emulated/common/src/impls.rs
index b1b903830887fc130502ffb5eb74b1276a1c4577..5fc08dff32c454d053816f547ef90ec9b70e8b0c 100644
--- a/cumulus/parachains/integration-tests/emulated/common/src/impls.rs
+++ b/cumulus/parachains/integration-tests/emulated/common/src/impls.rs
@@ -265,7 +265,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain {
$crate::impls::assert_expected_events!(
Self,
vec![
- // XCM is succesfully received and proccessed
+ // XCM is successfully received and proccessed
[<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed {
origin: $crate::impls::AggregateMessageOrigin::Ump($crate::impls::UmpQueueId::Para(id)),
weight_used,
diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs
index a3f7eed1865b047aba6e6e4b173a487c151cdd1a..1e74d63e1d5235cc0e7bfd0d07f75655fdb3e5a5 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs
@@ -18,6 +18,7 @@ use codec::{Decode, Encode};
use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
use frame_support::pallet_prelude::TypeInfo;
use hex_literal::hex;
+use rococo_system_emulated_network::penpal_emulated_chain::CustomizableAssetFromSystemAssetHub;
use rococo_westend_system_emulated_network::BridgeHubRococoParaSender as BridgeHubRococoSender;
use snowbridge_core::outbound::OperatingMode;
use snowbridge_pallet_inbound_queue_fixtures::{
@@ -253,6 +254,16 @@ fn send_token_from_ethereum_to_penpal() {
(PenpalASender::get(), INITIAL_FUND),
]);
+ PenpalA::execute_with(|| {
+ assert_ok!(::System::set_storage(
+ ::RuntimeOrigin::root(),
+ vec![(
+ CustomizableAssetFromSystemAssetHub::key().to_vec(),
+ Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]).encode(),
+ )],
+ ));
+ });
+
// The Weth asset location, identified by the contract address on Ethereum
let weth_asset_location: Location =
(Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into();
diff --git a/cumulus/parachains/pallets/collective-content/src/benchmarking.rs b/cumulus/parachains/pallets/collective-content/src/benchmarking.rs
index 943386a842766129c2b5d429dc3a9648249ea73f..3d6bf073778a294e39287285ddb8379d57d36c8f 100644
--- a/cumulus/parachains/pallets/collective-content/src/benchmarking.rs
+++ b/cumulus/parachains/pallets/collective-content/src/benchmarking.rs
@@ -16,7 +16,7 @@
//! The pallet benchmarks.
use super::{Pallet as CollectiveContent, *};
-use frame_benchmarking::{impl_benchmark_test_suite, v2::*};
+use frame_benchmarking::v2::*;
use frame_support::traits::EnsureOrigin;
fn assert_last_event, I: 'static>(generic_event: >::RuntimeEvent) {
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
index 05936e93993231429d738edf15acc48150bcc542..3eb63a24b74e9eee4ded63cc591ec6ba8adb136b 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
@@ -119,6 +119,7 @@ runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
+ "pallet-asset-conversion-tx-payment/runtime-benchmarks",
"pallet-asset-conversion/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
@@ -130,6 +131,7 @@ runtime-benchmarks = [
"pallet-proxy/runtime-benchmarks",
"pallet-state-trie-migration/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-transaction-payment/runtime-benchmarks",
"pallet-uniques/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
index 17a12dd2f6f763f5d3bc22364b8f83fe3e401d44..32966ab6341d7bf4b2efae0cf008cfa6dfb67275 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
@@ -178,6 +178,7 @@ impl frame_system::Config for Runtime {
type Version = Version;
type AccountData = pallet_balances::AccountData;
type SystemWeightInfo = weights::frame_system::WeightInfo;
+ type ExtensionsWeightInfo = weights::frame_system_extensions::WeightInfo;
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode;
type MaxConsumers = frame_support::traits::ConstU32<16>;
@@ -234,6 +235,7 @@ impl pallet_transaction_payment::Config for Runtime {
type LengthToFee = ConstantMultiplier;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate;
type OperationalFeeMultiplier = ConstU8<5>;
+ type WeightInfo = weights::pallet_transaction_payment::WeightInfo;
}
parameter_types! {
@@ -761,6 +763,9 @@ impl pallet_asset_conversion_tx_payment::Config for Runtime {
type Fungibles = LocalAndForeignAssets;
type OnChargeAssetTransaction =
AssetConversionAdapter;
+ type WeightInfo = weights::pallet_asset_conversion_tx_payment::WeightInfo;
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = AssetConversionTxHelper;
}
parameter_types! {
@@ -948,8 +953,8 @@ pub type Block = generic::Block;
pub type SignedBlock = generic::SignedBlock;
/// BlockId type as expected by this runtime.
pub type BlockId = generic::BlockId;
-/// The SignedExtension to the basic transaction logic.
-pub type SignedExtra = (
+/// The extension to the basic transaction logic.
+pub type TxExtension = (
frame_system::CheckNonZeroSender,
frame_system::CheckSpecVersion,
frame_system::CheckTxVersion,
@@ -961,7 +966,7 @@ pub type SignedExtra = (
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
- generic::UncheckedExtrinsic;
+ generic::UncheckedExtrinsic;
/// Migrations to apply on runtime upgrade.
pub type Migrations = (
pallet_collator_selection::migration::v1::MigrateToV1,
@@ -1034,14 +1039,77 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;
+#[cfg(feature = "runtime-benchmarks")]
+pub struct AssetConversionTxHelper;
+
+#[cfg(feature = "runtime-benchmarks")]
+impl
+ pallet_asset_conversion_tx_payment::BenchmarkHelperTrait<
+ AccountId,
+ xcm::v3::MultiLocation,
+ xcm::v3::MultiLocation,
+ > for AssetConversionTxHelper
+{
+ fn create_asset_id_parameter(seed: u32) -> (xcm::v3::MultiLocation, xcm::v3::MultiLocation) {
+ // Use a different parachain' foreign assets pallet so that the asset is indeed foreign.
+ let asset_id = xcm::v3::MultiLocation::new(
+ 1,
+ xcm::v3::Junctions::X3(
+ xcm::v3::Junction::Parachain(3000),
+ xcm::v3::Junction::PalletInstance(53),
+ xcm::v3::Junction::GeneralIndex(seed.into()),
+ ),
+ );
+ (asset_id, asset_id)
+ }
+
+ fn setup_balances_and_pool(asset_id: xcm::v3::MultiLocation, account: AccountId) {
+ use frame_support::{assert_ok, traits::fungibles::Mutate};
+ assert_ok!(ForeignAssets::force_create(
+ RuntimeOrigin::root(),
+ asset_id.into(),
+ account.clone().into(), /* owner */
+ true, /* is_sufficient */
+ 1,
+ ));
+
+ let lp_provider = account.clone();
+ use frame_support::traits::Currency;
+ let _ = Balances::deposit_creating(&lp_provider, u64::MAX.into());
+ assert_ok!(ForeignAssets::mint_into(asset_id.into(), &lp_provider, u64::MAX.into()));
+
+ let token_native = Box::new(TokenLocationV3::get());
+ let token_second = Box::new(asset_id);
+
+ assert_ok!(AssetConversion::create_pool(
+ RuntimeOrigin::signed(lp_provider.clone()),
+ token_native.clone(),
+ token_second.clone()
+ ));
+
+ assert_ok!(AssetConversion::add_liquidity(
+ RuntimeOrigin::signed(lp_provider.clone()),
+ token_native,
+ token_second,
+ (u32::MAX / 8).into(), // 1 desired
+ u32::MAX.into(), // 2 desired
+ 1, // 1 min
+ 1, // 2 min
+ lp_provider,
+ ));
+ }
+}
+
#[cfg(feature = "runtime-benchmarks")]
mod benches {
frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::]
+ [frame_system_extensions, SystemExtensionsBench::]
[pallet_assets, Local]
[pallet_assets, Foreign]
[pallet_assets, Pool]
[pallet_asset_conversion, AssetConversion]
+ [pallet_asset_conversion_tx_payment, AssetTxPayment]
[pallet_balances, Balances]
[pallet_message_queue, MessageQueue]
[pallet_multisig, Multisig]
@@ -1052,6 +1120,7 @@ mod benches {
[pallet_uniques, Uniques]
[pallet_utility, Utility]
[pallet_timestamp, Timestamp]
+ [pallet_transaction_payment, TransactionPayment]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
@@ -1302,6 +1371,7 @@ impl_runtime_apis! {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
+ use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench;
@@ -1336,6 +1406,7 @@ impl_runtime_apis! {
use sp_storage::TrackedStorageKey;
use frame_system_benchmarking::Pallet as SystemBench;
+ use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
impl frame_system_benchmarking::Config for Runtime {
fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> {
ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/frame_system_extensions.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/frame_system_extensions.rs
new file mode 100644
index 0000000000000000000000000000000000000000..ed2c5f3056e3c44601fee945ccda3eab35444e12
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/frame_system_extensions.rs
@@ -0,0 +1,121 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `frame_system_extensions`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-12-21, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `gleipnir`, CPU: `AMD Ryzen 9 7900X 12-Core Processor`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/release/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=frame_system_extensions
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/
+// --chain=asset-hub-rococo-dev
+
+#![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_extensions`.
+pub struct WeightInfo(PhantomData);
+impl frame_system::ExtensionsWeightInfo for WeightInfo {
+ /// Storage: `System::BlockHash` (r:1 w:0)
+ /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
+ fn check_genesis() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `54`
+ // Estimated: `3509`
+ // Minimum execution time: 3_637_000 picoseconds.
+ Weight::from_parts(6_382_000, 0)
+ .saturating_add(Weight::from_parts(0, 3509))
+ .saturating_add(T::DbWeight::get().reads(1))
+ }
+ /// Storage: `System::BlockHash` (r:1 w:0)
+ /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
+ fn check_mortality() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `92`
+ // Estimated: `3509`
+ // Minimum execution time: 5_841_000 picoseconds.
+ Weight::from_parts(8_776_000, 0)
+ .saturating_add(Weight::from_parts(0, 3509))
+ .saturating_add(T::DbWeight::get().reads(1))
+ }
+ fn check_non_zero_sender() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 561_000 picoseconds.
+ Weight::from_parts(2_705_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_nonce() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 3_316_000 picoseconds.
+ Weight::from_parts(5_771_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_spec_version() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 511_000 picoseconds.
+ Weight::from_parts(2_575_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_tx_version() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 501_000 picoseconds.
+ Weight::from_parts(2_595_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ /// Storage: `System::AllExtrinsicsLen` (r:1 w:1)
+ /// Proof: `System::AllExtrinsicsLen` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
+ /// Storage: `System::BlockWeight` (r:1 w:1)
+ /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
+ fn check_weight() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `24`
+ // Estimated: `1533`
+ // Minimum execution time: 3_687_000 picoseconds.
+ Weight::from_parts(6_192_000, 0)
+ .saturating_add(Weight::from_parts(0, 1533))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/mod.rs
index fa9e86102c619c9ff68316cae2a27a7f79fea2e6..134b5341a401ca0f0918d3f04a79d2a4d1d9622d 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/mod.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/mod.rs
@@ -19,7 +19,9 @@ pub mod cumulus_pallet_parachain_system;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod frame_system;
+pub mod frame_system_extensions;
pub mod pallet_asset_conversion;
+pub mod pallet_asset_conversion_tx_payment;
pub mod pallet_assets_foreign;
pub mod pallet_assets_local;
pub mod pallet_assets_pool;
@@ -32,6 +34,7 @@ pub mod pallet_nfts;
pub mod pallet_proxy;
pub mod pallet_session;
pub mod pallet_timestamp;
+pub mod pallet_transaction_payment;
pub mod pallet_uniques;
pub mod pallet_utility;
pub mod pallet_xcm;
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_asset_conversion_tx_payment.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_asset_conversion_tx_payment.rs
new file mode 100644
index 0000000000000000000000000000000000000000..0a639b368af2248bdaf1efa7538d58a935dbe2e0
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_asset_conversion_tx_payment.rs
@@ -0,0 +1,92 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `pallet_asset_conversion_tx_payment`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2024-01-04, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `Georges-MacBook-Pro.local`, CPU: ``
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/debug/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=pallet_asset_conversion_tx_payment
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/
+// --chain=asset-hub-rococo-dev
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+
+use frame_support::{traits::Get, weights::Weight};
+use core::marker::PhantomData;
+
+/// Weight functions for `pallet_asset_conversion_tx_payment`.
+pub struct WeightInfo(PhantomData);
+impl pallet_asset_conversion_tx_payment::WeightInfo for WeightInfo {
+ fn charge_asset_tx_payment_zero() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 7_000_000 picoseconds.
+ Weight::from_parts(10_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:1 w:0)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_asset_tx_payment_native() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `4`
+ // Estimated: `3593`
+ // Minimum execution time: 209_000_000 picoseconds.
+ Weight::from_parts(212_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 3593))
+ .saturating_add(T::DbWeight::get().reads(2))
+ }
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `ForeignAssets::Asset` (r:1 w:1)
+ /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
+ /// Storage: `ForeignAssets::Account` (r:2 w:2)
+ /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:2 w:1)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_asset_tx_payment_asset() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `631`
+ // Estimated: `7404`
+ // Minimum execution time: 1_228_000_000 picoseconds.
+ Weight::from_parts(1_268_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 7404))
+ .saturating_add(T::DbWeight::get().reads(6))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_transaction_payment.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_transaction_payment.rs
new file mode 100644
index 0000000000000000000000000000000000000000..035f9a6dbe5167cb651736f705b817d4ba9027c4
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_transaction_payment.rs
@@ -0,0 +1,67 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `pallet_transaction_payment`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-12-21, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `gleipnir`, CPU: `AMD Ryzen 9 7900X 12-Core Processor`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/release/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=pallet_transaction_payment
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/
+// --chain=asset-hub-rococo-dev
+
+#![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_transaction_payment`.
+pub struct WeightInfo(PhantomData);
+impl pallet_transaction_payment::WeightInfo for WeightInfo {
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:1 w:1)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_transaction_payment() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `4`
+ // Estimated: `3593`
+ // Minimum execution time: 33_363_000 picoseconds.
+ Weight::from_parts(38_793_000, 0)
+ .saturating_add(Weight::from_parts(0, 3593))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
index 78c48507a7a44efadd39ab7729f9cadfe681cf8a..c10e02bd8a6c54d36969ca1f259892ce685b2665 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
@@ -110,6 +110,7 @@ runtime-benchmarks = [
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
+ "pallet-asset-conversion-tx-payment/runtime-benchmarks",
"pallet-asset-conversion/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
@@ -120,6 +121,7 @@ runtime-benchmarks = [
"pallet-nfts/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-transaction-payment/runtime-benchmarks",
"pallet-uniques/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
index 1ead28978550ca653c22df12f2588f406ce67f7f..5246828da310ad51e167756b0f12fe814acc6fff 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
@@ -162,6 +162,7 @@ impl frame_system::Config for Runtime {
type Version = Version;
type AccountData = pallet_balances::AccountData;
type SystemWeightInfo = weights::frame_system::WeightInfo;
+ type ExtensionsWeightInfo = weights::frame_system_extensions::WeightInfo;
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode;
type MaxConsumers = frame_support::traits::ConstU32<16>;
@@ -218,6 +219,7 @@ impl pallet_transaction_payment::Config for Runtime {
type LengthToFee = ConstantMultiplier;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate;
type OperationalFeeMultiplier = ConstU8<5>;
+ type WeightInfo = weights::pallet_transaction_payment::WeightInfo;
}
parameter_types! {
@@ -735,6 +737,9 @@ impl pallet_asset_conversion_tx_payment::Config for Runtime {
type Fungibles = LocalAndForeignAssets;
type OnChargeAssetTransaction =
AssetConversionAdapter;
+ type WeightInfo = weights::pallet_asset_conversion_tx_payment::WeightInfo;
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = AssetConversionTxHelper;
}
parameter_types! {
@@ -920,8 +925,8 @@ pub type Block = generic::Block;
pub type SignedBlock = generic::SignedBlock;
/// BlockId type as expected by this runtime.
pub type BlockId = generic::BlockId;
-/// The SignedExtension to the basic transaction logic.
-pub type SignedExtra = (
+/// The extension to the basic transaction logic.
+pub type TxExtension = (
frame_system::CheckNonZeroSender,
frame_system::CheckSpecVersion,
frame_system::CheckTxVersion,
@@ -933,7 +938,7 @@ pub type SignedExtra = (
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
- generic::UncheckedExtrinsic;
+ generic::UncheckedExtrinsic;
/// Migrations to apply on runtime upgrade.
pub type Migrations = (
@@ -1065,14 +1070,77 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;
+#[cfg(feature = "runtime-benchmarks")]
+pub struct AssetConversionTxHelper;
+
+#[cfg(feature = "runtime-benchmarks")]
+impl
+ pallet_asset_conversion_tx_payment::BenchmarkHelperTrait<
+ AccountId,
+ xcm::v3::MultiLocation,
+ xcm::v3::MultiLocation,
+ > for AssetConversionTxHelper
+{
+ fn create_asset_id_parameter(seed: u32) -> (xcm::v3::MultiLocation, xcm::v3::MultiLocation) {
+ // Use a different parachain' foreign assets pallet so that the asset is indeed foreign.
+ let asset_id = xcm::v3::MultiLocation::new(
+ 1,
+ xcm::v3::Junctions::X3(
+ xcm::v3::Junction::Parachain(3000),
+ xcm::v3::Junction::PalletInstance(53),
+ xcm::v3::Junction::GeneralIndex(seed.into()),
+ ),
+ );
+ (asset_id, asset_id)
+ }
+
+ fn setup_balances_and_pool(asset_id: xcm::v3::MultiLocation, account: AccountId) {
+ use frame_support::{assert_ok, traits::fungibles::Mutate};
+ assert_ok!(ForeignAssets::force_create(
+ RuntimeOrigin::root(),
+ asset_id.into(),
+ account.clone().into(), /* owner */
+ true, /* is_sufficient */
+ 1,
+ ));
+
+ let lp_provider = account.clone();
+ use frame_support::traits::Currency;
+ let _ = Balances::deposit_creating(&lp_provider, u64::MAX.into());
+ assert_ok!(ForeignAssets::mint_into(asset_id.into(), &lp_provider, u64::MAX.into()));
+
+ let token_native = Box::new(xcm::v3::MultiLocation::new(1, xcm::v3::Junctions::Here));
+ let token_second = Box::new(asset_id);
+
+ assert_ok!(AssetConversion::create_pool(
+ RuntimeOrigin::signed(lp_provider.clone()),
+ token_native.clone(),
+ token_second.clone()
+ ));
+
+ assert_ok!(AssetConversion::add_liquidity(
+ RuntimeOrigin::signed(lp_provider.clone()),
+ token_native,
+ token_second,
+ (u32::MAX / 2).into(), // 1 desired
+ u32::MAX.into(), // 2 desired
+ 1, // 1 min
+ 1, // 2 min
+ lp_provider,
+ ));
+ }
+}
+
#[cfg(feature = "runtime-benchmarks")]
mod benches {
frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::]
+ [frame_system_extensions, SystemExtensionsBench::]
[pallet_assets, Local]
[pallet_assets, Foreign]
[pallet_assets, Pool]
[pallet_asset_conversion, AssetConversion]
+ [pallet_asset_conversion_tx_payment, AssetTxPayment]
[pallet_balances, Balances]
[pallet_message_queue, MessageQueue]
[pallet_multisig, Multisig]
@@ -1083,6 +1151,7 @@ mod benches {
[pallet_uniques, Uniques]
[pallet_utility, Utility]
[pallet_timestamp, Timestamp]
+ [pallet_transaction_payment, TransactionPayment]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
@@ -1379,6 +1448,7 @@ impl_runtime_apis! {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
+ use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench;
@@ -1413,6 +1483,7 @@ impl_runtime_apis! {
use sp_storage::TrackedStorageKey;
use frame_system_benchmarking::Pallet as SystemBench;
+ use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
impl frame_system_benchmarking::Config for Runtime {
fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> {
ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/frame_system_extensions.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/frame_system_extensions.rs
new file mode 100644
index 0000000000000000000000000000000000000000..46f4f2bfd9668ce7316bf1a4a7a0c71833fd7f7d
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/frame_system_extensions.rs
@@ -0,0 +1,121 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `frame_system_extensions`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-12-21, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `gleipnir`, CPU: `AMD Ryzen 9 7900X 12-Core Processor`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/release/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=frame_system_extensions
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/
+// --chain=asset-hub-westend-dev
+
+#![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_extensions`.
+pub struct WeightInfo(PhantomData);
+impl frame_system::ExtensionsWeightInfo for WeightInfo {
+ /// Storage: `System::BlockHash` (r:1 w:0)
+ /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
+ fn check_genesis() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `54`
+ // Estimated: `3509`
+ // Minimum execution time: 3_206_000 picoseconds.
+ Weight::from_parts(6_212_000, 0)
+ .saturating_add(Weight::from_parts(0, 3509))
+ .saturating_add(T::DbWeight::get().reads(1))
+ }
+ /// Storage: `System::BlockHash` (r:1 w:0)
+ /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
+ fn check_mortality() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `92`
+ // Estimated: `3509`
+ // Minimum execution time: 5_851_000 picoseconds.
+ Weight::from_parts(8_847_000, 0)
+ .saturating_add(Weight::from_parts(0, 3509))
+ .saturating_add(T::DbWeight::get().reads(1))
+ }
+ fn check_non_zero_sender() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 631_000 picoseconds.
+ Weight::from_parts(3_086_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_nonce() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 3_446_000 picoseconds.
+ Weight::from_parts(5_911_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_spec_version() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 481_000 picoseconds.
+ Weight::from_parts(2_916_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_tx_version() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 501_000 picoseconds.
+ Weight::from_parts(2_595_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ /// Storage: `System::AllExtrinsicsLen` (r:1 w:1)
+ /// Proof: `System::AllExtrinsicsLen` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
+ /// Storage: `System::BlockWeight` (r:1 w:1)
+ /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
+ fn check_weight() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `24`
+ // Estimated: `1533`
+ // Minimum execution time: 3_927_000 picoseconds.
+ Weight::from_parts(6_613_000, 0)
+ .saturating_add(Weight::from_parts(0, 1533))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
index 2f1fcfb05f39151e018d74e8587faa0e79afd8b6..691ed2e57304a1829de76b030a4ef5ed4b3f436f 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
@@ -18,7 +18,9 @@ pub mod cumulus_pallet_parachain_system;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod frame_system;
+pub mod frame_system_extensions;
pub mod pallet_asset_conversion;
+pub mod pallet_asset_conversion_tx_payment;
pub mod pallet_assets_foreign;
pub mod pallet_assets_local;
pub mod pallet_assets_pool;
@@ -31,6 +33,7 @@ pub mod pallet_nfts;
pub mod pallet_proxy;
pub mod pallet_session;
pub mod pallet_timestamp;
+pub mod pallet_transaction_payment;
pub mod pallet_uniques;
pub mod pallet_utility;
pub mod pallet_xcm;
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_asset_conversion_tx_payment.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_asset_conversion_tx_payment.rs
new file mode 100644
index 0000000000000000000000000000000000000000..8fe302630fb9510d0e1c01ca9de37a1bd0be3a4f
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_asset_conversion_tx_payment.rs
@@ -0,0 +1,92 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `pallet_asset_conversion_tx_payment`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2024-01-04, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `Georges-MacBook-Pro.local`, CPU: ``
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/debug/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=pallet_asset_conversion_tx_payment
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/
+// --chain=asset-hub-westend-dev
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+
+use frame_support::{traits::Get, weights::Weight};
+use core::marker::PhantomData;
+
+/// Weight functions for `pallet_asset_conversion_tx_payment`.
+pub struct WeightInfo(PhantomData);
+impl pallet_asset_conversion_tx_payment::WeightInfo for WeightInfo {
+ fn charge_asset_tx_payment_zero() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 8_000_000 picoseconds.
+ Weight::from_parts(9_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:1 w:0)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_asset_tx_payment_native() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `4`
+ // Estimated: `3593`
+ // Minimum execution time: 214_000_000 picoseconds.
+ Weight::from_parts(219_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 3593))
+ .saturating_add(T::DbWeight::get().reads(2))
+ }
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `ForeignAssets::Asset` (r:1 w:1)
+ /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
+ /// Storage: `ForeignAssets::Account` (r:2 w:2)
+ /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:2 w:1)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_asset_tx_payment_asset() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `631`
+ // Estimated: `7404`
+ // Minimum execution time: 1_211_000_000 picoseconds.
+ Weight::from_parts(1_243_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 7404))
+ .saturating_add(T::DbWeight::get().reads(6))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_transaction_payment.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_transaction_payment.rs
new file mode 100644
index 0000000000000000000000000000000000000000..b4c78a78b489073648156133730bd39cd3c68497
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_transaction_payment.rs
@@ -0,0 +1,67 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `pallet_transaction_payment`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-12-21, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `gleipnir`, CPU: `AMD Ryzen 9 7900X 12-Core Processor`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/release/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=pallet_transaction_payment
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/
+// --chain=asset-hub-westend-dev
+
+#![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_transaction_payment`.
+pub struct WeightInfo(PhantomData);
+impl pallet_transaction_payment::WeightInfo for WeightInfo {
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:1 w:1)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_transaction_payment() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `4`
+ // Estimated: `3593`
+ // Minimum execution time: 40_847_000 picoseconds.
+ Weight::from_parts(49_674_000, 0)
+ .saturating_add(Weight::from_parts(0, 3593))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+}
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
index 7a1951fd24bd2d74ae722eef31b81dfdb28c8d9b..242627815d3a5ced13a99d9f7f7c075e55c63200 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
@@ -242,6 +242,7 @@ runtime-benchmarks = [
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-transaction-payment/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm-bridge-hub/runtime-benchmarks",
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs
index 6dbf96edc2ab0360385b8e04bf1dc52732abd9ca..323e6ed65e69c22ae6be6f80bb26b4e6455bbb94 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs
@@ -40,7 +40,7 @@ use bridge_runtime_common::{
XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge,
},
refund_relayer_extension::{
- ActualFeeRefund, RefundBridgedGrandpaMessages, RefundSignedExtensionAdapter,
+ ActualFeeRefund, RefundBridgedGrandpaMessages, RefundTransactionExtensionAdapter,
RefundableMessagesLane,
},
};
@@ -168,7 +168,7 @@ impl messages::BridgedChainWithMessages for RococoBulletin {}
/// Signed extension that refunds relayers that are delivering messages from the Rococo Bulletin
/// chain.
-pub type OnBridgeHubRococoRefundRococoBulletinMessages = RefundSignedExtensionAdapter<
+pub type OnBridgeHubRococoRefundRococoBulletinMessages = RefundTransactionExtensionAdapter<
RefundBridgedGrandpaMessages<
Runtime,
BridgeGrandpaRococoBulletinInstance,
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs
index 5d55d7afbacfdb22f6939c88e87eaf64321945ff..05d1aa188d2d3abd114431e6ee388473dca8f982 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs
@@ -39,7 +39,7 @@ use bridge_runtime_common::{
XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge,
},
refund_relayer_extension::{
- ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter,
+ ActualFeeRefund, RefundBridgedParachainMessages, RefundTransactionExtensionAdapter,
RefundableMessagesLane, RefundableParachain,
},
};
@@ -173,7 +173,7 @@ impl UnderlyingChainProvider for BridgeHubWestend {
impl messages::BridgedChainWithMessages for BridgeHubWestend {}
/// Signed extension that refunds relayers that are delivering messages from the Westend parachain.
-pub type OnBridgeHubRococoRefundBridgeHubWestendMessages = RefundSignedExtensionAdapter<
+pub type OnBridgeHubRococoRefundBridgeHubWestendMessages = RefundTransactionExtensionAdapter<
RefundBridgedParachainMessages<
Runtime,
RefundableParachain<
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
index 0b48d1717fa96c4854371e44ae792d0ce41dc2e2..16e3b2e8600f6df3721926b3ab597023d443bccc 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
@@ -115,8 +115,8 @@ pub type SignedBlock = generic::SignedBlock;
/// BlockId type as expected by this runtime.
pub type BlockId = generic::BlockId;
-/// The SignedExtension to the basic transaction logic.
-pub type SignedExtra = (
+/// The TransactionExtension to the basic transaction logic.
+pub type TxExtension = (
frame_system::CheckNonZeroSender,
frame_system::CheckSpecVersion,
frame_system::CheckTxVersion,
@@ -134,7 +134,7 @@ pub type SignedExtra = (
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
- generic::UncheckedExtrinsic;
+ generic::UncheckedExtrinsic;
/// Migrations to apply on runtime upgrade.
pub type Migrations = (
@@ -262,6 +262,8 @@ impl frame_system::Config for Runtime {
type DbWeight = RocksDbWeight;
/// Weight information for the extrinsics of this pallet.
type SystemWeightInfo = weights::frame_system::WeightInfo;
+ /// Weight information for the extensions of this pallet.
+ type ExtensionsWeightInfo = weights::frame_system_extensions::WeightInfo;
/// Block & extrinsics weights: base values and limits.
type BlockWeights = RuntimeBlockWeights;
/// The maximum length of a block (in bytes).
@@ -324,6 +326,7 @@ impl pallet_transaction_payment::Config for Runtime {
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate;
+ type WeightInfo = weights::pallet_transaction_payment::WeightInfo;
}
parameter_types! {
@@ -759,12 +762,14 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
mod benches {
frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::]
+ [frame_system_extensions, SystemExtensionsBench::]
[pallet_balances, Balances]
[pallet_message_queue, MessageQueue]
[pallet_multisig, Multisig]
[pallet_session, SessionBench::]
[pallet_utility, Utility]
[pallet_timestamp, Timestamp]
+ [pallet_transaction_payment, TransactionPayment]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
@@ -1065,6 +1070,7 @@ impl_runtime_apis! {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
+ use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
@@ -1095,6 +1101,7 @@ impl_runtime_apis! {
use sp_storage::TrackedStorageKey;
use frame_system_benchmarking::Pallet as SystemBench;
+ use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
impl frame_system_benchmarking::Config for Runtime {
fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> {
ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);
@@ -1478,16 +1485,16 @@ mod tests {
use codec::Encode;
use sp_runtime::{
generic::Era,
- traits::{SignedExtension, Zero},
+ traits::{TransactionExtensionBase, Zero},
};
#[test]
fn ensure_signed_extension_definition_is_compatible_with_relay() {
- use bp_polkadot_core::SuffixedCommonSignedExtensionExt;
+ use bp_polkadot_core::SuffixedCommonTransactionExtensionExt;
sp_io::TestExternalities::default().execute_with(|| {
frame_system::BlockHash::::insert(BlockNumber::zero(), Hash::default());
- let payload: SignedExtra = (
+ let payload: TxExtension = (
frame_system::CheckNonZeroSender::new(),
frame_system::CheckSpecVersion::new(),
frame_system::CheckTxVersion::new(),
@@ -1501,11 +1508,11 @@ mod tests {
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),
bridge_to_bulletin_config::OnBridgeHubRococoRefundRococoBulletinMessages::default(),
)
- );
+ ).into();
// for BridgeHubRococo
{
- let bhr_indirect_payload = bp_bridge_hub_rococo::SignedExtension::from_params(
+ let bhr_indirect_payload = bp_bridge_hub_rococo::TransactionExtension::from_params(
VERSION.spec_version,
VERSION.transaction_version,
bp_runtime::TransactionEra::Immortal,
@@ -1516,8 +1523,8 @@ mod tests {
);
assert_eq!(payload.encode(), bhr_indirect_payload.encode());
assert_eq!(
- payload.additional_signed().unwrap().encode(),
- bhr_indirect_payload.additional_signed().unwrap().encode()
+ payload.implicit().unwrap().encode(),
+ bhr_indirect_payload.implicit().unwrap().encode()
)
}
});
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system_extensions.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system_extensions.rs
new file mode 100644
index 0000000000000000000000000000000000000000..99e3d6aeba02349af3f4413a2e35d5a81a2a5073
--- /dev/null
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system_extensions.rs
@@ -0,0 +1,121 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `frame_system_extensions`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-12-21, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `gleipnir`, CPU: `AMD Ryzen 9 7900X 12-Core Processor`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/release/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=frame_system_extensions
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
+// --chain=bridge-hub-rococo-dev
+
+#![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_extensions`.
+pub struct WeightInfo(PhantomData);
+impl frame_system::ExtensionsWeightInfo for WeightInfo {
+ /// Storage: `System::BlockHash` (r:1 w:0)
+ /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
+ fn check_genesis() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `54`
+ // Estimated: `3509`
+ // Minimum execution time: 3_136_000 picoseconds.
+ Weight::from_parts(5_842_000, 0)
+ .saturating_add(Weight::from_parts(0, 3509))
+ .saturating_add(T::DbWeight::get().reads(1))
+ }
+ /// Storage: `System::BlockHash` (r:1 w:0)
+ /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
+ fn check_mortality() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `92`
+ // Estimated: `3509`
+ // Minimum execution time: 5_771_000 picoseconds.
+ Weight::from_parts(8_857_000, 0)
+ .saturating_add(Weight::from_parts(0, 3509))
+ .saturating_add(T::DbWeight::get().reads(1))
+ }
+ fn check_non_zero_sender() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 732_000 picoseconds.
+ Weight::from_parts(2_875_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_nonce() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 3_627_000 picoseconds.
+ Weight::from_parts(6_322_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_spec_version() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 471_000 picoseconds.
+ Weight::from_parts(2_455_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ fn check_tx_version() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0`
+ // Estimated: `0`
+ // Minimum execution time: 491_000 picoseconds.
+ Weight::from_parts(2_916_000, 0)
+ .saturating_add(Weight::from_parts(0, 0))
+ }
+ /// Storage: `System::AllExtrinsicsLen` (r:1 w:1)
+ /// Proof: `System::AllExtrinsicsLen` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
+ /// Storage: `System::BlockWeight` (r:1 w:1)
+ /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
+ fn check_weight() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `24`
+ // Estimated: `1533`
+ // Minimum execution time: 3_798_000 picoseconds.
+ Weight::from_parts(6_272_000, 0)
+ .saturating_add(Weight::from_parts(0, 1533))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+}
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs
index aac39a4564fb600d9c4f623aa3ba27c78fc8f5fc..d97a30db9541bb01919f0a7a054f42d95816e875 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs
@@ -25,6 +25,7 @@ pub mod cumulus_pallet_parachain_system;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod frame_system;
+pub mod frame_system_extensions;
pub mod pallet_balances;
pub mod pallet_bridge_grandpa;
pub mod pallet_bridge_messages_rococo_to_rococo_bulletin;
@@ -36,6 +37,7 @@ pub mod pallet_message_queue;
pub mod pallet_multisig;
pub mod pallet_session;
pub mod pallet_timestamp;
+pub mod pallet_transaction_payment;
pub mod pallet_utility;
pub mod pallet_xcm;
pub mod paritydb_weights;
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_transaction_payment.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_transaction_payment.rs
new file mode 100644
index 0000000000000000000000000000000000000000..71d17e7259f72c023be3d75f37300c1a45c41d6f
--- /dev/null
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_transaction_payment.rs
@@ -0,0 +1,67 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+//! Autogenerated weights for `pallet_transaction_payment`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-12-21, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `gleipnir`, CPU: `AMD Ryzen 9 7900X 12-Core Processor`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
+
+// Executed Command:
+// ./target/release/polkadot-parachain
+// benchmark
+// pallet
+// --wasm-execution=compiled
+// --pallet=pallet_transaction_payment
+// --no-storage-info
+// --no-median-slopes
+// --no-min-squares
+// --extrinsic=*
+// --steps=2
+// --repeat=2
+// --json
+// --header=./cumulus/file_header.txt
+// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
+// --chain=bridge-hub-rococo-dev
+
+#![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_transaction_payment`.
+pub struct WeightInfo(PhantomData);
+impl pallet_transaction_payment::WeightInfo for WeightInfo {
+ /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
+ /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:1 w:1)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ fn charge_transaction_payment() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `3`
+ // Estimated: `3593`
+ // Minimum execution time: 34_956_000 picoseconds.
+ Weight::from_parts(40_788_000, 0)
+ .saturating_add(Weight::from_parts(0, 3593))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+}
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/snowbridge.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/snowbridge.rs
index 239bd946e759b1c8aa1e892912b5bce8093bde00..46c5df18a1586e77d0bc0f9eb5f9ed19fa689f59 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/snowbridge.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/snowbridge.rs
@@ -22,7 +22,7 @@ use bridge_hub_rococo_runtime::{
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages,
xcm_config::XcmConfig, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages,
Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys,
- SignedExtra, UncheckedExtrinsic,
+ TxExtension, UncheckedExtrinsic,
};
use codec::{Decode, Encode};
use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees};
@@ -171,7 +171,7 @@ fn construct_extrinsic(
call: RuntimeCall,
) -> UncheckedExtrinsic {
let account_id = AccountId32::from(sender.public());
- let extra: SignedExtra = (
+ let tx_ext: TxExtension = (
frame_system::CheckNonZeroSender::::new(),
frame_system::CheckSpecVersion::::new(),
frame_system::CheckTxVersion::::new(),
@@ -188,13 +188,13 @@ fn construct_extrinsic(
OnBridgeHubRococoRefundRococoBulletinMessages::default(),
),
);
- let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
+ let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(
call,
account_id.into(),
Signature::Sr25519(signature.clone()),
- extra,
+ tx_ext,
)
}
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
index f11954cf165fdae2ee36377456b2bc4b2d6755a6..565343c55a5b66d4e2510cda01ba521ba6eee850 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
@@ -22,7 +22,7 @@ use bridge_hub_rococo_runtime::{
xcm_config::{RelayNetwork, TokenLocation, XcmConfig},
AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress,
Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall,
- RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic,
+ RuntimeEvent, RuntimeOrigin, SessionKeys, TransactionPayment, TxExtension, UncheckedExtrinsic,
};
use bridge_hub_test_utils::SlotDurations;
use codec::{Decode, Encode};
@@ -48,7 +48,7 @@ fn construct_extrinsic(
call: RuntimeCall,
) -> UncheckedExtrinsic {
let account_id = AccountId32::from(sender.public());
- let extra: SignedExtra = (
+ let tx_ext: TxExtension = (
frame_system::CheckNonZeroSender::::new(),
frame_system::CheckSpecVersion::::new(),
frame_system::CheckTxVersion::::new(),
@@ -64,14 +64,15 @@ fn construct_extrinsic(
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),
bridge_to_bulletin_config::OnBridgeHubRococoRefundRococoBulletinMessages::default(),
),
- );
- let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
+ )
+ .into();
+ let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(
call,
account_id.into(),
Signature::Sr25519(signature.clone()),
- extra,
+ tx_ext,
)
}
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
index 8623f7cb366ecf3930b25563d6a912e53240d999..b5fe093b8be79c21e3298548e07b8327004d2a26 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
@@ -204,6 +204,7 @@ runtime-benchmarks = [
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-transaction-payment/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm-bridge-hub/runtime-benchmarks",
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs
index bce722aa5f87d006af0ec71429d6c84eeab4972d..934dce5c2c481092fed1a73162e3f7b1f0967a11 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs
@@ -36,7 +36,7 @@ use bridge_runtime_common::{
XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge,
},
refund_relayer_extension::{
- ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter,
+ ActualFeeRefund, RefundBridgedParachainMessages, RefundTransactionExtensionAdapter,
RefundableMessagesLane, RefundableParachain,
},
};
@@ -190,7 +190,7 @@ impl ThisChainWithMessages for BridgeHubWestend {
}
/// Signed extension that refunds relayers that are delivering messages from the Rococo parachain.
-pub type OnBridgeHubWestendRefundBridgeHubRococoMessages = RefundSignedExtensionAdapter<
+pub type OnBridgeHubWestendRefundBridgeHubRococoMessages = RefundTransactionExtensionAdapter<
RefundBridgedParachainMessages<
Runtime,
RefundableParachain,
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
index e1344fce63dc9bad063c5b7f0d620a9a10bbf666..86ed8b2f488c1c7d9ac389582754d05019a3e45c 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
@@ -97,8 +97,8 @@ pub type SignedBlock = generic::SignedBlock;
/// BlockId type as expected by this runtime.
pub type BlockId = generic::BlockId;
-/// The SignedExtension to the basic transaction logic.
-pub type SignedExtra = (
+/// The TransactionExtension to the basic transaction logic.
+pub type TxExtension = (
frame_system::CheckNonZeroSender,
frame_system::CheckSpecVersion,
frame_system::CheckTxVersion