mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
This PR reverts #2280 which introduced `TransactionExtension` to replace `SignedExtension`. As a result of the discussion [here](https://github.com/paritytech/polkadot-sdk/pull/3623#issuecomment-1986789700), the changes will be reverted for now with plans to reintroduce the concept in the future. --------- Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
@@ -97,8 +97,8 @@ pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
/// BlockId type as expected by this runtime.
|
||||
pub type BlockId = generic::BlockId<Block>;
|
||||
|
||||
/// The TransactionExtension to the basic transaction logic.
|
||||
pub type TxExtension = (
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
frame_system::CheckNonZeroSender<Runtime>,
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
@@ -113,7 +113,7 @@ pub type TxExtension = (
|
||||
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic =
|
||||
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
|
||||
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||
|
||||
/// Migrations to apply on runtime upgrade.
|
||||
pub type Migrations = (
|
||||
@@ -298,7 +298,6 @@ impl pallet_transaction_payment::Config for Runtime {
|
||||
type WeightToFee = WeightToFee;
|
||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
|
||||
type WeightInfo = weights::pallet_transaction_payment::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -516,14 +515,12 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
|
||||
mod benches {
|
||||
frame_benchmarking::define_benchmarks!(
|
||||
[frame_system, SystemBench::<Runtime>]
|
||||
[frame_system_extensions, SystemExtensionsBench::<Runtime>]
|
||||
[pallet_balances, Balances]
|
||||
[pallet_message_queue, MessageQueue]
|
||||
[pallet_multisig, Multisig]
|
||||
[pallet_session, SessionBench::<Runtime>]
|
||||
[pallet_utility, Utility]
|
||||
[pallet_timestamp, Timestamp]
|
||||
[pallet_transaction_payment, TransactionPayment]
|
||||
[pallet_collator_selection, CollatorSelection]
|
||||
[cumulus_pallet_parachain_system, ParachainSystem]
|
||||
[cumulus_pallet_xcmp_queue, XcmpQueue]
|
||||
@@ -764,7 +761,6 @@ 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;
|
||||
|
||||
@@ -794,7 +790,6 @@ 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<u8>) -> Result<(), BenchmarkError> {
|
||||
ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);
|
||||
@@ -1140,16 +1135,16 @@ mod tests {
|
||||
use codec::Encode;
|
||||
use sp_runtime::{
|
||||
generic::Era,
|
||||
traits::{TransactionExtensionBase, Zero},
|
||||
traits::{SignedExtension, Zero},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn ensure_signed_extension_definition_is_compatible_with_relay() {
|
||||
use bp_polkadot_core::SuffixedCommonTransactionExtensionExt;
|
||||
use bp_polkadot_core::SuffixedCommonSignedExtensionExt;
|
||||
|
||||
sp_io::TestExternalities::default().execute_with(|| {
|
||||
frame_system::BlockHash::<Runtime>::insert(BlockNumber::zero(), Hash::default());
|
||||
let payload: TxExtension = (
|
||||
let payload: SignedExtra = (
|
||||
frame_system::CheckNonZeroSender::new(),
|
||||
frame_system::CheckSpecVersion::new(),
|
||||
frame_system::CheckTxVersion::new(),
|
||||
@@ -1162,10 +1157,10 @@ mod tests {
|
||||
(
|
||||
bridge_to_rococo_config::OnBridgeHubWestendRefundBridgeHubRococoMessages::default(),
|
||||
),
|
||||
).into();
|
||||
);
|
||||
|
||||
{
|
||||
let bh_indirect_payload = bp_bridge_hub_westend::TransactionExtension::from_params(
|
||||
let bh_indirect_payload = bp_bridge_hub_westend::SignedExtension::from_params(
|
||||
VERSION.spec_version,
|
||||
VERSION.transaction_version,
|
||||
bp_runtime::TransactionEra::Immortal,
|
||||
@@ -1176,8 +1171,8 @@ mod tests {
|
||||
);
|
||||
assert_eq!(payload.encode(), bh_indirect_payload.encode());
|
||||
assert_eq!(
|
||||
payload.implicit().unwrap().encode(),
|
||||
bh_indirect_payload.implicit().unwrap().encode()
|
||||
payload.additional_signed().unwrap().encode(),
|
||||
bh_indirect_payload.additional_signed().unwrap().encode()
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user