diff --git a/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs b/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs index 9cc911fbff4c..6c5f1dd99f09 100644 --- a/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs +++ b/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs @@ -148,7 +148,7 @@ pub struct PreDispatchData { } /// Type of the call that the extension recognizes. -#[derive(RuntimeDebugNoBound, PartialEq)] +#[derive(Debug, PartialEq)] pub enum CallInfo { /// Relay chain finality + parachain finality + message delivery/confirmation calls. AllFinalityAndMsgs( @@ -218,7 +218,7 @@ impl CallInfo { } /// The actions on relayer account that need to be performed because of his actions. -#[derive(RuntimeDebug, PartialEq)] +#[derive(Debug, PartialEq)] pub enum RelayerAccountAction { /// Do nothing with relayer account. None, diff --git a/bridges/bin/runtime-common/src/messages_call_ext.rs b/bridges/bin/runtime-common/src/messages_call_ext.rs index 26b34ba7779c..142eacab6dd9 100644 --- a/bridges/bin/runtime-common/src/messages_call_ext.rs +++ b/bridges/bin/runtime-common/src/messages_call_ext.rs @@ -117,7 +117,7 @@ impl ReceiveMessagesDeliveryProofInfo { /// Info about a `ReceiveMessagesProof` or a `ReceiveMessagesDeliveryProof` call /// which tries to update a single lane. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] pub enum CallInfo { /// Messages delivery call info. ReceiveMessagesProof(ReceiveMessagesProofInfo), diff --git a/bridges/modules/messages/src/outbound_lane.rs b/bridges/modules/messages/src/outbound_lane.rs index acef5546d2a6..7cda476d72e7 100644 --- a/bridges/modules/messages/src/outbound_lane.rs +++ b/bridges/modules/messages/src/outbound_lane.rs @@ -52,7 +52,7 @@ pub trait OutboundLaneStorage { pub type StoredMessagePayload = BoundedVec>::MaximalOutboundPayloadSize>; /// Result of messages receival confirmation. -#[derive(Encode, Decode, RuntimeDebug, PartialEq, Eq, PalletError, TypeInfo)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, PalletError, TypeInfo)] pub enum ReceptionConfirmationError { /// Bridged chain is trying to confirm more messages than we have generated. May be a result /// of invalid bridged chain storage. diff --git a/bridges/primitives/header-chain/src/justification/mod.rs b/bridges/primitives/header-chain/src/justification/mod.rs index 38132653643a..176cf677c0aa 100644 --- a/bridges/primitives/header-chain/src/justification/mod.rs +++ b/bridges/primitives/header-chain/src/justification/mod.rs @@ -108,7 +108,7 @@ impl crate::FinalityProof for GrandpaJustificati } /// Justification verification error. -#[derive(Eq, RuntimeDebug, PartialEq)] +#[derive(Eq, Debug, PartialEq)] pub enum Error { /// Failed to decode justification. JustificationDecode, diff --git a/bridges/primitives/header-chain/src/justification/verification/mod.rs b/bridges/primitives/header-chain/src/justification/verification/mod.rs index 58a9baca244c..96eceb451b11 100644 --- a/bridges/primitives/header-chain/src/justification/verification/mod.rs +++ b/bridges/primitives/header-chain/src/justification/verification/mod.rs @@ -134,7 +134,7 @@ impl AncestryChain
{ } /// Justification verification error. -#[derive(Eq, RuntimeDebug, PartialEq)] +#[derive(Eq, Debug, PartialEq)] pub enum Error { /// Could not convert `AuthorityList` to `VoterSet`. InvalidAuthorityList, @@ -152,7 +152,7 @@ pub enum Error { } /// Justification verification error. -#[derive(Eq, RuntimeDebug, PartialEq)] +#[derive(Eq, Debug, PartialEq)] pub enum PrecommitError { /// Justification contains redundant votes. RedundantAuthorityVote, diff --git a/bridges/primitives/messages/src/lib.rs b/bridges/primitives/messages/src/lib.rs index 8e522533c9cb..c3ec00a8be3e 100644 --- a/bridges/primitives/messages/src/lib.rs +++ b/bridges/primitives/messages/src/lib.rs @@ -76,7 +76,7 @@ where Copy, PartialEq, Eq, - RuntimeDebug, + Debug, TypeInfo, MaxEncodedLen, Serialize, @@ -308,7 +308,7 @@ impl ReceivedMessages { } /// Result of single message receival. -#[derive(RuntimeDebug, Encode, Decode, PartialEq, Eq, Clone, TypeInfo)] +#[derive(Debug, Encode, Decode, PartialEq, Eq, Clone, TypeInfo)] pub enum ReceptionResult { /// Message has been received and dispatched. Note that we don't care whether dispatch has /// been successful or not - in both case message falls into this category. @@ -474,7 +474,7 @@ pub enum BridgeMessagesCall { } /// Error that happens during message verification. -#[derive(Encode, Decode, RuntimeDebug, PartialEq, Eq, PalletError, TypeInfo)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, PalletError, TypeInfo)] pub enum VerificationError { /// The message proof is empty. EmptyMessageProof, diff --git a/bridges/primitives/runtime/src/lib.rs b/bridges/primitives/runtime/src/lib.rs index 90a72d1d0313..fc177b0d1d09 100644 --- a/bridges/primitives/runtime/src/lib.rs +++ b/bridges/primitives/runtime/src/lib.rs @@ -153,7 +153,7 @@ impl Size for PreComputedSize { } /// Era of specific transaction. -#[derive(RuntimeDebug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum TransactionEra { /// Transaction is immortal. Immortal, @@ -333,7 +333,7 @@ pub trait OperatingMode: Send + Copy + Debug + FullCodec { Copy, PartialEq, Eq, - RuntimeDebug, + Debug, TypeInfo, MaxEncodedLen, Serialize, diff --git a/bridges/snowbridge/pallets/system/src/lib.rs b/bridges/snowbridge/pallets/system/src/lib.rs index 39c73e3630e7..90103de9368a 100644 --- a/bridges/snowbridge/pallets/system/src/lib.rs +++ b/bridges/snowbridge/pallets/system/src/lib.rs @@ -112,7 +112,7 @@ where } /// Whether a fee should be withdrawn to an account for sending an outbound message -#[derive(Clone, PartialEq, RuntimeDebug)] +#[derive(Clone, PartialEq, Debug)] pub enum PaysFee where T: Config, diff --git a/bridges/snowbridge/primitives/beacon/src/bls.rs b/bridges/snowbridge/primitives/beacon/src/bls.rs index 589b72e67348..d2dd8f2f7762 100644 --- a/bridges/snowbridge/primitives/beacon/src/bls.rs +++ b/bridges/snowbridge/primitives/beacon/src/bls.rs @@ -12,7 +12,7 @@ use sp_core::H256; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; -#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, TypeInfo, RuntimeDebug, PalletError)] +#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, TypeInfo, Debug, PalletError)] pub enum BlsError { InvalidSignature, InvalidPublicKey, diff --git a/bridges/snowbridge/primitives/beacon/src/types.rs b/bridges/snowbridge/primitives/beacon/src/types.rs index 5c89ec6bc283..cb2c20d38db8 100644 --- a/bridges/snowbridge/primitives/beacon/src/types.rs +++ b/bridges/snowbridge/primitives/beacon/src/types.rs @@ -342,7 +342,7 @@ pub struct CompactBeaconState { } /// VersionedExecutionPayloadHeader -#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo)] +#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(Serialize, Deserialize), @@ -545,7 +545,7 @@ mod tests { } /// Operating modes for beacon client -#[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Debug, TypeInfo)] pub enum Mode { Active, Blocked, diff --git a/bridges/snowbridge/primitives/core/src/inbound.rs b/bridges/snowbridge/primitives/core/src/inbound.rs index 559a84f36930..2181f1df879e 100644 --- a/bridges/snowbridge/primitives/core/src/inbound.rs +++ b/bridges/snowbridge/primitives/core/src/inbound.rs @@ -15,7 +15,7 @@ pub trait Verifier { fn verify(event: &Log, proof: &Proof) -> Result<(), VerificationError>; } -#[derive(Clone, Encode, Decode, RuntimeDebug, PalletError, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, PalletError, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub enum VerificationError { /// Execution header is missing @@ -43,7 +43,7 @@ pub struct Message { const MAX_TOPICS: usize = 4; -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub enum LogValidationError { TooManyTopics, } diff --git a/bridges/snowbridge/primitives/core/src/operating_mode.rs b/bridges/snowbridge/primitives/core/src/operating_mode.rs index 9894e587ef5e..591327e88ba3 100644 --- a/bridges/snowbridge/primitives/core/src/operating_mode.rs +++ b/bridges/snowbridge/primitives/core/src/operating_mode.rs @@ -3,7 +3,7 @@ use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; /// Basic operating modes for a bridges module (Normal/Halted). -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum BasicOperatingMode { /// Normal mode, when all operations are allowed. diff --git a/bridges/snowbridge/primitives/core/src/outbound.rs b/bridges/snowbridge/primitives/core/src/outbound.rs index 8a502d5d3e05..fb51840efc36 100644 --- a/bridges/snowbridge/primitives/core/src/outbound.rs +++ b/bridges/snowbridge/primitives/core/src/outbound.rs @@ -7,7 +7,7 @@ pub use v1::{AgentExecuteCommand, Command, Initializer, Message, OperatingMode, /// Enqueued outbound messages need to be versioned to prevent data corruption /// or loss after forkless runtime upgrades -#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug)] +#[derive(Encode, Decode, TypeInfo, Clone, Debug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub enum VersionedQueuedMessage { V1(QueuedMessage), @@ -335,7 +335,7 @@ pub trait SendMessageFeeProvider { } /// Reasons why sending to Ethereum could not be initiated -#[derive(Copy, Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug, PalletError, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, PartialEq, Eq, Debug, PalletError, TypeInfo)] pub enum SendError { /// Message is too large to be safely executed on Ethereum MessageTooLarge, diff --git a/bridges/snowbridge/primitives/router/src/inbound/mod.rs b/bridges/snowbridge/primitives/router/src/inbound/mod.rs index db8b6b1515b9..fdbca8a459e7 100644 --- a/bridges/snowbridge/primitives/router/src/inbound/mod.rs +++ b/bridges/snowbridge/primitives/router/src/inbound/mod.rs @@ -21,7 +21,7 @@ const MINIMUM_DEPOSIT: u128 = 1; /// Messages from Ethereum are versioned. This is because in future, /// we may want to evolve the protocol so that the ethereum side sends XCM messages directly. /// Instead having BridgeHub transcode the messages into XCM. -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, Debug)] pub enum VersionedMessage { V1(MessageV1), } @@ -36,7 +36,7 @@ pub struct MessageV1 { pub command: Command, } -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, Debug)] pub enum Command { /// Register a wrapped token on the AssetHub `ForeignAssets` pallet RegisterToken { @@ -59,7 +59,7 @@ pub enum Command { } /// Destination for bridged tokens -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, Debug)] pub enum Destination { /// The funds will be deposited into account `id` on AssetHub AccountId32 { id: [u8; 32] }, @@ -104,7 +104,7 @@ pub struct MessageToXcm< } /// Reason why a message conversion failed. -#[derive(Copy, Clone, TypeInfo, PalletError, Encode, Decode, RuntimeDebug)] +#[derive(Copy, Clone, TypeInfo, PalletError, Encode, Decode, Debug)] pub enum ConvertMessageError { /// The message version is not supported for conversion. UnsupportedVersion, diff --git a/cumulus/pallets/parachain-system/src/unincluded_segment.rs b/cumulus/pallets/parachain-system/src/unincluded_segment.rs index 00e855832915..35f366cec614 100644 --- a/cumulus/pallets/parachain-system/src/unincluded_segment.rs +++ b/cumulus/pallets/parachain-system/src/unincluded_segment.rs @@ -79,7 +79,7 @@ impl OutboundBandwidthLimits { } /// The error type for updating bandwidth used by a segment. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub enum BandwidthUpdateError { /// Too many messages submitted to HRMP channel. HrmpMessagesOverflow { diff --git a/cumulus/pallets/xcmp-queue/src/lib.rs b/cumulus/pallets/xcmp-queue/src/lib.rs index aa453efe4f2c..fdcd32a44e66 100644 --- a/cumulus/pallets/xcmp-queue/src/lib.rs +++ b/cumulus/pallets/xcmp-queue/src/lib.rs @@ -331,7 +331,7 @@ pub mod pallet { StorageMap<_, Twox64Concat, ParaId, FixedU128, ValueQuery, InitialFactor>; } -#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum OutboundState { Ok, Suspended, 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 151734804632..5da83af2ae98 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -462,7 +462,7 @@ parameter_types! { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] 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 64127c80b6d5..0c2be168427a 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -455,7 +455,7 @@ parameter_types! { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] diff --git a/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs b/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs index 19977cbedab0..5801edb9eeba 100644 --- a/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs +++ b/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs @@ -21,7 +21,7 @@ use sp_runtime::RuntimeDebug; use {sp_std::vec::Vec, xcm::latest::Asset}; /// The possible errors that can happen querying the storage of assets. -#[derive(Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[derive(Eq, PartialEq, Encode, Decode, Debug, scale_info::TypeInfo)] pub enum FungiblesAccessError { /// `Location` to `AssetId`/`ClassId` conversion failed. AssetIdConversionFailed, diff --git a/cumulus/parachains/runtimes/bridge-hubs/common/src/digest_item.rs b/cumulus/parachains/runtimes/bridge-hubs/common/src/digest_item.rs index bdfcaedbe82d..1520bcc5a057 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/common/src/digest_item.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/common/src/digest_item.rs @@ -19,7 +19,7 @@ use sp_core::{RuntimeDebug, H256}; use sp_runtime::generic::DigestItem; /// Custom header digest items, inserted as DigestItem::Other -#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Debug)] pub enum CustomDigestItem { #[codec(index = 0)] /// Merkle root of outbound Snowbridge messages. diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 7274e9acdcd6..b3d3fdae3767 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -274,7 +274,7 @@ parameter_types! { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/people.rs b/cumulus/parachains/runtimes/people/people-rococo/src/people.rs index 73039d32d8c0..5ea488681f6a 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/people.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/people.rs @@ -67,7 +67,7 @@ impl pallet_identity::Config for Runtime { /// in the `IdentityInfo` struct. #[bitflags] #[repr(u64)] -#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum IdentityField { Display, Legal, diff --git a/cumulus/parachains/runtimes/people/people-westend/src/people.rs b/cumulus/parachains/runtimes/people/people-westend/src/people.rs index 9b27a17f2937..b6fa06e291a1 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/people.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/people.rs @@ -67,7 +67,7 @@ impl pallet_identity::Config for Runtime { /// in the `IdentityInfo` struct. #[bitflags] #[repr(u64)] -#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum IdentityField { Display, Legal, diff --git a/cumulus/primitives/core/src/lib.rs b/cumulus/primitives/core/src/lib.rs index 7f7353685657..5dd23495c5ad 100644 --- a/cumulus/primitives/core/src/lib.rs +++ b/cumulus/primitives/core/src/lib.rs @@ -54,7 +54,7 @@ pub type InboundHrmpMessage = polkadot_primitives::InboundHrmpMessage; /// Error description of a message send failure. -#[derive(Eq, PartialEq, Copy, Clone, RuntimeDebug, Encode, Decode)] +#[derive(Eq, PartialEq, Copy, Clone, Debug, Encode, Decode)] pub enum MessageSendError { /// The dispatch queue is full. QueueFull, @@ -174,7 +174,7 @@ impl XcmpMessageSource for () { } /// The "quality of service" considerations for message sending. -#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, RuntimeDebug)] +#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, Debug)] pub enum ServiceQuality { /// Ensure that this message is dispatched in the same relative order as any other messages /// that were also sent with `Ordered`. This only guarantees message ordering on the dispatch @@ -244,7 +244,7 @@ impl ParachainBlockData { pub const CUMULUS_CONSENSUS_ID: ConsensusEngineId = *b"CMLS"; /// Consensus header digests for Cumulus parachains. -#[derive(Clone, RuntimeDebug, Decode, Encode, PartialEq)] +#[derive(Clone, Debug, Decode, Encode, PartialEq)] pub enum CumulusDigestItem { /// A digest item indicating the relay-parent a parachain block was built against. #[codec(index = 0)] diff --git a/polkadot/parachain/src/primitives.rs b/polkadot/parachain/src/primitives.rs index a9de939e743d..bebd9716b377 100644 --- a/polkadot/parachain/src/primitives.rs +++ b/polkadot/parachain/src/primitives.rs @@ -322,7 +322,7 @@ impl DmpMessageHandler for () { } /// The aggregate XCMP message format. -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo, Debug)] pub enum XcmpMessageFormat { /// Encoded `VersionedXcm` messages, all concatenated. ConcatenatedVersionedXcm, diff --git a/polkadot/primitives/src/v7/mod.rs b/polkadot/primitives/src/v7/mod.rs index 877aba26d0c1..3b32fb26e200 100644 --- a/polkadot/primitives/src/v7/mod.rs +++ b/polkadot/primitives/src/v7/mod.rs @@ -1065,7 +1065,7 @@ pub struct ScheduledCore { } /// The state of a particular availability core. -#[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub enum CoreState { /// The core is currently occupied. @@ -1108,7 +1108,7 @@ impl CoreState { } /// An assumption being made about the state of an occupied core. -#[derive(Clone, Copy, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Clone, Copy, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(PartialEq, Eq, Hash))] pub enum OccupiedCoreAssumption { /// The candidate occupying the core was made available and included to free the core. @@ -1123,7 +1123,7 @@ pub enum OccupiedCoreAssumption { } /// An even concerning a candidate. -#[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub enum CandidateEvent { /// This candidate receipt was backed in the most recent block. @@ -1290,7 +1290,7 @@ pub struct AbridgedHrmpChannel { } /// A possible upgrade restriction that prevents a parachain from performing an upgrade. -#[derive(Copy, Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub enum UpgradeRestriction { /// There is an upgrade restriction and there are no details about its specifics nor how long /// it could last. @@ -1303,7 +1303,7 @@ pub enum UpgradeRestriction { /// /// This data type appears in the last step of the upgrade process. After the parachain observes it /// and reacts to it the upgrade process concludes. -#[derive(Copy, Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub enum UpgradeGoAhead { /// Abort the upgrade process. There is something wrong with the validation code previously /// submitted by the parachain. This variant can also be used to prevent upgrades by the @@ -1372,7 +1372,7 @@ impl From for runtime_primitives::DigestItem { /// A statement about a candidate, to be used within the dispute resolution process. /// /// Statements are either in favor of the candidate's validity or against it. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub enum DisputeStatement { /// A valid statement, of the given kind. #[codec(index = 0)] @@ -1466,7 +1466,7 @@ impl DisputeStatement { } /// Different kinds of statements of validity on a candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub enum ValidDisputeStatementKind { /// An explicit statement issued as part of a dispute. #[codec(index = 0)] @@ -1502,7 +1502,7 @@ impl ValidDisputeStatementKind { } /// Different kinds of statements of invalidity on a candidate. -#[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Debug, TypeInfo)] pub enum InvalidDisputeStatementKind { /// An explicit statement issued as part of a dispute. #[codec(index = 0)] @@ -1610,7 +1610,7 @@ pub struct InherentData { /// An either implicit or explicit attestation to the validity of a parachain /// candidate. -#[derive(Clone, Eq, PartialEq, Decode, Encode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Decode, Encode, Debug, TypeInfo)] pub enum ValidityAttestation { /// Implicit validity attestation by issuing. /// This corresponds to issuance of a `Candidate` statement. @@ -1672,7 +1672,7 @@ const BACKING_STATEMENT_MAGIC: [u8; 4] = *b"BKNG"; /// Statements that can be made about parachain candidates. These are the /// actual values that are signed. -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug)] #[cfg_attr(feature = "std", derive(Hash))] pub enum CompactStatement { /// Proposal of a parachain candidate. diff --git a/polkadot/runtime/common/src/assigned_slots/mod.rs b/polkadot/runtime/common/src/assigned_slots/mod.rs index c7bdac73d1c6..5032c0e887b8 100644 --- a/polkadot/runtime/common/src/assigned_slots/mod.rs +++ b/polkadot/runtime/common/src/assigned_slots/mod.rs @@ -46,7 +46,7 @@ use sp_std::prelude::*; const LOG_TARGET: &str = "runtime::assigned_slots"; /// Lease period an assigned slot should start from (current, or next one). -#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, Debug, TypeInfo)] pub enum SlotLeasePeriodStart { Current, Next, diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index 9ed2894e417c..aa5f7d4001c5 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -72,9 +72,7 @@ impl WeightInfo for TestWeightInfo { } /// The kind of statement an account needs to make for a claim to be valid. -#[derive( - Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, TypeInfo, Serialize, Deserialize, -)] +#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, Debug, TypeInfo, Serialize, Deserialize)] pub enum StatementKind { /// Statement required to be made by non-SAFT holders. Regular, diff --git a/polkadot/runtime/common/src/crowdloan/mod.rs b/polkadot/runtime/common/src/crowdloan/mod.rs index de7f1e497f8c..e49aa0618135 100644 --- a/polkadot/runtime/common/src/crowdloan/mod.rs +++ b/polkadot/runtime/common/src/crowdloan/mod.rs @@ -128,7 +128,7 @@ impl WeightInfo for TestWeightInfo { } } -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum LastContribution { Never, PreEnding(u32), diff --git a/polkadot/runtime/common/src/impls.rs b/polkadot/runtime/common/src/impls.rs index 85531e9c04fc..7c414ea04f57 100644 --- a/polkadot/runtime/common/src/impls.rs +++ b/polkadot/runtime/common/src/impls.rs @@ -108,9 +108,7 @@ pub fn era_payout( /// Versioned locatable asset type which contains both an XCM `location` and `asset_id` to identify /// an asset which exists on some chain. -#[derive( - Encode, Decode, Eq, PartialEq, Clone, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, Debug, scale_info::TypeInfo, MaxEncodedLen)] pub enum VersionedLocatableAsset { #[codec(index = 3)] V3 { location: xcm::v3::Location, asset_id: xcm::v3::AssetId }, diff --git a/polkadot/runtime/common/src/purchase.rs b/polkadot/runtime/common/src/purchase.rs index 6ea14cc2f46b..39b8cab80fa0 100644 --- a/polkadot/runtime/common/src/purchase.rs +++ b/polkadot/runtime/common/src/purchase.rs @@ -35,7 +35,7 @@ type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; /// The kind of statement an account needs to make for a claim to be valid. -#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, Debug, TypeInfo)] pub enum AccountValidity { /// Account is not valid. Invalid, diff --git a/polkadot/runtime/parachains/src/assigner_on_demand/mod.rs b/polkadot/runtime/parachains/src/assigner_on_demand/mod.rs index 598a0f109700..6f7ccdacfb03 100644 --- a/polkadot/runtime/parachains/src/assigner_on_demand/mod.rs +++ b/polkadot/runtime/parachains/src/assigner_on_demand/mod.rs @@ -206,7 +206,7 @@ type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; /// Errors that can happen during spot traffic calculation. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] enum SpotTrafficCalculationErr { /// The order queue capacity is at 0. QueueCapacityIsZero, diff --git a/polkadot/runtime/parachains/src/disputes.rs b/polkadot/runtime/parachains/src/disputes.rs index 06359cd5264b..dde06aafe19c 100644 --- a/polkadot/runtime/parachains/src/disputes.rs +++ b/polkadot/runtime/parachains/src/disputes.rs @@ -54,14 +54,14 @@ pub mod migration; const LOG_TARGET: &str = "runtime::disputes"; /// Whether the dispute is local or remote. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum DisputeLocation { Local, Remote, } /// The result of a dispute, whether the candidate is deemed valid (for) or invalid (against). -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum DisputeResult { Valid, Invalid, @@ -543,7 +543,7 @@ struct ImportSummary { new_flags: DisputeStateFlags, } -#[derive(RuntimeDebug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq)] enum VoteImportError { /// Validator index was outside the range of valid validator indices in the given session. ValidatorIndexOutOfBounds, @@ -555,7 +555,7 @@ enum VoteImportError { MaliciousBacker, } -#[derive(RuntimeDebug, Copy, Clone, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] enum VoteKind { /// A backing vote that is counted as "for" vote in dispute resolution. Backing, diff --git a/polkadot/runtime/parachains/src/inclusion/mod.rs b/polkadot/runtime/parachains/src/inclusion/mod.rs index 31befefa3220..34a6d407c383 100644 --- a/polkadot/runtime/parachains/src/inclusion/mod.rs +++ b/polkadot/runtime/parachains/src/inclusion/mod.rs @@ -235,7 +235,7 @@ impl QueueFootprinter for () { /// /// Can be extended to serve further use-cases besides just UMP. Is stored in storage, so any change /// to existing values will require a migration. -#[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, Debug, TypeInfo)] pub enum AggregateMessageOrigin { /// Inbound upward message. #[codec(index = 0)] @@ -246,7 +246,7 @@ pub enum AggregateMessageOrigin { /// /// It is written in verbose form since future variants like `Here` and `Bridged` are already /// foreseeable. -#[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, Debug, TypeInfo)] pub enum UmpQueueId { /// The message originated from this parachain. #[codec(index = 0)] diff --git a/polkadot/runtime/parachains/src/paras/mod.rs b/polkadot/runtime/parachains/src/paras/mod.rs index e28f9d072751..5c149a68871a 100644 --- a/polkadot/runtime/parachains/src/paras/mod.rs +++ b/polkadot/runtime/parachains/src/paras/mod.rs @@ -178,7 +178,7 @@ pub struct ParaPastCodeMeta { /// If the para is in a "transition state", it is expected that the parachain is /// queued in the `ActionsQueue` to transition it into a stable state. Its lifecycle /// state will be used to determine the state transition to apply to the para. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo)] pub enum ParaLifecycle { /// Para is new and is onboarding as an on-demand or lease holding Parachain. Onboarding, @@ -301,7 +301,7 @@ pub struct ParaGenesisArgs { } /// Distinguishes between lease holding Parachain and Parathread (on-demand parachain) -#[derive(PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Debug)] pub enum ParaKind { Parathread, Parachain, @@ -425,7 +425,7 @@ impl PvfCheckCause { } /// Specifies what was the outcome of a PVF pre-checking vote. -#[derive(Copy, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, Debug, TypeInfo)] enum PvfCheckOutcome { Accepted, Rejected, diff --git a/polkadot/runtime/parachains/src/scheduler/common.rs b/polkadot/runtime/parachains/src/scheduler/common.rs index 66a4e6d30be0..c554c99554b5 100644 --- a/polkadot/runtime/parachains/src/scheduler/common.rs +++ b/polkadot/runtime/parachains/src/scheduler/common.rs @@ -25,7 +25,7 @@ use sp_runtime::{ use primitives::{CoreIndex, Id as ParaId}; /// Assignment (ParaId -> CoreIndex). -#[derive(Encode, Decode, TypeInfo, RuntimeDebug, Clone, PartialEq)] +#[derive(Encode, Decode, TypeInfo, Debug, Clone, PartialEq)] pub enum Assignment { /// A pool assignment. Pool { diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 1cfe9adfe13d..68b4297dc7e3 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -802,17 +802,7 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - TypeInfo, + Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen, TypeInfo, )] pub enum ProxyType { Any, diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index de961bb4c398..d81fcc148c90 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -929,17 +929,7 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - TypeInfo, + Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen, TypeInfo, )] pub enum ProxyType { Any, diff --git a/substrate/bin/node/runtime/src/lib.rs b/substrate/bin/node/runtime/src/lib.rs index 5d8016532a5d..5e2012c388c9 100644 --- a/substrate/bin/node/runtime/src/lib.rs +++ b/substrate/bin/node/runtime/src/lib.rs @@ -368,7 +368,7 @@ parameter_types! { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] diff --git a/substrate/frame/alliance/src/lib.rs b/substrate/frame/alliance/src/lib.rs index ed771c7226ea..7151a9346f2b 100644 --- a/substrate/frame/alliance/src/lib.rs +++ b/substrate/frame/alliance/src/lib.rs @@ -194,7 +194,7 @@ pub trait ProposalProvider { } /// The various roles that a member can hold. -#[derive(Copy, Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(Copy, Clone, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum MemberRole { Fellow, Ally, @@ -202,7 +202,7 @@ pub enum MemberRole { } /// The type of item that may be deemed unscrupulous. -#[derive(Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum UnscrupulousItem { AccountId(AccountId), Website(Url), diff --git a/substrate/frame/alliance/src/types.rs b/substrate/frame/alliance/src/types.rs index cf736257ef2d..c24dd5b4cee2 100644 --- a/substrate/frame/alliance/src/types.rs +++ b/substrate/frame/alliance/src/types.rs @@ -39,17 +39,7 @@ impl Multihash { /// The version of the CID. #[derive( - Clone, - Copy, - PartialEq, - Eq, - PartialOrd, - Ord, - RuntimeDebug, - Encode, - Decode, - TypeInfo, - MaxEncodedLen, + Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Encode, Decode, TypeInfo, MaxEncodedLen, )] pub enum Version { /// CID version 0. diff --git a/substrate/frame/assets/src/types.rs b/substrate/frame/assets/src/types.rs index ae6ef2382b18..2f9802bcee6c 100644 --- a/substrate/frame/assets/src/types.rs +++ b/substrate/frame/assets/src/types.rs @@ -37,7 +37,7 @@ pub(super) type ExistenceReasonOf = /// AssetStatus holds the current state of the asset. It could either be Live and available for use, /// or in a Destroying state. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub(super) enum AssetStatus { /// The asset is active and able to be used. Live, @@ -94,7 +94,7 @@ fn ensure_bool_decodes_to_consumer_or_sufficient() { } /// The reason for an account's existence within an asset class. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub enum ExistenceReason { /// A consumer reference was used to create this account. #[codec(index = 0)] @@ -152,7 +152,7 @@ fn ensure_bool_decodes_to_liquid_or_frozen() { } /// The status of an asset account. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub enum AccountStatus { /// Asset account can receive and transfer the assets. Liquid, @@ -264,7 +264,7 @@ impl From for DebitFlags { } /// Possible errors when converting between external and asset balances. -#[derive(Eq, PartialEq, Copy, Clone, RuntimeDebug, Encode, Decode)] +#[derive(Eq, PartialEq, Copy, Clone, Debug, Encode, Decode)] pub enum ConversionError { /// The external minimum balance must not be zero. MinBalanceZero, diff --git a/substrate/frame/balances/src/tests/mod.rs b/substrate/frame/balances/src/tests/mod.rs index 0abf2251290f..a12600c95272 100644 --- a/substrate/frame/balances/src/tests/mod.rs +++ b/substrate/frame/balances/src/tests/mod.rs @@ -53,17 +53,7 @@ mod reentrancy_tests; type Block = frame_system::mocking::MockBlock; #[derive( - Encode, - Decode, - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - MaxEncodedLen, - TypeInfo, - RuntimeDebug, + Encode, Decode, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, MaxEncodedLen, TypeInfo, Debug, )] pub enum TestId { Foo, diff --git a/substrate/frame/balances/src/types.rs b/substrate/frame/balances/src/types.rs index 9c7bdea19e5f..236946aac107 100644 --- a/substrate/frame/balances/src/types.rs +++ b/substrate/frame/balances/src/types.rs @@ -25,7 +25,7 @@ use scale_info::TypeInfo; use sp_runtime::{RuntimeDebug, Saturating}; /// Simplified reasons for withdrawing balance. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub enum Reasons { /// Paying system transaction fees. Fee = 0, @@ -154,7 +154,7 @@ impl, I: 'static> Drop for DustCleaner { } /// Whether something should be interpreted as an increase or a decrease. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub enum AdjustmentDirection { /// Increase the amount. Increase, diff --git a/substrate/frame/bounties/src/lib.rs b/substrate/frame/bounties/src/lib.rs index 9fed49acf144..8decc697672c 100644 --- a/substrate/frame/bounties/src/lib.rs +++ b/substrate/frame/bounties/src/lib.rs @@ -143,7 +143,7 @@ impl } /// The status of a bounty proposal. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum BountyStatus { /// The bounty is proposed and waiting for approval. Proposed, diff --git a/substrate/frame/broker/src/coretime_interface.rs b/substrate/frame/broker/src/coretime_interface.rs index 58efa7fa92bb..aa0d5a6edd81 100644 --- a/substrate/frame/broker/src/coretime_interface.rs +++ b/substrate/frame/broker/src/coretime_interface.rs @@ -35,9 +35,7 @@ pub type TaskId = u32; pub type PartsOf57600 = u16; /// An element to which a core can be assigned. -#[derive( - Encode, Decode, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo, MaxEncodedLen)] pub enum CoreAssignment { /// Core need not be used for anything. Idle, diff --git a/substrate/frame/broker/src/types.rs b/substrate/frame/broker/src/types.rs index 1c7b00ecd48c..d57d46d15618 100644 --- a/substrate/frame/broker/src/types.rs +++ b/substrate/frame/broker/src/types.rs @@ -42,7 +42,7 @@ pub type CoreMaskBitCount = u32; pub type SignedCoreMaskBitCount = i32; /// Whether a core assignment is revokable or not. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum Finality { /// The region remains with the same owner allowing the assignment to be altered. Provisional, @@ -128,7 +128,7 @@ pub struct InstaPoolHistoryRecord { pub type InstaPoolHistoryRecordOf = InstaPoolHistoryRecord>; /// How much of a core has been assigned or, if completely assigned, the workload itself. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum CompletionStatus { /// The core is not fully assigned; the inner is the parts which have. Partial(CoreMask), diff --git a/substrate/frame/child-bounties/src/lib.rs b/substrate/frame/child-bounties/src/lib.rs index 2d4c6ef9e277..2249f31b8059 100644 --- a/substrate/frame/child-bounties/src/lib.rs +++ b/substrate/frame/child-bounties/src/lib.rs @@ -98,7 +98,7 @@ pub struct ChildBounty { } /// The status of a child-bounty. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum ChildBountyStatus { /// The child-bounty is added and waiting for curator assignment. Added, diff --git a/substrate/frame/collective/src/lib.rs b/substrate/frame/collective/src/lib.rs index 46bf55ab50d5..c7149226b911 100644 --- a/substrate/frame/collective/src/lib.rs +++ b/substrate/frame/collective/src/lib.rs @@ -134,7 +134,7 @@ impl DefaultVote for MoreThanMajorityThenPrimeDefaultVote { } /// Origin for the collective module. -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(I))] #[codec(mel_bound(AccountId: MaxEncodedLen))] pub enum RawOrigin { diff --git a/substrate/frame/contracts/src/lib.rs b/substrate/frame/contracts/src/lib.rs index 0045d72141c9..87bf0e534841 100644 --- a/substrate/frame/contracts/src/lib.rs +++ b/substrate/frame/contracts/src/lib.rs @@ -1305,7 +1305,7 @@ pub mod pallet { } /// The type of origins supported by the contracts pallet. -#[derive(Clone, Encode, Decode, PartialEq, TypeInfo, RuntimeDebugNoBound)] +#[derive(Clone, Encode, Decode, PartialEq, TypeInfo, Debug)] pub enum Origin { Root, Signed(T::AccountId), @@ -1363,7 +1363,7 @@ struct InstantiateInput { /// Determines whether events should be collected during execution. #[derive( - Copy, Clone, PartialEq, Eq, RuntimeDebug, Decode, Encode, MaxEncodedLen, scale_info::TypeInfo, + Copy, Clone, PartialEq, Eq, Debug, Decode, Encode, MaxEncodedLen, scale_info::TypeInfo, )] pub enum CollectEvents { /// Collect events. @@ -1381,7 +1381,7 @@ pub enum CollectEvents { /// Determines whether debug messages will be collected. #[derive( - Copy, Clone, PartialEq, Eq, RuntimeDebug, Decode, Encode, MaxEncodedLen, scale_info::TypeInfo, + Copy, Clone, PartialEq, Eq, Debug, Decode, Encode, MaxEncodedLen, scale_info::TypeInfo, )] pub enum DebugInfo { /// Collect debug messages. diff --git a/substrate/frame/contracts/src/primitives.rs b/substrate/frame/contracts/src/primitives.rs index 590a331ea505..c89333ac8f9e 100644 --- a/substrate/frame/contracts/src/primitives.rs +++ b/substrate/frame/contracts/src/primitives.rs @@ -97,7 +97,7 @@ pub type CodeUploadResult = pub type GetStorageResult = Result>, ContractAccessError>; /// The possible errors that can happen querying the storage of a contract. -#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, MaxEncodedLen, Debug, TypeInfo)] pub enum ContractAccessError { /// The given address doesn't point to a contract. DoesntExist, @@ -142,7 +142,7 @@ pub struct CodeUploadReturnValue { } /// Reference to an existing code hash or a new wasm module. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum Code { /// A wasm module as raw bytes. Upload(Vec), @@ -151,9 +151,7 @@ pub enum Code { } /// The amount of balance that was either charged or refunded in order to pay for storage. -#[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo, -)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, Debug, TypeInfo)] pub enum StorageDeposit { /// The transaction reduced storage consumption. /// diff --git a/substrate/frame/contracts/src/storage/meter.rs b/substrate/frame/contracts/src/storage/meter.rs index f029ab1a014c..95cfd1983ceb 100644 --- a/substrate/frame/contracts/src/storage/meter.rs +++ b/substrate/frame/contracts/src/storage/meter.rs @@ -104,7 +104,7 @@ pub struct Root; /// State parameter that constitutes a meter that is in its nested state. /// Its value indicates whether the nested meter has its own limit. -#[derive(DefaultNoBound, RuntimeDebugNoBound)] +#[derive(DefaultNoBound, Debug)] pub enum Nested { #[default] DerivedLimit, @@ -223,7 +223,7 @@ impl Diff { /// The state of a contract. /// /// In case of termination the beneficiary is indicated. -#[derive(RuntimeDebugNoBound, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum ContractState { Alive, Terminated { beneficiary: AccountIdOf }, @@ -246,7 +246,7 @@ struct Charge { } /// Records the storage changes of a storage meter. -#[derive(RuntimeDebugNoBound)] +#[derive(Debug)] enum Contribution { /// The contract the meter belongs to is alive and accumulates changes using a [`Diff`]. Alive(Diff), diff --git a/substrate/frame/contracts/src/wasm/mod.rs b/substrate/frame/contracts/src/wasm/mod.rs index 8d7f928dba33..372626f54822 100644 --- a/substrate/frame/contracts/src/wasm/mod.rs +++ b/substrate/frame/contracts/src/wasm/mod.rs @@ -103,7 +103,7 @@ pub struct CodeInfo { /// Defines the required determinism level of a wasm blob when either running or uploading code. #[derive( - Clone, Copy, Encode, Decode, scale_info::TypeInfo, MaxEncodedLen, RuntimeDebug, PartialEq, Eq, + Clone, Copy, Encode, Decode, scale_info::TypeInfo, MaxEncodedLen, Debug, PartialEq, Eq, )] pub enum Determinism { /// The execution should be deterministic and hence no indeterministic instructions are diff --git a/substrate/frame/contracts/src/wasm/runtime.rs b/substrate/frame/contracts/src/wasm/runtime.rs index c8926e02cb2e..bf2671844669 100644 --- a/substrate/frame/contracts/src/wasm/runtime.rs +++ b/substrate/frame/contracts/src/wasm/runtime.rs @@ -121,7 +121,7 @@ pub struct ReturnData { /// occurred (the SupervisorError variant). /// The other case is where the trap does not constitute an error but rather was invoked /// as a quick way to terminate the application (all other variants). -#[derive(RuntimeDebug)] +#[derive(Debug)] pub enum TrapReason { /// The supervisor trapped the contract because of an error condition occurred during /// execution in privileged code. diff --git a/substrate/frame/conviction-voting/src/conviction.rs b/substrate/frame/conviction-voting/src/conviction.rs index b5c9a3a705f6..bbb44a82b88d 100644 --- a/substrate/frame/conviction-voting/src/conviction.rs +++ b/substrate/frame/conviction-voting/src/conviction.rs @@ -28,17 +28,7 @@ use crate::types::Delegations; /// A value denoting the strength of conviction of a vote. #[derive( - Encode, - Decode, - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - RuntimeDebug, - TypeInfo, - MaxEncodedLen, + Encode, Decode, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo, MaxEncodedLen, )] pub enum Conviction { /// 0.1x votes, unlocked. diff --git a/substrate/frame/conviction-voting/src/vote.rs b/substrate/frame/conviction-voting/src/vote.rs index 024ee7373cc0..4630e920e156 100644 --- a/substrate/frame/conviction-voting/src/vote.rs +++ b/substrate/frame/conviction-voting/src/vote.rs @@ -67,7 +67,7 @@ impl TypeInfo for Vote { } /// A vote for a referendum of a particular account. -#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub enum AccountVote { /// A standard vote, one-way (approve or reject) with a given amount of conviction. Standard { vote: Vote, balance: Balance }, @@ -182,7 +182,7 @@ where } /// An indicator for what an account is doing; it can either be delegating or voting. -#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(MaxVotes))] #[codec(mel_bound( Balance: MaxEncodedLen, AccountId: MaxEncodedLen, BlockNumber: MaxEncodedLen, diff --git a/substrate/frame/core-fellowship/src/lib.rs b/substrate/frame/core-fellowship/src/lib.rs index 31724e4ae3af..0bbc85d74643 100644 --- a/substrate/frame/core-fellowship/src/lib.rs +++ b/substrate/frame/core-fellowship/src/lib.rs @@ -85,7 +85,7 @@ pub use pallet::*; pub use weights::WeightInfo; /// The desired outcome for which evidence is presented. -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, TypeInfo, MaxEncodedLen, Debug)] pub enum Wish { /// Member wishes only to retain their current rank. Retention, diff --git a/substrate/frame/democracy/src/conviction.rs b/substrate/frame/democracy/src/conviction.rs index 54f4ff524f2a..ccf211ab343d 100644 --- a/substrate/frame/democracy/src/conviction.rs +++ b/substrate/frame/democracy/src/conviction.rs @@ -28,17 +28,7 @@ use sp_runtime::{ /// A value denoting the strength of conviction of a vote. #[derive( - Encode, - MaxEncodedLen, - Decode, - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - RuntimeDebug, - TypeInfo, + Encode, MaxEncodedLen, Decode, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo, )] pub enum Conviction { /// 0.1x votes, unlocked. diff --git a/substrate/frame/democracy/src/types.rs b/substrate/frame/democracy/src/types.rs index 86a764736e5f..e61653f26d3c 100644 --- a/substrate/frame/democracy/src/types.rs +++ b/substrate/frame/democracy/src/types.rs @@ -181,7 +181,7 @@ pub struct ReferendumStatus { } /// Info regarding a referendum, present or past. -#[derive(Encode, MaxEncodedLen, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, MaxEncodedLen, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum ReferendumInfo { /// Referendum is happening, the arg is the block number at which it will end. Ongoing(ReferendumStatus), @@ -212,7 +212,7 @@ pub enum UnvoteScope { } /// Identifies an owner of a metadata. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum MetadataOwner { /// External proposal. External, diff --git a/substrate/frame/democracy/src/vote.rs b/substrate/frame/democracy/src/vote.rs index 9d59e25bca38..2945892340a2 100644 --- a/substrate/frame/democracy/src/vote.rs +++ b/substrate/frame/democracy/src/vote.rs @@ -73,7 +73,7 @@ impl TypeInfo for Vote { } /// A vote for a referendum of a particular account. -#[derive(Encode, MaxEncodedLen, Decode, Copy, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, MaxEncodedLen, Decode, Copy, Clone, Eq, PartialEq, Debug, TypeInfo)] pub enum AccountVote { /// A standard vote, one-way (approve or reject) with a given amount of conviction. Standard { vote: Vote, balance: Balance }, @@ -149,7 +149,7 @@ impl PriorLock> { diff --git a/substrate/frame/elections-phragmen/src/lib.rs b/substrate/frame/elections-phragmen/src/lib.rs index 1d6a3a61315f..f380b1b9d92c 100644 --- a/substrate/frame/elections-phragmen/src/lib.rs +++ b/substrate/frame/elections-phragmen/src/lib.rs @@ -136,7 +136,7 @@ type NegativeImbalanceOf = <::Currency as Currency< >>::NegativeImbalance; /// An indication that the renouncing account currently has which of the below roles. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub enum Renouncing { /// A member is renouncing. Member, diff --git a/substrate/frame/identity/src/legacy.rs b/substrate/frame/identity/src/legacy.rs index c33b4e1f96aa..db2f4e51be4f 100644 --- a/substrate/frame/identity/src/legacy.rs +++ b/substrate/frame/identity/src/legacy.rs @@ -30,7 +30,7 @@ use crate::types::{Data, IdentityInformationProvider}; /// in the `IdentityInfo` struct. #[bitflags] #[repr(u64)] -#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum IdentityField { Display, Legal, diff --git a/substrate/frame/identity/src/types.rs b/substrate/frame/identity/src/types.rs index ed35160d41e8..090785e67bc0 100644 --- a/substrate/frame/identity/src/types.rs +++ b/substrate/frame/identity/src/types.rs @@ -38,7 +38,7 @@ pub type RegistrarIndex = u32; /// than 32-bytes then it will be truncated when encoding. /// /// Can also be `None`. -#[derive(Clone, Eq, PartialEq, RuntimeDebug, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Debug, MaxEncodedLen)] pub enum Data { /// No data here. None, @@ -189,7 +189,7 @@ impl Default for Data { /// /// NOTE: Registrars may pay little attention to some fields. Registrars may want to make clear /// which fields their attestation is relevant for by off-chain means. -#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub enum Judgement { /// The default value; no opinion is held. diff --git a/substrate/frame/nfts/src/types.rs b/substrate/frame/nfts/src/types.rs index 4865755e2e0e..7052ba7e206e 100644 --- a/substrate/frame/nfts/src/types.rs +++ b/substrate/frame/nfts/src/types.rs @@ -233,7 +233,7 @@ pub struct ItemMetadataDeposit { } /// Specifies whether the tokens will be sent or received. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub enum PriceDirection { /// Tokens will be sent. Send, @@ -253,7 +253,7 @@ pub struct PriceWithDirection { /// Support for up to 64 user-enabled features on a collection. #[bitflags] #[repr(u64)] -#[derive(Copy, Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, MaxEncodedLen, TypeInfo)] pub enum CollectionSetting { /// Items in this collection are transferable. TransferableItems, @@ -291,7 +291,7 @@ impl_codec_bitflags!(CollectionSettings, u64, CollectionSetting); /// Mint type. Can the NFT be create by anyone, or only the creator of the collection, /// or only by wallets that already hold an NFT from a certain collection? /// The ownership of a privately minted NFT is still publicly visible. -#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub enum MintType { /// Only an `Issuer` could mint items. Issuer, @@ -329,9 +329,7 @@ impl Default for MintSettings { /// An attribute was set by the pallet. Pallet, @@ -351,7 +349,7 @@ pub struct CancelAttributesApprovalWitness { } /// A list of possible pallet-level attributes. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub enum PalletAttributes { /// Marks an item as being used in order to claim another item. UsedToClaim(CollectionId), @@ -388,7 +386,7 @@ impl CollectionConfig = <::Lookup as StaticLookup pub const POINTS_TO_BALANCE_INIT_RATIO: u32 = 1; /// Possible operations on the configuration values of this pallet. -#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, RuntimeDebugNoBound, PartialEq, Clone)] +#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, Debug, PartialEq, Clone)] pub enum ConfigOp { /// Don't change. Noop, @@ -647,7 +647,7 @@ impl PoolMember { } /// A pool's possible states. -#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, PartialEq, RuntimeDebugNoBound, Clone, Copy)] +#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, PartialEq, Debug, Clone, Copy)] pub enum PoolState { /// The pool is open to be joined, and is working normally. Open, @@ -680,7 +680,7 @@ pub struct PoolRoles { } // A pool's possible commission claiming permissions. -#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum CommissionClaimPermission { Permissionless, Account(AccountId), diff --git a/substrate/frame/preimage/src/lib.rs b/substrate/frame/preimage/src/lib.rs index 4e4746851666..f99e2127c6c9 100644 --- a/substrate/frame/preimage/src/lib.rs +++ b/substrate/frame/preimage/src/lib.rs @@ -63,7 +63,7 @@ use frame_system::pallet_prelude::*; pub use pallet::*; /// A type to note whether a preimage is owned by a user or the system. -#[derive(Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen, Debug)] pub enum OldRequestStatus { /// The associated preimage has not yet been requested by the system. The given deposit (if /// some) is being held until either it becomes requested or the user retracts the preimage. @@ -75,7 +75,7 @@ pub enum OldRequestStatus { } /// A type to note whether a preimage is owned by a user or the system. -#[derive(Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen, Debug)] pub enum RequestStatus { /// The associated preimage has not yet been requested by the system. The given deposit (if /// some) is being held until either it becomes requested or the user retracts the preimage. diff --git a/substrate/frame/proxy/src/tests.rs b/substrate/frame/proxy/src/tests.rs index 3ed61fbedaaa..a2f575fc0fc6 100644 --- a/substrate/frame/proxy/src/tests.rs +++ b/substrate/frame/proxy/src/tests.rs @@ -71,7 +71,7 @@ impl pallet_utility::Config for Test { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] diff --git a/substrate/frame/ranked-collective/src/lib.rs b/substrate/frame/ranked-collective/src/lib.rs index 7c93af94ecb7..8df41664676c 100644 --- a/substrate/frame/ranked-collective/src/lib.rs +++ b/substrate/frame/ranked-collective/src/lib.rs @@ -180,7 +180,7 @@ impl MemberRecord { } /// Record needed for every vote. -#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum VoteRecord { /// Vote was an aye with given vote weight. Aye(Votes), diff --git a/substrate/frame/referenda/src/types.rs b/substrate/frame/referenda/src/types.rs index 3b1095695e36..c45116de8291 100644 --- a/substrate/frame/referenda/src/types.rs +++ b/substrate/frame/referenda/src/types.rs @@ -213,7 +213,7 @@ pub struct ReferendumStatus< } /// Info regarding a referendum, present or past. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum ReferendumInfo< TrackId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, RuntimeOrigin: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, diff --git a/substrate/frame/safe-mode/src/mock.rs b/substrate/frame/safe-mode/src/mock.rs index fbfc16f4aa28..9e0f3361f12e 100644 --- a/substrate/frame/safe-mode/src/mock.rs +++ b/substrate/frame/safe-mode/src/mock.rs @@ -102,7 +102,7 @@ impl pallet_utility::Config for Test { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] diff --git a/substrate/frame/salary/src/lib.rs b/substrate/frame/salary/src/lib.rs index 102b9c71fa0b..2a45a88c9f69 100644 --- a/substrate/frame/salary/src/lib.rs +++ b/substrate/frame/salary/src/lib.rs @@ -64,7 +64,7 @@ pub struct StatusType { } /// The state of a specific payment claim. -#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, Debug)] pub enum ClaimState { /// No claim recorded. Nothing, diff --git a/substrate/frame/society/src/lib.rs b/substrate/frame/society/src/lib.rs index db764cf3172f..d95922031c59 100644 --- a/substrate/frame/society/src/lib.rs +++ b/substrate/frame/society/src/lib.rs @@ -302,7 +302,7 @@ pub struct Vote { } /// A judgement by the suspension judgement origin on a suspended candidate. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum Judgement { /// The suspension judgement origin takes no direct judgment /// and places the candidate back into the bid pool. @@ -327,7 +327,7 @@ pub struct Payout { } /// Status of a vouching member. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum VouchingStatus { /// Member is currently vouching for a user. Vouching, @@ -401,7 +401,7 @@ pub struct Candidacy { } /// A vote by a member on a candidate application. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub enum BidKind { /// The given deposit was paid for this bid. Deposit(Balance), diff --git a/substrate/frame/staking/src/lib.rs b/substrate/frame/staking/src/lib.rs index b594f7598d28..f23620635a4d 100644 --- a/substrate/frame/staking/src/lib.rs +++ b/substrate/frame/staking/src/lib.rs @@ -397,7 +397,7 @@ impl Default for EraRewardPoints { } /// A destination account for payment. -#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum RewardDestination { /// Pay into the stash account, increasing the amount at stake accordingly. Staked, @@ -938,7 +938,7 @@ where Eq, Encode, Decode, - RuntimeDebug, + Debug, TypeInfo, MaxEncodedLen, serde::Serialize, diff --git a/substrate/frame/staking/src/migrations.rs b/substrate/frame/staking/src/migrations.rs index 510252be26c9..136b3ca1088f 100644 --- a/substrate/frame/staking/src/migrations.rs +++ b/substrate/frame/staking/src/migrations.rs @@ -34,7 +34,7 @@ use sp_runtime::TryRuntimeError; /// Used for release versioning up to v12. /// /// Obsolete from v13. Keeping around to make encoding/decoding of old migration code easier. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] enum ObsoleteReleases { V1_0_0Ancient, V2_0_0, diff --git a/substrate/frame/support/src/dispatch.rs b/substrate/frame/support/src/dispatch.rs index 8d8748f06773..dcf8721c94df 100644 --- a/substrate/frame/support/src/dispatch.rs +++ b/substrate/frame/support/src/dispatch.rs @@ -70,7 +70,7 @@ pub trait CheckIfFeeless { } /// Origin for the System pallet. -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum RawOrigin { /// The system itself ordained this dispatch to happen: this is the highest privilege level. Root, @@ -133,7 +133,7 @@ pub trait PaysFee { } /// Explicit enum to denote if a transaction pays fee or not. -#[derive(Clone, Copy, Eq, PartialEq, RuntimeDebug, Encode, Decode, TypeInfo)] +#[derive(Clone, Copy, Eq, PartialEq, Debug, Encode, Decode, TypeInfo)] pub enum Pays { /// Transactor will pay related fees. Yes, @@ -168,7 +168,7 @@ impl From for Pays { /// [DispatchClass::all] and [DispatchClass::non_mandatory] helper functions. #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, Debug, TypeInfo)] pub enum DispatchClass { /// A normal dispatch. Normal, diff --git a/substrate/frame/support/src/traits/messages.rs b/substrate/frame/support/src/traits/messages.rs index 0e0a06cf2a44..3c1211a21a1c 100644 --- a/substrate/frame/support/src/traits/messages.rs +++ b/substrate/frame/support/src/traits/messages.rs @@ -27,7 +27,7 @@ use sp_weights::{Weight, WeightMeter}; /// Errors that can happen when attempting to process a message with /// [`ProcessMessage::process_message()`]. -#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, Debug)] pub enum ProcessMessageError { /// The message data format is unknown (e.g. unrecognised header) BadFormat, @@ -68,7 +68,7 @@ pub trait ProcessMessage { /// Errors that can happen when attempting to execute an overweight message with /// [`ServiceQueues::execute_overweight()`]. -#[derive(Eq, PartialEq, RuntimeDebug)] +#[derive(Eq, PartialEq, Debug)] pub enum ExecuteOverweightError { /// The referenced message was not found. NotFound, diff --git a/substrate/frame/support/src/traits/preimages.rs b/substrate/frame/support/src/traits/preimages.rs index 647af029c16d..d098e95f3eb6 100644 --- a/substrate/frame/support/src/traits/preimages.rs +++ b/substrate/frame/support/src/traits/preimages.rs @@ -31,7 +31,7 @@ pub type BoundedInline = crate::BoundedVec>; /// The maximum we expect a single legacy hash lookup to be. const MAX_LEGACY_LEN: u32 = 1_000_000; -#[derive(Encode, Decode, MaxEncodedLen, Clone, Eq, PartialEq, TypeInfo, RuntimeDebug)] +#[derive(Encode, Decode, MaxEncodedLen, Clone, Eq, PartialEq, TypeInfo, Debug)] #[codec(mel_bound())] pub enum Bounded { /// A hash with no preimage length. We do not support creation of this except diff --git a/substrate/frame/support/src/traits/schedule.rs b/substrate/frame/support/src/traits/schedule.rs index f41c73fe69a8..8811964fa507 100644 --- a/substrate/frame/support/src/traits/schedule.rs +++ b/substrate/frame/support/src/traits/schedule.rs @@ -34,7 +34,7 @@ pub type Period = (BlockNumber, u32); pub type Priority = u8; /// The dispatch time of a scheduled task. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub enum DispatchTime { /// At specified block. At(BlockNumber), @@ -61,7 +61,7 @@ pub const HARD_DEADLINE: Priority = 63; pub const LOWEST_PRIORITY: Priority = 255; /// Type representing an encodable value or the hash of the encoding of such a value. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum MaybeHashed { /// The value itself. Value(T), @@ -76,7 +76,7 @@ impl From for MaybeHashed { } /// Error type for `MaybeHashed::lookup`. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum LookupError { /// A call of this hash was not known. Unknown, diff --git a/substrate/frame/support/src/traits/tokens/fungible/union_of.rs b/substrate/frame/support/src/traits/tokens/fungible/union_of.rs index db44b2f43a4e..5cb388ddf68e 100644 --- a/substrate/frame/support/src/traits/tokens/fungible/union_of.rs +++ b/substrate/frame/support/src/traits/tokens/fungible/union_of.rs @@ -40,7 +40,7 @@ use sp_std::cmp::Ordering; /// The `NativeOrWithId` enum classifies an asset as either `Native` to the current chain or as an /// asset with a specific ID. -#[derive(Decode, Encode, Default, MaxEncodedLen, TypeInfo, Clone, RuntimeDebug, Eq)] +#[derive(Decode, Encode, Default, MaxEncodedLen, TypeInfo, Clone, Debug, Eq)] pub enum NativeOrWithId where AssetId: Ord, diff --git a/substrate/frame/support/src/traits/tokens/misc.rs b/substrate/frame/support/src/traits/tokens/misc.rs index 424acb1d550b..66c8d15542fb 100644 --- a/substrate/frame/support/src/traits/tokens/misc.rs +++ b/substrate/frame/support/src/traits/tokens/misc.rs @@ -28,7 +28,7 @@ use sp_runtime::{ use sp_std::fmt::Debug; /// The origin of funds to be used for a deposit operation. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Provenance { /// The funds will be minted into the system, increasing total issuance (and potentially /// causing an overflow there). @@ -38,7 +38,7 @@ pub enum Provenance { } /// The mode under which usage of funds may be restricted. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Restriction { /// Funds are under the normal conditions. Free, @@ -47,7 +47,7 @@ pub enum Restriction { } /// The mode by which we describe whether an operation should keep an account alive. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Preservation { /// We don't care if the account gets killed by this operation. Expendable, @@ -59,7 +59,7 @@ pub enum Preservation { } /// The privilege with which a withdraw operation is conducted. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Fortitude { /// The operation should execute with regular privilege. Polite, @@ -70,7 +70,7 @@ pub enum Fortitude { /// The precision required of an operation generally involving some aspect of quantitative fund /// withdrawal or transfer. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Precision { /// The operation should must either proceed either exactly according to the amounts involved /// or not at all. @@ -81,7 +81,7 @@ pub enum Precision { } /// One of a number of consequences of withdrawing a fungible from an account. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum WithdrawConsequence { /// Withdraw could not happen since the amount to be withdrawn is less than the total funds in /// the account. @@ -127,7 +127,7 @@ impl WithdrawConsequence { } /// One of a number of consequences of withdrawing a fungible from an account. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum DepositConsequence { /// Deposit couldn't happen due to the amount being too low. This is usually because the /// account doesn't yet exist and the deposit wouldn't bring it to at least the minimum needed @@ -165,7 +165,7 @@ impl DepositConsequence { } /// Simple boolean for whether an account needs to be kept in existence. -#[derive(Copy, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum ExistenceRequirement { /// Operation must not result in the account going out of existence. /// @@ -178,7 +178,7 @@ pub enum ExistenceRequirement { /// Status of funds. #[derive( - PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, + PartialEq, Eq, Clone, Copy, Encode, Decode, Debug, scale_info::TypeInfo, MaxEncodedLen, )] pub enum BalanceStatus { /// Funds are free, as corresponding to `free` item in Balances. diff --git a/substrate/frame/support/src/traits/tokens/pay.rs b/substrate/frame/support/src/traits/tokens/pay.rs index 62d7a056a3f1..5f581b4f0f00 100644 --- a/substrate/frame/support/src/traits/tokens/pay.rs +++ b/substrate/frame/support/src/traits/tokens/pay.rs @@ -68,7 +68,7 @@ pub trait Pay { } /// Status for making a payment via the `Pay::pay` trait function. -#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, Debug)] pub enum PaymentStatus { /// Payment is in progress. Nothing to report yet. InProgress, diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 86ff3559f450..4bf1df35c462 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -1051,7 +1051,7 @@ pub type Key = Vec; pub type KeyValue = (Vec, Vec); /// A phase of a block's execution. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] #[cfg_attr(feature = "std", derive(Serialize, PartialEq, Eq, Clone))] pub enum Phase { /// Applying an extrinsic. @@ -1375,14 +1375,14 @@ where } /// Reference status; can be either referenced or unreferenced. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub enum RefStatus { Referenced, Unreferenced, } /// Some resultant status relevant to incrementing a provider/self-sufficient reference. -#[derive(Eq, PartialEq, RuntimeDebug)] +#[derive(Eq, PartialEq, Debug)] pub enum IncRefStatus { /// Account was created. Created, @@ -1391,7 +1391,7 @@ pub enum IncRefStatus { } /// Some resultant status relevant to decrementing a provider/self-sufficient reference. -#[derive(Eq, PartialEq, RuntimeDebug)] +#[derive(Eq, PartialEq, Debug)] pub enum DecRefStatus { /// Account was destroyed. Reaped, diff --git a/substrate/frame/transaction-payment/src/lib.rs b/substrate/frame/transaction-payment/src/lib.rs index 0e440ee4e9ff..add161c5afbf 100644 --- a/substrate/frame/transaction-payment/src/lib.rs +++ b/substrate/frame/transaction-payment/src/lib.rs @@ -291,7 +291,7 @@ where } /// Storage releases of the pallet. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] enum Releases { /// Original version of the pallet. V1Ancient, diff --git a/substrate/frame/treasury/src/lib.rs b/substrate/frame/treasury/src/lib.rs index 2576421d4912..680b6f1852ab 100644 --- a/substrate/frame/treasury/src/lib.rs +++ b/substrate/frame/treasury/src/lib.rs @@ -156,7 +156,7 @@ pub struct Proposal { /// The state of the payment claim. #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] -#[derive(Encode, Decode, Clone, PartialEq, Eq, MaxEncodedLen, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, MaxEncodedLen, Debug, TypeInfo)] pub enum PaymentState { /// Pending claim. Pending, diff --git a/substrate/frame/tx-pause/src/mock.rs b/substrate/frame/tx-pause/src/mock.rs index 5206023838b9..e48d87daa089 100644 --- a/substrate/frame/tx-pause/src/mock.rs +++ b/substrate/frame/tx-pause/src/mock.rs @@ -100,7 +100,7 @@ impl pallet_utility::Config for Test { PartialOrd, Encode, Decode, - RuntimeDebug, + Debug, MaxEncodedLen, scale_info::TypeInfo, )] diff --git a/substrate/frame/vesting/src/lib.rs b/substrate/frame/vesting/src/lib.rs index 4101caded418..d52c6be07367 100644 --- a/substrate/frame/vesting/src/lib.rs +++ b/substrate/frame/vesting/src/lib.rs @@ -92,7 +92,7 @@ const VESTING_ID: LockIdentifier = *b"vesting "; // A value placed in storage that represents the current version of the Vesting storage. // This value is used by `on_runtime_upgrade` to determine whether we run storage migration logic. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] enum Releases { V0, V1, diff --git a/substrate/primitives/consensus/babe/src/digests.rs b/substrate/primitives/consensus/babe/src/digests.rs index 8d44fd7f7627..f57bf85dfbe6 100644 --- a/substrate/primitives/consensus/babe/src/digests.rs +++ b/substrate/primitives/consensus/babe/src/digests.rs @@ -69,7 +69,7 @@ pub struct SecondaryVRFPreDigest { /// A BABE pre-runtime digest. This contains all data required to validate a /// block and for the BABE runtime module. Slots can be assigned to a primary /// (VRF based) and to a secondary (slot number based). -#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub enum PreDigest { /// A primary VRF-based slot assignment. #[codec(index = 1)] @@ -138,9 +138,7 @@ pub struct NextEpochDescriptor { /// Information about the next epoch config, if changed. This is broadcast in the first /// block of the epoch, and applies using the same rules as `NextEpochDescriptor`. -#[derive( - Decode, Encode, PartialEq, Eq, Clone, RuntimeDebug, MaxEncodedLen, scale_info::TypeInfo, -)] +#[derive(Decode, Encode, PartialEq, Eq, Clone, Debug, MaxEncodedLen, scale_info::TypeInfo)] pub enum NextConfigDescriptor { /// Version 1. #[codec(index = 1)] diff --git a/substrate/primitives/consensus/babe/src/lib.rs b/substrate/primitives/consensus/babe/src/lib.rs index 62d17a699b94..e95593f6fb7e 100644 --- a/substrate/primitives/consensus/babe/src/lib.rs +++ b/substrate/primitives/consensus/babe/src/lib.rs @@ -219,7 +219,7 @@ impl BabeConfiguration { } /// Types of allowed slots. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Debug, MaxEncodedLen, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum AllowedSlots { /// Only allow primary slots. diff --git a/substrate/primitives/consensus/grandpa/src/lib.rs b/substrate/primitives/consensus/grandpa/src/lib.rs index 7c91c3398cef..ab81275db000 100644 --- a/substrate/primitives/consensus/grandpa/src/lib.rs +++ b/substrate/primitives/consensus/grandpa/src/lib.rs @@ -145,7 +145,7 @@ pub struct ScheduledChange { } /// An consensus log item for GRANDPA. -#[derive(Decode, Encode, PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(Decode, Encode, PartialEq, Eq, Clone, Debug)] #[cfg_attr(feature = "serde", derive(Serialize))] pub enum ConsensusLog { /// Schedule an authority set change. diff --git a/substrate/primitives/core/src/lib.rs b/substrate/primitives/core/src/lib.rs index f7725a7ec6eb..9afd6d7bcf97 100644 --- a/substrate/primitives/core/src/lib.rs +++ b/substrate/primitives/core/src/lib.rs @@ -310,7 +310,7 @@ pub fn to_substrate_wasm_fn_return_value(value: &impl Encode) -> u64 { /// The void type - it cannot exist. // Oh rust, you crack me up... -#[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Decode, Encode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub enum Void {} /// Macro for creating `Maybe*` marker traits. diff --git a/substrate/primitives/core/src/offchain/mod.rs b/substrate/primitives/core/src/offchain/mod.rs index ac61da50ea75..fe9b508347f4 100644 --- a/substrate/primitives/core/src/offchain/mod.rs +++ b/substrate/primitives/core/src/offchain/mod.rs @@ -57,7 +57,7 @@ pub trait OffchainStorage: Clone + Send + Sync { } /// A type of supported crypto. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, RuntimeDebug, PassByEnum)] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Debug, PassByEnum)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[repr(C)] pub enum StorageKind { @@ -105,7 +105,7 @@ impl From for u32 { } /// An error enum returned by some http methods. -#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug, Encode, Decode, PassByEnum)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Encode, Decode, PassByEnum)] #[repr(C)] pub enum HttpError { /// The requested action couldn't been completed within a deadline. @@ -136,7 +136,7 @@ impl From for u32 { } /// Status of the HTTP request -#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug, Encode, Decode, PassByCodec)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Encode, Decode, PassByCodec)] pub enum HttpRequestStatus { /// Deadline was reached while we waited for this request to finish. /// diff --git a/substrate/primitives/debug-derive/tests/tests.rs b/substrate/primitives/debug-derive/tests/tests.rs index c4217413a620..4bfe4348346c 100644 --- a/substrate/primitives/debug-derive/tests/tests.rs +++ b/substrate/primitives/debug-derive/tests/tests.rs @@ -26,7 +26,7 @@ struct Named { b: String, } -#[derive(RuntimeDebug)] +#[derive(Debug)] enum EnumLongName { A, B(A, String), diff --git a/substrate/primitives/merkle-mountain-range/src/lib.rs b/substrate/primitives/merkle-mountain-range/src/lib.rs index ef0f4665f034..79b7541ccf7a 100644 --- a/substrate/primitives/merkle-mountain-range/src/lib.rs +++ b/substrate/primitives/merkle-mountain-range/src/lib.rs @@ -175,7 +175,7 @@ impl EncodableOpaqueLeaf { /// /// [DataOrHash::hash] method calculates the hash of this element in its compact form, /// so should be used instead of hashing the encoded form (which will always be non-compact). -#[derive(RuntimeDebug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq)] pub enum DataOrHash { /// Arbitrary data in its full form. Data(L), @@ -363,7 +363,7 @@ pub struct Proof { /// Merkle Mountain Range operation error. #[cfg_attr(feature = "std", derive(thiserror::Error))] -#[derive(RuntimeDebug, codec::Encode, codec::Decode, PartialEq, Eq, TypeInfo)] +#[derive(Debug, codec::Encode, codec::Decode, PartialEq, Eq, TypeInfo)] pub enum Error { /// Error during translation of a block number into a leaf index. #[cfg_attr(feature = "std", error("Error performing numeric op"))] diff --git a/substrate/primitives/npos-elections/src/lib.rs b/substrate/primitives/npos-elections/src/lib.rs index 1b35bce56a33..756ac14bc191 100644 --- a/substrate/primitives/npos-elections/src/lib.rs +++ b/substrate/primitives/npos-elections/src/lib.rs @@ -110,7 +110,7 @@ pub use reduce::reduce; pub use traits::{IdentifierT, PerThing128}; /// The errors that might occur in this crate and `frame-election-provider-solution-type`. -#[derive(Eq, PartialEq, RuntimeDebug)] +#[derive(Eq, PartialEq, Debug)] pub enum Error { /// While going from solution indices to ratio, the weight of all the edges has gone above the /// total. diff --git a/substrate/primitives/runtime/src/generic/block.rs b/substrate/primitives/runtime/src/generic/block.rs index 93d1cd003531..c3261d42abfa 100644 --- a/substrate/primitives/runtime/src/generic/block.rs +++ b/substrate/primitives/runtime/src/generic/block.rs @@ -35,7 +35,7 @@ use sp_core::RuntimeDebug; use sp_std::prelude::*; /// Something to identify a block. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug)] pub enum BlockId { /// Identify by block header hash. Hash(Block::Hash), diff --git a/substrate/primitives/runtime/src/generic/digest.rs b/substrate/primitives/runtime/src/generic/digest.rs index d5d0e3f82732..67ff214ce68a 100644 --- a/substrate/primitives/runtime/src/generic/digest.rs +++ b/substrate/primitives/runtime/src/generic/digest.rs @@ -71,7 +71,7 @@ impl Digest { /// Digest item that is able to encode/decode 'system' digest items and /// provide opaque access to other items. -#[derive(PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Debug)] pub enum DigestItem { /// A pre-runtime digest. /// @@ -170,7 +170,7 @@ impl TypeInfo for DigestItem { /// A 'referencing view' for digest item. Does not own its contents. Used by /// final runtime implementations for encoding/decoding its log items. -#[derive(PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Debug)] pub enum DigestItemRef<'a> { /// A pre-runtime digest. /// diff --git a/substrate/primitives/runtime/src/lib.rs b/substrate/primitives/runtime/src/lib.rs index 339f4160fca3..ff7e41454dfc 100644 --- a/substrate/primitives/runtime/src/lib.rs +++ b/substrate/primitives/runtime/src/lib.rs @@ -266,7 +266,7 @@ pub type ConsensusEngineId = [u8; 4]; /// Signature verify that can work with any known signature types. #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Eq, PartialEq, Clone, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] +#[derive(Eq, PartialEq, Clone, Encode, Decode, MaxEncodedLen, Debug, TypeInfo)] pub enum MultiSignature { /// An Ed25519 signature. Ed25519(ed25519::Signature), @@ -328,7 +328,7 @@ impl TryFrom for ecdsa::Signature { } /// Public key for any known crypto algorithm. -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum MultiSigner { /// An Ed25519 identity. diff --git a/substrate/primitives/runtime/src/offchain/http.rs b/substrate/primitives/runtime/src/offchain/http.rs index 2843163fb724..bda9a5831660 100644 --- a/substrate/primitives/runtime/src/offchain/http.rs +++ b/substrate/primitives/runtime/src/offchain/http.rs @@ -59,7 +59,7 @@ use sp_std::prelude::vec; use sp_std::{prelude::Vec, str}; /// Request method (HTTP verb) -#[derive(Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub enum Method { /// GET request Get, @@ -233,7 +233,7 @@ impl<'a, I: AsRef<[u8]>, T: IntoIterator> Request<'a, T> { } /// A request error -#[derive(Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub enum Error { /// Deadline has been reached. DeadlineReached, diff --git a/substrate/primitives/runtime/src/runtime_string.rs b/substrate/primitives/runtime/src/runtime_string.rs index 607ae59db632..d91ba4a81d5b 100644 --- a/substrate/primitives/runtime/src/runtime_string.rs +++ b/substrate/primitives/runtime/src/runtime_string.rs @@ -20,7 +20,7 @@ use sp_core::RuntimeDebug; use sp_std::vec::Vec; /// A string that wraps a `&'static str` in the runtime and `String`/`Vec` on decode. -#[derive(Eq, RuntimeDebug, Clone)] +#[derive(Eq, Debug, Clone)] pub enum RuntimeString { /// The borrowed mode that wraps a `&'static str`. Borrowed(&'static str), diff --git a/substrate/primitives/runtime/src/transaction_validity.rs b/substrate/primitives/runtime/src/transaction_validity.rs index e98ffd60513e..bac2d5919e1f 100644 --- a/substrate/primitives/runtime/src/transaction_validity.rs +++ b/substrate/primitives/runtime/src/transaction_validity.rs @@ -35,7 +35,7 @@ pub type TransactionLongevity = u64; pub type TransactionTag = Vec; /// An invalid transaction validity. -#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum InvalidTransaction { /// The call of the transaction is not expected. @@ -118,7 +118,7 @@ impl From for &'static str { } /// An unknown transaction validity. -#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum UnknownTransaction { /// Could not lookup some information that is required to validate the transaction. @@ -142,7 +142,7 @@ impl From for &'static str { } /// Errors that can occur while checking the validity of a transaction. -#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum TransactionValidityError { /// The transaction is invalid. @@ -226,7 +226,7 @@ impl From for TransactionValidity { /// Depending on the source we might apply different validation schemes. /// For instance we can disallow specific kinds of transactions if they were not produced /// by our local node (for instance off-chain workers). -#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub enum TransactionSource { /// Transaction is already included in block. /// diff --git a/substrate/primitives/staking/src/lib.rs b/substrate/primitives/staking/src/lib.rs index 9df3b6db7f63..745722cb042e 100644 --- a/substrate/primitives/staking/src/lib.rs +++ b/substrate/primitives/staking/src/lib.rs @@ -62,7 +62,7 @@ impl From for StakingAccount { } /// Representation of the status of a staker. -#[derive(RuntimeDebug, TypeInfo)] +#[derive(Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone))] pub enum StakerStatus { /// Chilling. diff --git a/substrate/primitives/statement-store/src/runtime_api.rs b/substrate/primitives/statement-store/src/runtime_api.rs index 37ca1da8918f..c36efa4ddcb6 100644 --- a/substrate/primitives/statement-store/src/runtime_api.rs +++ b/substrate/primitives/statement-store/src/runtime_api.rs @@ -37,7 +37,7 @@ pub struct ValidStatement { } /// An reason for an invalid statement. -#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, Debug, TypeInfo)] pub enum InvalidStatement { /// Failed proof validation. BadProof, @@ -50,7 +50,7 @@ pub enum InvalidStatement { /// The source of the statement. /// /// Depending on the source we might apply different validation schemes. -#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub enum StatementSource { /// Statement is coming from the on-chain worker. Chain, diff --git a/substrate/primitives/test-primitives/src/lib.rs b/substrate/primitives/test-primitives/src/lib.rs index 1e3b912eaf48..fc14cde8c33c 100644 --- a/substrate/primitives/test-primitives/src/lib.rs +++ b/substrate/primitives/test-primitives/src/lib.rs @@ -31,7 +31,7 @@ pub use sp_core::{hash::H256, RuntimeDebug}; use sp_runtime::traits::{BlakeTwo256, Extrinsic as ExtrinsicT, Verify}; /// Extrinsic for test-runtime. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, scale_info::TypeInfo)] pub enum Extrinsic { IncludeData(Vec), StorageChange(Vec, Option>),