From a7b52fd4a45a3f4e04a044c68c993f1dc2928782 Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Mon, 4 Sep 2023 12:02:01 +1200 Subject: [PATCH] remove with_fee_paid_by (#2601) * remove with_fee_paid_by * update comment --- modules/transaction-payment/src/lib.rs | 29 +---- modules/transaction-payment/src/tests.rs | 56 --------- modules/transaction-payment/src/weights.rs | 9 -- primitives/src/unchecked_extrinsic.rs | 48 +++----- runtime/acala/src/lib.rs | 38 +----- .../src/weights/module_transaction_payment.rs | 7 -- runtime/karura/src/lib.rs | 38 +----- .../src/weights/module_transaction_payment.rs | 7 -- .../src/benchmarking/transaction_payment.rs | 12 -- runtime/mandala/src/lib.rs | 108 +----------------- .../src/weights/module_transaction_payment.rs | 10 -- 11 files changed, 27 insertions(+), 335 deletions(-) diff --git a/modules/transaction-payment/src/lib.rs b/modules/transaction-payment/src/lib.rs index 6b645db4d6..94f77224ff 100644 --- a/modules/transaction-payment/src/lib.rs +++ b/modules/transaction-payment/src/lib.rs @@ -54,7 +54,7 @@ use sp_runtime::{ transaction_validity::{ InvalidTransaction, TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransaction, }, - FixedPointNumber, FixedPointOperand, MultiSignature, Percent, Perquintill, + FixedPointNumber, FixedPointOperand, Percent, Perquintill, }; use sp_std::prelude::*; use support::{AggregatedSwapPath, BuyWeightRate, PriceProvider, Ratio, Swap, SwapLimit, TransactionPayment}; @@ -639,21 +639,8 @@ pub mod module { call.dispatch(origin) } - /// Wrap call with fee paid by other account - #[pallet::call_index(5)] - #[pallet::weight({ - let dispatch_info = call.get_dispatch_info(); - (T::WeightInfo::with_fee_paid_by().saturating_add(dispatch_info.weight), dispatch_info.class,) - })] - pub fn with_fee_paid_by( - origin: OriginFor, - call: Box>, - _payer_addr: T::AccountId, - _payer_sig: MultiSignature, - ) -> DispatchResultWithPostInfo { - ensure_signed(origin.clone())?; - call.dispatch(origin) - } + // call index 5 with_fee_paid_by was removed + // https://github.com/AcalaNetwork/Acala/pull/2601 /// Dapp wrap call, and user pay tx fee as provided aggregated swap path. this dispatch call /// should make sure the trading path is valid. @@ -932,16 +919,6 @@ where .map(|_| (who.clone(), custom_fee_surplus)) } } - Some(Call::with_fee_paid_by { - call: _, - payer_addr, - payer_sig: _, - }) => { - // validate payer signature in runtime side, because `SignedExtension` between different runtime - // may be different. - Self::native_then_alternative_or_default(payer_addr, fee, WithdrawReasons::TRANSACTION_PAYMENT) - .map(|surplus| (payer_addr.clone(), surplus)) - } _ => Self::native_then_alternative_or_default(who, fee, reason).map(|surplus| (who.clone(), surplus)), } } diff --git a/modules/transaction-payment/src/tests.rs b/modules/transaction-payment/src/tests.rs index 2cea868952..ecd71fa254 100644 --- a/modules/transaction-payment/src/tests.rs +++ b/modules/transaction-payment/src/tests.rs @@ -92,16 +92,6 @@ fn with_fee_currency_call(currency_id: CurrencyId) -> ::Runti fee_call } -fn with_fee_paid_by_call(payer_addr: AccountId, payer_sig: MultiSignature) -> ::RuntimeCall { - let fee_call: ::RuntimeCall = - RuntimeCall::TransactionPayment(crate::mock::transaction_payment::Call::with_fee_paid_by { - call: Box::new(CALL), - payer_addr, - payer_sig, - }); - fee_call -} - fn with_fee_aggregated_path_by_call( fee_aggregated_path: Vec>, ) -> ::RuntimeCall { @@ -878,52 +868,6 @@ fn charges_fee_when_validate_with_fee_currency_call_use_pool() { }); } -#[test] -fn charges_fee_when_validate_with_fee_paid_by_native_token() { - // Enable dex with Alice, and initialize tx charge fee pool - builder_with_dex_and_fee_pool(true).execute_with(|| { - // make a fake signature - let signature = MultiSignature::Sr25519(sp_core::sr25519::Signature([0u8; 64])); - // payer has enough native asset - assert_ok!(Currencies::update_balance(RuntimeOrigin::root(), BOB, ACA, 500,)); - - let fee: Balance = 50 * 2 + 100; - assert_ok!(ChargeTransactionPayment::::from(0).validate( - &ALICE, - &with_fee_paid_by_call(BOB, signature), - &INFO2, - 50 - )); - assert_eq!(500 - fee, Currencies::free_balance(ACA, &BOB)); - }); -} - -#[test] -fn charges_fee_when_validate_with_fee_paid_by_default_token() { - // Enable dex with Alice, and initialize tx charge fee pool - builder_with_dex_and_fee_pool(true).execute_with(|| { - let ausd_acc = Pallet::::sub_account_id(AUSD); - assert_eq!(100, Currencies::free_balance(AUSD, &ausd_acc)); - assert_eq!(10000, Currencies::free_balance(ACA, &ausd_acc)); - - // make a fake signature - let signature = MultiSignature::Sr25519(sp_core::sr25519::Signature([0u8; 64])); - // payer has enough native asset - assert_ok!(Currencies::update_balance(RuntimeOrigin::root(), BOB, AUSD, 5000,)); - - assert_ok!(ChargeTransactionPayment::::from(0).validate( - &ALICE, - &with_fee_paid_by_call(BOB, signature), - &INFO2, - 50 - )); - assert_eq!(2700, Currencies::free_balance(AUSD, &ausd_acc)); - assert_eq!(9740, Currencies::free_balance(ACA, &ausd_acc)); - assert_eq!(2400, Currencies::free_balance(AUSD, &BOB)); - assert_eq!(10, Currencies::free_balance(ACA, &BOB)); - }); -} - #[test] fn charges_fee_when_validate_and_native_is_not_enough() { // Enable dex with Alice, and initialize tx charge fee pool diff --git a/modules/transaction-payment/src/weights.rs b/modules/transaction-payment/src/weights.rs index a8f77bf2b9..bfc40b6842 100644 --- a/modules/transaction-payment/src/weights.rs +++ b/modules/transaction-payment/src/weights.rs @@ -53,7 +53,6 @@ pub trait WeightInfo { fn with_fee_path() -> Weight; fn with_fee_aggregated_path() -> Weight; fn with_fee_currency() -> Weight; - fn with_fee_paid_by() -> Weight; } /// Weights for module_transaction_payment using the Acala node and recommended hardware. @@ -102,10 +101,6 @@ impl WeightInfo for AcalaWeight { Weight::from_parts(193_000_000, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - fn with_fee_paid_by() -> Weight { - Weight::from_parts(193_000_000, 0) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - } // Storage: TransactionPayment NextFeeMultiplier (r:1 w:1) // Storage: System BlockWeight (r:1 w:0) fn on_finalize() -> Weight { @@ -147,8 +142,4 @@ impl WeightInfo for () { Weight::from_parts(193_000_000, 0) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } - fn with_fee_paid_by() -> Weight { - Weight::from_parts(193_000_000, 0) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - } } diff --git a/primitives/src/unchecked_extrinsic.rs b/primitives/src/unchecked_extrinsic.rs index bc89cb56a1..d42e7f635c 100644 --- a/primitives/src/unchecked_extrinsic.rs +++ b/primitives/src/unchecked_extrinsic.rs @@ -39,21 +39,14 @@ use sp_std::alloc::format; use sp_std::{marker::PhantomData, prelude::*}; #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] -#[scale_info(skip_type_params(ConvertEthTx, CheckPayerTx))] -pub struct AcalaUncheckedExtrinsic< - Call, - Extra: SignedExtension, - ConvertEthTx, - StorageDepositPerByte, - TxFeePerGas, - CheckPayerTx, ->( +#[scale_info(skip_type_params(ConvertEthTx))] +pub struct AcalaUncheckedExtrinsic( pub UncheckedExtrinsic, - PhantomData<(ConvertEthTx, StorageDepositPerByte, TxFeePerGas, CheckPayerTx)>, + PhantomData<(ConvertEthTx, StorageDepositPerByte, TxFeePerGas)>, ); -impl Extrinsic - for AcalaUncheckedExtrinsic +impl Extrinsic + for AcalaUncheckedExtrinsic { type Call = Call; @@ -75,28 +68,27 @@ impl ExtrinsicMetadata - for AcalaUncheckedExtrinsic +impl ExtrinsicMetadata + for AcalaUncheckedExtrinsic { const VERSION: u8 = UncheckedExtrinsic::::VERSION; type SignedExtensions = Extra; } -impl - ExtrinsicCall for AcalaUncheckedExtrinsic +impl ExtrinsicCall + for AcalaUncheckedExtrinsic { fn call(&self) -> &Self::Call { self.0.call() } } -impl Checkable - for AcalaUncheckedExtrinsic +impl Checkable + for AcalaUncheckedExtrinsic where Call: Encode + Member, Extra: SignedExtension, ConvertEthTx: Convert<(Call, Extra), Result<(EthereumTransactionMessage, Extra), InvalidTransaction>>, - CheckPayerTx: Convert<(Call, Extra), Result<(), InvalidTransaction>>, StorageDepositPerByte: Get, TxFeePerGas: Get, Lookup: traits::Lookup, @@ -105,10 +97,6 @@ where fn check(self, lookup: &Lookup) -> Result { let function = self.0.function.clone(); - let signature = self.0.signature.clone(); - if let Some((_, _, extra)) = signature { - CheckPayerTx::convert((function.clone(), extra))?; - } match self.0.signature { Some((addr, AcalaMultiSignature::Ethereum(sig), extra)) => { @@ -240,8 +228,8 @@ where } } -impl GetDispatchInfo - for AcalaUncheckedExtrinsic +impl GetDispatchInfo + for AcalaUncheckedExtrinsic where Call: GetDispatchInfo, Extra: SignedExtension, @@ -251,9 +239,8 @@ where } } -impl - serde::Serialize - for AcalaUncheckedExtrinsic +impl serde::Serialize + for AcalaUncheckedExtrinsic { fn serialize(&self, seq: S) -> Result where @@ -263,9 +250,8 @@ impl - serde::Deserialize<'a> - for AcalaUncheckedExtrinsic +impl<'a, Call: Decode, Extra: SignedExtension, ConvertEthTx, StorageDepositPerByte, TxFeePerGas> serde::Deserialize<'a> + for AcalaUncheckedExtrinsic { fn deserialize(de: D) -> Result where diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index 2d7c7cc55d..1521911709 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -1848,14 +1848,8 @@ pub type SignedExtra = ( module_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = AcalaUncheckedExtrinsic< - RuntimeCall, - SignedExtra, - ConvertEthereumTx, - StorageDepositPerByte, - TxFeePerGas, - PayerSignatureVerification, ->; +pub type UncheckedExtrinsic = + AcalaUncheckedExtrinsic; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. @@ -2355,34 +2349,6 @@ impl Convert<(RuntimeCall, SignedExtra), Result<(EthereumTransactionMessage, Sig } } -#[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)] -pub struct PayerSignatureVerification; - -impl Convert<(RuntimeCall, SignedExtra), Result<(), InvalidTransaction>> for PayerSignatureVerification { - fn convert((call, _extra): (RuntimeCall, SignedExtra)) -> Result<(), InvalidTransaction> { - if let RuntimeCall::TransactionPayment(module_transaction_payment::Call::with_fee_paid_by { - call: _, - payer_addr: _, - payer_sig: _, - }) = call - { - // Disabled for now - return Err(InvalidTransaction::BadProof); - // let payer_account: [u8; 32] = payer_addr - // .encode() - // .as_slice() - // .try_into() - // .map_err(|_| InvalidTransaction::BadSigner)?; - // // payer signature is aim at inner call of `with_fee_paid_by` call. - // let raw_payload = SignedPayload::new(*call, extra).map_err(|_| - // InvalidTransaction::BadSigner)?; if !raw_payload.using_encoded(|payload| - // payer_sig.verify(payload, &payer_account.into())) { return Err(InvalidTransaction:: - // BadProof); } - } - Ok(()) - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/runtime/acala/src/weights/module_transaction_payment.rs b/runtime/acala/src/weights/module_transaction_payment.rs index f742c4bbf7..361ab3f68b 100644 --- a/runtime/acala/src/weights/module_transaction_payment.rs +++ b/runtime/acala/src/weights/module_transaction_payment.rs @@ -131,13 +131,6 @@ impl module_transaction_payment::WeightInfo for WeightI // Minimum execution time: 9_563 nanoseconds. Weight::from_parts(9_999_000, 0) } - fn with_fee_paid_by() -> Weight { - // Proof Size summary in bytes: - // Measured: `666` - // Estimated: `0` - // Minimum execution time: 6_405 nanoseconds. - Weight::from_parts(6_669_000, 0) - } // Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:1) // Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn on_finalize() -> Weight { diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index 61aae52952..ef2c223696 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -1842,14 +1842,8 @@ pub type SignedExtra = ( module_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = AcalaUncheckedExtrinsic< - RuntimeCall, - SignedExtra, - ConvertEthereumTx, - StorageDepositPerByte, - TxFeePerGas, - PayerSignatureVerification, ->; +pub type UncheckedExtrinsic = + AcalaUncheckedExtrinsic; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. @@ -2359,34 +2353,6 @@ impl Convert<(RuntimeCall, SignedExtra), Result<(EthereumTransactionMessage, Sig } } -#[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)] -pub struct PayerSignatureVerification; - -impl Convert<(RuntimeCall, SignedExtra), Result<(), InvalidTransaction>> for PayerSignatureVerification { - fn convert((call, _extra): (RuntimeCall, SignedExtra)) -> Result<(), InvalidTransaction> { - if let RuntimeCall::TransactionPayment(module_transaction_payment::Call::with_fee_paid_by { - call: _, - payer_addr: _, - payer_sig: _, - }) = call - { - // Disabled for now - return Err(InvalidTransaction::BadProof); - // let payer_account: [u8; 32] = payer_addr - // .encode() - // .as_slice() - // .try_into() - // .map_err(|_| InvalidTransaction::BadSigner)?; - // // payer signature is aim at inner call of `with_fee_paid_by` call. - // let raw_payload = SignedPayload::new(*call, extra).map_err(|_| - // InvalidTransaction::BadSigner)?; if !raw_payload.using_encoded(|payload| - // payer_sig.verify(payload, &payer_account.into())) { return Err(InvalidTransaction:: - // BadProof); } - } - Ok(()) - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/runtime/karura/src/weights/module_transaction_payment.rs b/runtime/karura/src/weights/module_transaction_payment.rs index ec086b05b8..43f2139afe 100644 --- a/runtime/karura/src/weights/module_transaction_payment.rs +++ b/runtime/karura/src/weights/module_transaction_payment.rs @@ -131,13 +131,6 @@ impl module_transaction_payment::WeightInfo for WeightI // Minimum execution time: 10_071 nanoseconds. Weight::from_parts(10_425_000, 0) } - fn with_fee_paid_by() -> Weight { - // Proof Size summary in bytes: - // Measured: `666` - // Estimated: `0` - // Minimum execution time: 6_880 nanoseconds. - Weight::from_parts(7_067_000, 0) - } // Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:1) // Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn on_finalize() -> Weight { diff --git a/runtime/mandala/src/benchmarking/transaction_payment.rs b/runtime/mandala/src/benchmarking/transaction_payment.rs index cec07f9110..bc122cf483 100644 --- a/runtime/mandala/src/benchmarking/transaction_payment.rs +++ b/runtime/mandala/src/benchmarking/transaction_payment.rs @@ -223,18 +223,6 @@ runtime_benchmarks! { AggregatedSwapPath::::Dex(vec![LIQUID, NATIVE]), ]; }: _(RawOrigin::Signed(caller.clone()), fee_aggregated_path, call) - - with_fee_paid_by { - let caller: AccountId = whitelisted_caller(); - let payer: AccountId = account("payer", 0, SEED); - let call = Box::new(frame_system::Call::remark { remark: vec![] }.into()); - let signature = sp_runtime::MultiSignature::Sr25519(sp_core::sr25519::Signature([0u8; 64])); - }: _(RawOrigin::Signed(caller.clone()), call, payer, signature) - - on_finalize { - }: { - TransactionPayment::on_finalize(System::block_number()); - } } #[cfg(test)] diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 97f269d39d..6ff18e6932 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -79,7 +79,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdConversion, BadOrigin, BlakeTwo256, Block as BlockT, Bounded, Convert, SaturatedConversion, - StaticLookup, Verify, + StaticLookup, }, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, ArithmeticError, DispatchResult, FixedPointNumber, @@ -1918,32 +1918,6 @@ impl Convert<(RuntimeCall, SignedExtra), Result<(EthereumTransactionMessage, Sig } } -#[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)] -pub struct PayerSignatureVerification; - -impl Convert<(RuntimeCall, SignedExtra), Result<(), InvalidTransaction>> for PayerSignatureVerification { - fn convert((call, extra): (RuntimeCall, SignedExtra)) -> Result<(), InvalidTransaction> { - if let RuntimeCall::TransactionPayment(module_transaction_payment::Call::with_fee_paid_by { - call, - payer_addr, - payer_sig, - }) = call - { - let payer_account: [u8; 32] = payer_addr - .encode() - .as_slice() - .try_into() - .map_err(|_| InvalidTransaction::BadSigner)?; - // payer signature is aim at inner call of `with_fee_paid_by` call. - let raw_payload = SignedPayload::new(*call, extra).map_err(|_| InvalidTransaction::BadSigner)?; - if !raw_payload.using_encoded(|payload| payer_sig.verify(payload, &payer_account.into())) { - return Err(InvalidTransaction::BadProof); - } - } - Ok(()) - } -} - /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime. @@ -1968,14 +1942,8 @@ pub type SignedExtra = ( module_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = AcalaUncheckedExtrinsic< - RuntimeCall, - SignedExtra, - ConvertEthereumTx, - StorageDepositPerByte, - TxFeePerGas, - PayerSignatureVerification, ->; +pub type UncheckedExtrinsic = + AcalaUncheckedExtrinsic; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. @@ -2682,74 +2650,4 @@ mod tests { ); }); } - - fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap(); - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext - } - - #[test] - fn payer_signature_verify() { - use sp_core::Pair; - - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(generic::Era::Immortal), - runtime_common::CheckNonce::::from(0), - frame_system::CheckWeight::::new(), - module_evm::SetEvmOrigin::::new(), - module_transaction_payment::ChargeTransactionPayment::::from(0), - ); - - // correct payer signature - new_test_ext().execute_with(|| { - let payer = sp_keyring::AccountKeyring::Charlie; - - let call = RuntimeCall::Balances(pallet_balances::Call::transfer { - dest: sp_runtime::MultiAddress::Id(sp_keyring::AccountKeyring::Bob.to_account_id()), - value: 100, - }); - - let raw_payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); - let payer_signature = raw_payload.using_encoded(|payload| payer.pair().sign(payload)); - - let fee_call = RuntimeCall::TransactionPayment(module_transaction_payment::Call::with_fee_paid_by { - call: Box::new(call), - payer_addr: payer.to_account_id(), - payer_sig: sp_runtime::MultiSignature::Sr25519(payer_signature), - }); - assert!(PayerSignatureVerification::convert((fee_call, extra.clone())).is_ok()); - }); - - // wrong payer signature - new_test_ext().execute_with(|| { - let hacker = sp_keyring::AccountKeyring::Dave; - - let call = RuntimeCall::Balances(pallet_balances::Call::transfer { - dest: sp_runtime::MultiAddress::Id(sp_keyring::AccountKeyring::Bob.to_account_id()), - value: 100, - }); - let hacker_call = RuntimeCall::Balances(pallet_balances::Call::transfer { - dest: sp_runtime::MultiAddress::Id(sp_keyring::AccountKeyring::Dave.to_account_id()), - value: 100, - }); - - let raw_payload = SignedPayload::new(hacker_call.clone(), extra.clone()).unwrap(); - let payer_signature = raw_payload.using_encoded(|payload| hacker.pair().sign(payload)); - - let fee_call = RuntimeCall::TransactionPayment(module_transaction_payment::Call::with_fee_paid_by { - call: Box::new(call), - payer_addr: hacker.to_account_id(), - payer_sig: sp_runtime::MultiSignature::Sr25519(payer_signature), - }); - assert!(PayerSignatureVerification::convert((fee_call, extra)).is_err()); - }); - } } diff --git a/runtime/mandala/src/weights/module_transaction_payment.rs b/runtime/mandala/src/weights/module_transaction_payment.rs index b6b6a38b4d..9cd51fbe6a 100644 --- a/runtime/mandala/src/weights/module_transaction_payment.rs +++ b/runtime/mandala/src/weights/module_transaction_payment.rs @@ -141,16 +141,6 @@ impl module_transaction_payment::WeightInfo for WeightI Weight::from_parts(16_360_000, 4306) .saturating_add(T::DbWeight::get().reads(1)) } - // Storage: TransactionPause PausedTransactions (r:1 w:0) - // Proof Skipped: TransactionPause PausedTransactions (max_values: None, max_size: None, mode: Measured) - fn with_fee_paid_by() -> Weight { - // Proof Size summary in bytes: - // Measured: `841` - // Estimated: `4306` - // Minimum execution time: 10_275 nanoseconds. - Weight::from_parts(10_793_000, 4306) - .saturating_add(T::DbWeight::get().reads(1)) - } // Storage: TransactionPayment NextFeeMultiplier (r:1 w:1) // Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn on_finalize() -> Weight {