diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 9e73a8c5f93d9..08f87a67c8a66 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -299,7 +299,6 @@ pub type TxExtension = ( frame_system::CheckTxVersion, frame_system::CheckGenesis, frame_system::CheckEra, - frame_system::CheckNonce, frame_system::CheckWeight, frame_system::WeightReclaim, ); diff --git a/prdoc/pr_7838.prdoc b/prdoc/pr_7838.prdoc new file mode 100644 index 0000000000000..eece94f8fa7e5 --- /dev/null +++ b/prdoc/pr_7838.prdoc @@ -0,0 +1,7 @@ +title: '`CheckOnlySudoAccount`: Provide some tags' +doc: +- audience: Runtime User + description: Let `CheckOnlySudoAccount` provide some tags to make the tx pool happy. +crates: +- name: pallet-sudo + bump: patch diff --git a/substrate/frame/sudo/src/extension.rs b/substrate/frame/sudo/src/extension.rs index dbd127a2e5422..a2e2fdf706e8f 100644 --- a/substrate/frame/sudo/src/extension.rs +++ b/substrate/frame/sudo/src/extension.rs @@ -16,13 +16,14 @@ // limitations under the License. use crate::{Config, Key}; +use alloc::vec; use codec::{Decode, DecodeWithMemTracking, Encode}; use core::{fmt, marker::PhantomData}; use frame_support::{dispatch::DispatchInfo, ensure, pallet_prelude::TransactionSource}; use scale_info::TypeInfo; use sp_runtime::{ impl_tx_ext_default, - traits::{AsSystemOriginSigner, DispatchInfoOf, Dispatchable, TransactionExtension}, + traits::{AsSystemOriginSigner, DispatchInfoOf, Dispatchable, Hash, TransactionExtension}, transaction_validity::{ InvalidTransaction, TransactionPriority, TransactionValidityError, UnknownTransaction, ValidTransaction, @@ -31,7 +32,7 @@ use sp_runtime::{ /// Ensure that signed transactions are only valid if they are signed by sudo account. /// -/// In the initial phase of a chain without any tokens you can not prevent accounts from sending +/// In the initial phase of a chain without any tokens you cannot prevent accounts from sending /// transactions. /// These transactions would enter the transaction pool as the succeed the validation, but would /// fail on applying them as they are not allowed/disabled/whatever. This would be some huge dos @@ -89,7 +90,7 @@ where fn validate( &self, origin: <::RuntimeCall as Dispatchable>::RuntimeOrigin, - _call: &::RuntimeCall, + call: &::RuntimeCall, info: &DispatchInfoOf<::RuntimeCall>, _len: usize, _self_implicit: Self::Implicit, @@ -110,6 +111,7 @@ where Ok(( ValidTransaction { priority: info.total_weight().ref_time() as TransactionPriority, + provides: vec![(who, T::Hashing::hash_of(call)).encode()], ..Default::default() }, (),