From 1a52f9debac9dc27d4aa514dd0d5f880105d1641 Mon Sep 17 00:00:00 2001 From: Falco Hirschenberger Date: Fri, 26 Apr 2024 18:26:47 +0200 Subject: [PATCH 1/2] Change all RuntimeDebug and RuntimeDebugNoBound to Debug --- .../extensions/refund_relayer_extension.rs | 36 ++-------- .../runtime-common/src/messages_call_ext.rs | 8 +-- .../chains/chain-bridge-hub-kusama/src/lib.rs | 2 +- .../chain-bridge-hub-polkadot/src/lib.rs | 2 +- .../chains/chain-bridge-hub-rococo/src/lib.rs | 2 +- .../chain-bridge-hub-westend/src/lib.rs | 2 +- bridges/modules/grandpa/src/call_ext.rs | 4 +- bridges/modules/grandpa/src/storage_types.rs | 2 +- bridges/modules/messages/src/inbound_lane.rs | 2 +- bridges/modules/parachains/src/call_ext.rs | 4 +- bridges/primitives/beefy/src/lib.rs | 4 +- .../header-chain/src/justification/mod.rs | 2 +- .../src/justification/verification/mod.rs | 4 +- bridges/primitives/header-chain/src/lib.rs | 6 +- bridges/primitives/messages/src/lib.rs | 20 +++--- .../primitives/messages/src/source_chain.rs | 2 +- .../primitives/messages/src/target_chain.rs | 6 +- bridges/primitives/parachains/src/lib.rs | 6 +- .../polkadot-core/src/parachains.rs | 8 +-- bridges/primitives/runtime/src/lib.rs | 2 +- bridges/primitives/runtime/src/messages.rs | 2 +- .../primitives/runtime/src/storage_types.rs | 2 +- bridges/primitives/test-utils/src/keyring.rs | 2 +- .../xcm-bridge-hub-router/src/lib.rs | 2 +- .../pallets/inbound-queue/src/envelope.rs | 4 +- .../outbound-queue/merkle-tree/src/lib.rs | 2 +- .../outbound-queue/src/send_message_impl.rs | 2 +- .../pallets/outbound-queue/src/types.rs | 2 +- .../snowbridge/primitives/beacon/src/types.rs | 40 ++++------- .../primitives/beacon/src/updates.rs | 10 +-- .../snowbridge/primitives/core/src/inbound.rs | 8 +-- bridges/snowbridge/primitives/core/src/lib.rs | 6 +- .../primitives/core/src/outbound.rs | 2 +- .../snowbridge/primitives/core/src/pricing.rs | 8 +-- .../primitives/ethereum/src/header.rs | 4 +- .../primitives/ethereum/src/receipt.rs | 2 +- .../primitives/router/src/inbound/mod.rs | 2 +- cumulus/pallets/dmp-queue/src/migration.rs | 2 +- cumulus/pallets/parachain-system/src/lib.rs | 2 +- .../src/unincluded_segment.rs | 12 ++-- cumulus/pallets/xcmp-queue/src/lib.rs | 2 +- .../src/bridge_common_config.rs | 2 +- .../src/bridge_to_bulletin_config.rs | 2 +- .../src/bridge_to_westend_config.rs | 2 +- .../src/bridge_to_rococo_config.rs | 4 +- .../people/people-rococo/src/people.rs | 9 +-- .../people/people-westend/src/people.rs | 9 +-- polkadot/parachain/src/primitives.rs | 23 ++----- polkadot/primitives/src/v7/async_backing.rs | 20 ++---- polkadot/primitives/src/v7/mod.rs | 68 ++++++++----------- polkadot/primitives/src/v7/signed.rs | 4 +- polkadot/primitives/src/vstaging/mod.rs | 10 +-- .../runtime/common/src/assigned_slots/mod.rs | 2 +- polkadot/runtime/common/src/claims.rs | 2 +- polkadot/runtime/common/src/crowdloan/mod.rs | 2 +- .../runtime/common/src/paras_registrar/mod.rs | 2 +- polkadot/runtime/common/src/purchase.rs | 2 +- .../parachains/src/assigner_coretime/mod.rs | 2 +- polkadot/runtime/parachains/src/disputes.rs | 2 +- polkadot/runtime/parachains/src/paras/mod.rs | 2 +- .../parachains/src/paras_inherent/mod.rs | 2 +- .../parachains/src/scheduler/migration.rs | 2 +- polkadot/xcm/xcm-executor/src/assets.rs | 2 +- substrate/frame/alliance/src/types.rs | 12 +--- substrate/frame/assets/src/types.rs | 8 +-- substrate/frame/atomic-swap/src/lib.rs | 4 +- substrate/frame/balances/src/types.rs | 10 +-- substrate/frame/bounties/src/lib.rs | 2 +- substrate/frame/broker/src/core_mask.rs | 4 +- substrate/frame/broker/src/types.rs | 26 ++++--- substrate/frame/child-bounties/src/lib.rs | 2 +- substrate/frame/collective/src/lib.rs | 2 +- .../frame/contracts/src/migration/v10.rs | 4 +- .../frame/contracts/src/migration/v13.rs | 2 +- .../frame/contracts/src/migration/v15.rs | 2 +- .../frame/contracts/src/migration/v16.rs | 2 +- substrate/frame/contracts/src/primitives.rs | 8 +-- substrate/frame/contracts/src/storage.rs | 2 +- .../frame/contracts/src/storage/meter.rs | 6 +- substrate/frame/contracts/src/wasm/runtime.rs | 2 +- .../frame/conviction-voting/src/types.rs | 13 +--- substrate/frame/conviction-voting/src/vote.rs | 8 +-- substrate/frame/core-fellowship/src/lib.rs | 4 +- substrate/frame/democracy/src/types.rs | 8 +-- substrate/frame/democracy/src/vote.rs | 4 +- .../election-provider-multi-phase/src/lib.rs | 13 +--- .../src/signed.rs | 2 +- .../election-provider-support/src/lib.rs | 2 +- substrate/frame/elections-phragmen/src/lib.rs | 4 +- .../elections-phragmen/src/migrations/v3.rs | 4 +- .../frame/examples/offchain-worker/src/lib.rs | 2 +- .../single-block-migrations/src/lib.rs | 4 +- substrate/frame/fast-unstake/src/types.rs | 4 +- substrate/frame/identity/src/legacy.rs | 9 +-- substrate/frame/identity/src/types.rs | 6 +- substrate/frame/im-online/src/lib.rs | 6 +- substrate/frame/lottery/src/lib.rs | 4 +- substrate/frame/message-queue/src/lib.rs | 8 +-- substrate/frame/mixnet/src/lib.rs | 4 +- substrate/frame/multisig/src/lib.rs | 6 +- substrate/frame/nfts/src/types.rs | 48 ++++++------- substrate/frame/nomination-pools/src/lib.rs | 16 ++--- substrate/frame/proxy/src/lib.rs | 14 +--- substrate/frame/ranked-collective/src/lib.rs | 11 +-- substrate/frame/recovery/src/lib.rs | 4 +- substrate/frame/referenda/src/types.rs | 6 +- substrate/frame/salary/src/lib.rs | 4 +- substrate/frame/scheduler/src/lib.rs | 6 +- substrate/frame/society/src/lib.rs | 18 ++--- substrate/frame/staking/src/lib.rs | 25 +++---- substrate/frame/staking/src/slashing.rs | 2 +- substrate/frame/support/src/dispatch.rs | 4 +- .../frame/support/src/traits/messages.rs | 2 +- .../frame/support/src/traits/metadata.rs | 4 +- substrate/frame/support/src/traits/storage.rs | 2 +- .../src/traits/tokens/fungible/imbalance.rs | 2 +- .../support/src/traits/tokens/fungible/mod.rs | 36 ++-------- .../src/traits/tokens/fungibles/imbalance.rs | 2 +- .../support/test/tests/derive_no_bound.rs | 2 +- substrate/frame/system/src/lib.rs | 4 +- substrate/frame/system/src/limits.rs | 8 +-- substrate/frame/system/src/migrations/mod.rs | 2 +- substrate/frame/system/src/offchain.rs | 4 +- substrate/frame/tips/src/lib.rs | 2 +- substrate/frame/treasury/src/lib.rs | 4 +- substrate/frame/uniques/src/types.rs | 10 +-- substrate/frame/vesting/src/vesting_info.rs | 2 +- .../primitives/consensus/babe/src/digests.rs | 8 +-- .../primitives/consensus/babe/src/lib.rs | 6 +- .../primitives/consensus/grandpa/src/lib.rs | 2 +- .../consensus/sassafras/src/digests.rs | 4 +- .../primitives/consensus/sassafras/src/lib.rs | 4 +- substrate/primitives/core/src/lib.rs | 14 +--- substrate/primitives/core/src/offchain/mod.rs | 12 ++-- .../primitives/debug-derive/tests/tests.rs | 4 +- .../merkle-mountain-range/src/lib.rs | 8 +-- .../npos-elections/src/assignments.rs | 4 +- .../primitives/npos-elections/src/lib.rs | 6 +- .../primitives/runtime/src/generic/block.rs | 4 +- .../primitives/runtime/src/generic/digest.rs | 2 +- substrate/primitives/runtime/src/lib.rs | 4 +- .../primitives/runtime/src/offchain/http.rs | 10 +-- substrate/primitives/runtime/src/traits.rs | 8 +-- .../runtime/src/transaction_validity.rs | 4 +- substrate/primitives/session/src/lib.rs | 2 +- substrate/primitives/staking/src/lib.rs | 20 ++---- .../statement-store/src/runtime_api.rs | 2 +- substrate/primitives/storage/src/lib.rs | 10 +-- substrate/primitives/weights/src/lib.rs | 2 +- substrate/test-utils/runtime/src/lib.rs | 4 +- 150 files changed, 391 insertions(+), 627 deletions(-) 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 5aa7f1c095d5..9cc911fbff4c 100644 --- a/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs +++ b/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs @@ -419,14 +419,7 @@ pub trait RefundSignedExtension: /// Adapter that allow implementing `sp_runtime::traits::SignedExtension` for any /// `RefundSignedExtension`. #[derive( - DefaultNoBound, - CloneNoBound, - Decode, - Encode, - EqNoBound, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + DefaultNoBound, CloneNoBound, Decode, Encode, EqNoBound, PartialEqNoBound, Debug, TypeInfo, )] pub struct RefundSignedExtensionAdapter(T); @@ -561,14 +554,7 @@ where /// /// Extension does not refund transaction tip due to security reasons. #[derive( - DefaultNoBound, - CloneNoBound, - Decode, - Encode, - EqNoBound, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + DefaultNoBound, CloneNoBound, Decode, Encode, EqNoBound, PartialEqNoBound, Debug, TypeInfo, )] #[scale_info(skip_type_params(Runtime, Para, Msgs, Refund, Priority, Id))] pub struct RefundBridgedParachainMessages( @@ -723,14 +709,7 @@ where /// /// Extension does not refund transaction tip due to security reasons. #[derive( - DefaultNoBound, - CloneNoBound, - Decode, - Encode, - EqNoBound, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + DefaultNoBound, CloneNoBound, Decode, Encode, EqNoBound, PartialEqNoBound, Debug, TypeInfo, )] #[scale_info(skip_type_params(Runtime, GrandpaInstance, Msgs, Refund, Priority, Id))] pub struct RefundBridgedGrandpaMessages( @@ -856,14 +835,7 @@ where /// Transaction extension that refunds a relayer for standalone messages delivery and confirmation /// transactions. Finality transactions are not refunded. #[derive( - DefaultNoBound, - CloneNoBound, - Decode, - Encode, - EqNoBound, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + DefaultNoBound, CloneNoBound, Decode, Encode, EqNoBound, PartialEqNoBound, Debug, TypeInfo, )] #[scale_info(skip_type_params(Runtime, GrandpaInstance, Msgs, Refund, Priority, Id))] pub struct RefundBridgedMessages( diff --git a/bridges/bin/runtime-common/src/messages_call_ext.rs b/bridges/bin/runtime-common/src/messages_call_ext.rs index fb07f7b6dd69..26b34ba7779c 100644 --- a/bridges/bin/runtime-common/src/messages_call_ext.rs +++ b/bridges/bin/runtime-common/src/messages_call_ext.rs @@ -31,7 +31,7 @@ use sp_runtime::{transaction_validity::TransactionValidity, RuntimeDebug}; use sp_std::ops::RangeInclusive; /// Generic info about a messages delivery/confirmation proof. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] pub struct BaseMessagesProofInfo { /// Message lane, used by the call. pub lane_id: LaneId, @@ -55,7 +55,7 @@ impl BaseMessagesProofInfo { } /// Occupation state of the unrewarded relayers vector. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] #[cfg_attr(test, derive(Default))] pub struct UnrewardedRelayerOccupation { /// The number of remaining unoccupied entries for new relayers. @@ -65,7 +65,7 @@ pub struct UnrewardedRelayerOccupation { } /// Info about a `ReceiveMessagesProof` call which tries to update a single lane. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] pub struct ReceiveMessagesProofInfo { /// Base messages proof info pub base: BaseMessagesProofInfo, @@ -105,7 +105,7 @@ impl ReceiveMessagesProofInfo { } /// Info about a `ReceiveMessagesDeliveryProof` call which tries to update a single lane. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] pub struct ReceiveMessagesDeliveryProofInfo(pub BaseMessagesProofInfo); impl ReceiveMessagesDeliveryProofInfo { diff --git a/bridges/chains/chain-bridge-hub-kusama/src/lib.rs b/bridges/chains/chain-bridge-hub-kusama/src/lib.rs index ef3ef4ab7b7a..29623b138e4f 100644 --- a/bridges/chains/chain-bridge-hub-kusama/src/lib.rs +++ b/bridges/chains/chain-bridge-hub-kusama/src/lib.rs @@ -32,7 +32,7 @@ use frame_support::{ use sp_runtime::RuntimeDebug; /// BridgeHubKusama parachain. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct BridgeHubKusama; impl Chain for BridgeHubKusama { diff --git a/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs b/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs index 9db71af928e5..a2403ec82c22 100644 --- a/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs +++ b/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::dispatch::DispatchClass; use sp_runtime::RuntimeDebug; /// BridgeHubPolkadot parachain. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct BridgeHubPolkadot; impl Chain for BridgeHubPolkadot { diff --git a/bridges/chains/chain-bridge-hub-rococo/src/lib.rs b/bridges/chains/chain-bridge-hub-rococo/src/lib.rs index d7097f01c531..3200dffacb48 100644 --- a/bridges/chains/chain-bridge-hub-rococo/src/lib.rs +++ b/bridges/chains/chain-bridge-hub-rococo/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::dispatch::DispatchClass; use sp_runtime::{MultiAddress, MultiSigner, RuntimeDebug}; /// BridgeHubRococo parachain. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct BridgeHubRococo; impl Chain for BridgeHubRococo { diff --git a/bridges/chains/chain-bridge-hub-westend/src/lib.rs b/bridges/chains/chain-bridge-hub-westend/src/lib.rs index 800f290d7bfa..1f2513930511 100644 --- a/bridges/chains/chain-bridge-hub-westend/src/lib.rs +++ b/bridges/chains/chain-bridge-hub-westend/src/lib.rs @@ -28,7 +28,7 @@ use frame_support::dispatch::DispatchClass; use sp_runtime::RuntimeDebug; /// BridgeHubWestend parachain. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct BridgeHubWestend; impl Chain for BridgeHubWestend { diff --git a/bridges/modules/grandpa/src/call_ext.rs b/bridges/modules/grandpa/src/call_ext.rs index 6fa62ec0cff4..a56a3e41ac70 100644 --- a/bridges/modules/grandpa/src/call_ext.rs +++ b/bridges/modules/grandpa/src/call_ext.rs @@ -37,7 +37,7 @@ use sp_runtime::{ }; /// Info about a `SubmitParachainHeads` call which tries to update a single parachain. -#[derive(Copy, Clone, PartialEq, RuntimeDebug)] +#[derive(Copy, Clone, PartialEq, Debug)] pub struct SubmitFinalityProofInfo { /// Number of the finality target. pub block_number: N, @@ -64,7 +64,7 @@ pub struct SubmitFinalityProofInfo { } /// Verified `SubmitFinalityProofInfo`. -#[derive(Copy, Clone, PartialEq, RuntimeDebug)] +#[derive(Copy, Clone, PartialEq, Debug)] pub struct VerifiedSubmitFinalityProofInfo { /// Base call information. pub base: SubmitFinalityProofInfo, diff --git a/bridges/modules/grandpa/src/storage_types.rs b/bridges/modules/grandpa/src/storage_types.rs index 6d1a7882dd49..2cd4f295202e 100644 --- a/bridges/modules/grandpa/src/storage_types.rs +++ b/bridges/modules/grandpa/src/storage_types.rs @@ -39,7 +39,7 @@ impl, I: 'static> Get for StoredAuthorityListLimit { } /// A bounded GRANDPA Authority List and ID. -#[derive(CloneNoBound, Decode, Encode, Eq, TypeInfo, MaxEncodedLen, RuntimeDebugNoBound)] +#[derive(CloneNoBound, Decode, Encode, Eq, TypeInfo, MaxEncodedLen, Debug)] #[scale_info(skip_type_params(T, I))] pub struct StoredAuthoritySet, I: 'static> { /// List of GRANDPA authorities for the current round. diff --git a/bridges/modules/messages/src/inbound_lane.rs b/bridges/modules/messages/src/inbound_lane.rs index da1698e6e037..fed972a725ec 100644 --- a/bridges/modules/messages/src/inbound_lane.rs +++ b/bridges/modules/messages/src/inbound_lane.rs @@ -54,7 +54,7 @@ pub trait InboundLaneStorage { /// these generic bounds all over the code. /// /// The encoding of this type matches encoding of the corresponding `MessageData`. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq)] pub struct StoredInboundLaneData, I: 'static>(pub InboundLaneData); impl, I: 'static> sp_std::ops::Deref for StoredInboundLaneData { diff --git a/bridges/modules/parachains/src/call_ext.rs b/bridges/modules/parachains/src/call_ext.rs index fe6b319205d4..860cb8390742 100644 --- a/bridges/modules/parachains/src/call_ext.rs +++ b/bridges/modules/parachains/src/call_ext.rs @@ -31,7 +31,7 @@ use sp_runtime::{ }; /// Info about a `SubmitParachainHeads` call which tries to update a single parachain. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] pub struct SubmitParachainHeadsInfo { /// Number and hash of the finalized relay block that has been used to prove parachain /// finality. @@ -46,7 +46,7 @@ pub struct SubmitParachainHeadsInfo { } /// Verified `SubmitParachainHeadsInfo`. -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq, Debug)] pub struct VerifiedSubmitParachainHeadsInfo { /// Base call information. pub base: SubmitParachainHeadsInfo, diff --git a/bridges/primitives/beefy/src/lib.rs b/bridges/primitives/beefy/src/lib.rs index 0441781e79a6..8c9bb4f494d2 100644 --- a/bridges/primitives/beefy/src/lib.rs +++ b/bridges/primitives/beefy/src/lib.rs @@ -130,7 +130,7 @@ pub type BeefyMmrLeafOf = sp_consensus_beefy::mmr::MmrLeaf< /// /// Provides the initial context that the bridge needs in order to know /// where to start the sync process from. -#[derive(Encode, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo, Serialize, Deserialize)] +#[derive(Encode, Decode, Debug, PartialEq, Clone, TypeInfo, Serialize, Deserialize)] pub struct InitializationData { /// Pallet operating mode. pub operating_mode: BasicOperatingMode, @@ -142,7 +142,7 @@ pub struct InitializationData { } /// Basic data, stored by the pallet for every imported commitment. -#[derive(Encode, Decode, RuntimeDebug, PartialEq, TypeInfo)] +#[derive(Encode, Decode, Debug, PartialEq, TypeInfo)] pub struct ImportedCommitment { /// Block number and hash of the finalized block parent. pub parent_number_and_hash: (BlockNumber, BlockHash), diff --git a/bridges/primitives/header-chain/src/justification/mod.rs b/bridges/primitives/header-chain/src/justification/mod.rs index d7c2cbf429e2..38132653643a 100644 --- a/bridges/primitives/header-chain/src/justification/mod.rs +++ b/bridges/primitives/header-chain/src/justification/mod.rs @@ -43,7 +43,7 @@ use sp_std::prelude::*; /// /// This particular proof is used to prove that headers on a bridged chain /// (so not our chain) have been finalized correctly. -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, Debug)] pub struct GrandpaJustification { /// The round (voting period) this justification is valid for. pub round: u64, diff --git a/bridges/primitives/header-chain/src/justification/verification/mod.rs b/bridges/primitives/header-chain/src/justification/verification/mod.rs index 9df3511e1035..58a9baca244c 100644 --- a/bridges/primitives/header-chain/src/justification/verification/mod.rs +++ b/bridges/primitives/header-chain/src/justification/verification/mod.rs @@ -45,7 +45,7 @@ type SignedPrecommit
= finality_grandpa::SignedPrecommit< >; /// Votes ancestries with useful methods. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct AncestryChain { /// We expect all forks in the ancestry chain to be descendants of base. base: HeaderId, @@ -168,7 +168,7 @@ pub enum PrecommitError { } /// The context needed for validating GRANDPA finality proofs. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct JustificationVerificationContext { /// The authority set used to verify the justification. pub voter_set: VoterSet, diff --git a/bridges/primitives/header-chain/src/lib.rs b/bridges/primitives/header-chain/src/lib.rs index ad496012c6a3..56e91ee2b367 100644 --- a/bridges/primitives/header-chain/src/lib.rs +++ b/bridges/primitives/header-chain/src/lib.rs @@ -54,7 +54,7 @@ pub enum HeaderChainError { /// /// Even though we may store full header, our applications (XCM) only use couple of header /// fields. Extracting those values makes on-chain storage and PoV smaller, which is good. -#[derive(Clone, Decode, Encode, Eq, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Decode, Encode, Eq, MaxEncodedLen, PartialEq, Debug, TypeInfo)] pub struct StoredHeaderData { /// Header number. pub number: Number, @@ -96,7 +96,7 @@ pub trait Parameter: Codec + EncodeLike + Clone + Eq + Debug + TypeInfo {} impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + Debug + TypeInfo {} /// A GRANDPA Authority List and ID. -#[derive(Default, Encode, Eq, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo)] +#[derive(Default, Encode, Eq, Decode, Debug, PartialEq, Clone, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct AuthoritySet { /// List of GRANDPA authorities for the current round. @@ -116,7 +116,7 @@ impl AuthoritySet { /// /// The bridge needs to know where to start its sync from, and this provides that initial context. #[derive( - Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, Clone, TypeInfo, Serialize, Deserialize, + Default, Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo, Serialize, Deserialize, )] pub struct InitializationData { /// The header from which we should start syncing. diff --git a/bridges/primitives/messages/src/lib.rs b/bridges/primitives/messages/src/lib.rs index c3f79b3ee388..8e522533c9cb 100644 --- a/bridges/primitives/messages/src/lib.rs +++ b/bridges/primitives/messages/src/lib.rs @@ -142,7 +142,7 @@ pub type BridgeMessageId = (LaneId, MessageNonce); pub type MessagePayload = Vec; /// Message key (unique message identifier) as it is stored in the storage. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct MessageKey { /// ID of the message lane. pub lane_id: LaneId, @@ -151,7 +151,7 @@ pub struct MessageKey { } /// Message as it is stored in the storage. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Message { /// Message key. pub key: MessageKey, @@ -160,7 +160,7 @@ pub struct Message { } /// Inbound lane data. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo)] pub struct InboundLaneData { /// Identifiers of relayers and messages that they have delivered to this lane (ordered by /// message nonce). @@ -246,7 +246,7 @@ impl InboundLaneData { } /// Outbound message details, returned by runtime APIs. -#[derive(Clone, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, PartialEq, Eq, TypeInfo)] pub struct OutboundMessageDetails { /// Nonce assigned to the message. pub nonce: MessageNonce, @@ -260,7 +260,7 @@ pub struct OutboundMessageDetails { } /// Inbound message details, returned by runtime APIs. -#[derive(Clone, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, PartialEq, Eq, TypeInfo)] pub struct InboundMessageDetails { /// Computed message dispatch weight. /// @@ -275,7 +275,7 @@ pub struct InboundMessageDetails { /// /// This struct represents a continuous range of messages that have been delivered by the same /// relayer and whose confirmations are still pending. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub struct UnrewardedRelayer { /// Identifier of the relayer. pub relayer: RelayerId, @@ -284,7 +284,7 @@ pub struct UnrewardedRelayer { } /// Received messages with their dispatch result. -#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(Clone, Default, Encode, Decode, Debug, PartialEq, Eq, TypeInfo)] pub struct ReceivedMessages { /// Id of the lane which is receiving messages. pub lane: LaneId, @@ -324,7 +324,7 @@ pub enum ReceptionResult { } /// Delivered messages with their dispatch result. -#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Default, Encode, Decode, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub struct DeliveredMessages { /// Nonce of the first message that has been delivered (inclusive). pub begin: MessageNonce, @@ -356,7 +356,7 @@ impl DeliveredMessages { } /// Gist of `InboundLaneData::relayers` field used by runtime APIs. -#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(Clone, Default, Encode, Decode, Debug, PartialEq, Eq, TypeInfo)] pub struct UnrewardedRelayersState { /// Number of entries in the `InboundLaneData::relayers` set. pub unrewarded_relayer_entries: MessageNonce, @@ -395,7 +395,7 @@ impl From<&InboundLaneData> for UnrewardedRelayersState { } /// Outbound lane data. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub struct OutboundLaneData { /// Nonce of the oldest message that we haven't yet pruned. May point to not-yet-generated /// message if all sent messages are already pruned. diff --git a/bridges/primitives/messages/src/source_chain.rs b/bridges/primitives/messages/src/source_chain.rs index f4aefd973558..7b511154e3f3 100644 --- a/bridges/primitives/messages/src/source_chain.rs +++ b/bridges/primitives/messages/src/source_chain.rs @@ -112,7 +112,7 @@ impl OnMessagesDelivered for () { } /// Send message artifacts. -#[derive(Eq, RuntimeDebug, PartialEq)] +#[derive(Eq, Debug, PartialEq)] pub struct SendMessageArtifacts { /// Nonce of the message. pub nonce: MessageNonce, diff --git a/bridges/primitives/messages/src/target_chain.rs b/bridges/primitives/messages/src/target_chain.rs index 388ce16ccdc0..580916e859cb 100644 --- a/bridges/primitives/messages/src/target_chain.rs +++ b/bridges/primitives/messages/src/target_chain.rs @@ -31,7 +31,7 @@ use sp_std::{collections::btree_map::BTreeMap, fmt::Debug, marker::PhantomData, pub type ProvedMessages = BTreeMap>; /// Proved messages from single lane of the source chain. -#[derive(RuntimeDebug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] +#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub struct ProvedLaneMessages { /// Optional outbound lane state. pub lane_state: Option, @@ -40,14 +40,14 @@ pub struct ProvedLaneMessages { } /// Message data with decoded dispatch payload. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct DispatchMessageData { /// Result of dispatch payload decoding. pub payload: Result, } /// Message with decoded dispatch payload. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct DispatchMessage { /// Message key. pub key: MessageKey, diff --git a/bridges/primitives/parachains/src/lib.rs b/bridges/primitives/parachains/src/lib.rs index 142c6e9b0892..d34b038ba351 100644 --- a/bridges/primitives/parachains/src/lib.rs +++ b/bridges/primitives/parachains/src/lib.rs @@ -37,7 +37,7 @@ use sp_runtime::{traits::Header as HeaderT, RuntimeDebug}; use sp_std::{marker::PhantomData, prelude::*}; /// Best known parachain head hash. -#[derive(Clone, Decode, Encode, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Decode, Encode, MaxEncodedLen, PartialEq, Debug, TypeInfo)] pub struct BestParaHeadHash { /// Number of relay block where this head has been read. /// @@ -53,7 +53,7 @@ pub struct BestParaHeadHash { } /// Best known parachain head as it is stored in the runtime storage. -#[derive(Decode, Encode, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Decode, Encode, MaxEncodedLen, PartialEq, Debug, TypeInfo)] pub struct ParaInfo { /// Best known parachain head hash. pub best_head_hash: BestParaHeadHash, @@ -102,7 +102,7 @@ impl StorageDoubleMapKeyProvider for ImportedParaHeadsKeyProvider { /// /// We do not know exact structure of the parachain head, so we always store encoded version /// of the `bp_runtime::StoredHeaderData`. It is only decoded when we talk about specific parachain. -#[derive(Clone, Decode, Encode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Decode, Encode, PartialEq, Debug, TypeInfo)] pub struct ParaStoredHeaderData(pub Vec); impl ParaStoredHeaderData { diff --git a/bridges/primitives/polkadot-core/src/parachains.rs b/bridges/primitives/polkadot-core/src/parachains.rs index 433cd2845abd..5a1d0f1e7d54 100644 --- a/bridges/primitives/polkadot-core/src/parachains.rs +++ b/bridges/primitives/polkadot-core/src/parachains.rs @@ -52,7 +52,7 @@ use parity_util_mem::MallocSizeOf; Ord, PartialEq, PartialOrd, - RuntimeDebug, + Debug, TypeInfo, )] pub struct ParaId(pub u32); @@ -68,9 +68,7 @@ impl From for ParaId { /// This is an equivalent of the `polkadot_parachain_primitives::HeadData`. /// /// The parachain head means (at least in Cumulus) a SCALE-encoded parachain header. -#[derive( - PartialEq, Eq, Clone, PartialOrd, Ord, Encode, Decode, RuntimeDebug, TypeInfo, Default, -)] +#[derive(PartialEq, Eq, Clone, PartialOrd, Ord, Encode, Decode, Debug, TypeInfo, Default)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf))] pub struct ParaHead(pub Vec); @@ -88,7 +86,7 @@ pub type ParaHash = crate::Hash; pub type ParaHasher = crate::Hasher; /// Raw storage proof of parachain heads, stored in polkadot-like chain runtime. -#[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Decode, Encode, Eq, PartialEq, Debug, TypeInfo)] pub struct ParaHeadsProof { /// Unverified storage proof of finalized parachain heads. pub storage_proof: RawStorageProof, diff --git a/bridges/primitives/runtime/src/lib.rs b/bridges/primitives/runtime/src/lib.rs index c9c5c9412913..61154e548efc 100644 --- a/bridges/primitives/runtime/src/lib.rs +++ b/bridges/primitives/runtime/src/lib.rs @@ -64,7 +64,7 @@ pub const NO_INSTANCE_ID: ChainId = [0, 0, 0, 0]; /// Generic header Id. #[derive( - RuntimeDebug, + Debug, Default, Clone, Encode, diff --git a/bridges/primitives/runtime/src/messages.rs b/bridges/primitives/runtime/src/messages.rs index 0f219e984f72..5889041ca738 100644 --- a/bridges/primitives/runtime/src/messages.rs +++ b/bridges/primitives/runtime/src/messages.rs @@ -22,7 +22,7 @@ use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; /// Message dispatch result. -#[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)] +#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, TypeInfo)] pub struct MessageDispatchResult { /// Unspent dispatch weight. This weight that will be deducted from total delivery transaction /// weight, thus reducing the transaction cost. This shall not be zero in (at least) two cases: diff --git a/bridges/primitives/runtime/src/storage_types.rs b/bridges/primitives/runtime/src/storage_types.rs index 91c5451805a9..7b13392cc959 100644 --- a/bridges/primitives/runtime/src/storage_types.rs +++ b/bridges/primitives/runtime/src/storage_types.rs @@ -24,7 +24,7 @@ use sp_runtime::RuntimeDebug; use sp_std::{marker::PhantomData, ops::Deref}; /// Error that is returned when the value size exceeds maximal configured size. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct MaximalSizeExceededError { /// Size of the value. pub value_size: usize, diff --git a/bridges/primitives/test-utils/src/keyring.rs b/bridges/primitives/test-utils/src/keyring.rs index 22691183acf7..680bad29ca5c 100644 --- a/bridges/primitives/test-utils/src/keyring.rs +++ b/bridges/primitives/test-utils/src/keyring.rs @@ -38,7 +38,7 @@ pub const EVE: Account = Account(4); pub const FERDIE: Account = Account(5); /// A test account which can be used to sign messages. -#[derive(RuntimeDebug, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct Account(pub u16); impl Account { diff --git a/bridges/primitives/xcm-bridge-hub-router/src/lib.rs b/bridges/primitives/xcm-bridge-hub-router/src/lib.rs index dbedb7a52c7f..29e9924bd3ec 100644 --- a/bridges/primitives/xcm-bridge-hub-router/src/lib.rs +++ b/bridges/primitives/xcm-bridge-hub-router/src/lib.rs @@ -42,7 +42,7 @@ impl XcmChannelStatusProvider for () { } /// Current status of the bridge. -#[derive(Clone, Decode, Encode, Eq, PartialEq, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Clone, Decode, Encode, Eq, PartialEq, TypeInfo, MaxEncodedLen, Debug)] pub struct BridgeState { /// Current delivery fee factor. pub delivery_fee_factor: FixedU128, diff --git a/bridges/snowbridge/pallets/inbound-queue/src/envelope.rs b/bridges/snowbridge/pallets/inbound-queue/src/envelope.rs index 826d535c2cb9..a98023a1e881 100644 --- a/bridges/snowbridge/pallets/inbound-queue/src/envelope.rs +++ b/bridges/snowbridge/pallets/inbound-queue/src/envelope.rs @@ -13,7 +13,7 @@ sol! { } /// An inbound message that has had its outer envelope decoded. -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct Envelope { /// The address of the outbound queue on Ethereum that emitted this message as an event log pub gateway: H160, @@ -27,7 +27,7 @@ pub struct Envelope { pub payload: Vec, } -#[derive(Copy, Clone, RuntimeDebug)] +#[derive(Copy, Clone, Debug)] pub struct EnvelopeDecodeError; impl TryFrom<&Log> for Envelope { diff --git a/bridges/snowbridge/pallets/outbound-queue/merkle-tree/src/lib.rs b/bridges/snowbridge/pallets/outbound-queue/merkle-tree/src/lib.rs index 8c91ccd04d9a..662be06ed9db 100644 --- a/bridges/snowbridge/pallets/outbound-queue/merkle-tree/src/lib.rs +++ b/bridges/snowbridge/pallets/outbound-queue/merkle-tree/src/lib.rs @@ -73,7 +73,7 @@ where /// A generated merkle proof. /// /// The structure contains all necessary data to later on verify the proof and the leaf itself. -#[derive(Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, TypeInfo)] pub struct MerkleProof { /// Root hash of generated merkle tree. pub root: H256, diff --git a/bridges/snowbridge/pallets/outbound-queue/src/send_message_impl.rs b/bridges/snowbridge/pallets/outbound-queue/src/send_message_impl.rs index 03be61819973..8bde029cf0b0 100644 --- a/bridges/snowbridge/pallets/outbound-queue/src/send_message_impl.rs +++ b/bridges/snowbridge/pallets/outbound-queue/src/send_message_impl.rs @@ -24,7 +24,7 @@ use sp_runtime::BoundedVec; pub type MaxEnqueuedMessageSizeOf = <::MessageQueue as EnqueueMessage>::MaxMessageLen; -#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound)] +#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, Debug)] pub struct Ticket where T: Config, diff --git a/bridges/snowbridge/pallets/outbound-queue/src/types.rs b/bridges/snowbridge/pallets/outbound-queue/src/types.rs index f65a15d3d2f9..a75c8009ac35 100644 --- a/bridges/snowbridge/pallets/outbound-queue/src/types.rs +++ b/bridges/snowbridge/pallets/outbound-queue/src/types.rs @@ -18,7 +18,7 @@ pub type ProcessMessageOriginOf = as ProcessMessage>::Origin; pub const LOG_TARGET: &str = "snowbridge-outbound-queue"; /// Message which has been assigned a nonce and will be committed at the end of a block -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub struct CommittedMessage { /// Message channel pub channel_id: ChannelId, diff --git a/bridges/snowbridge/primitives/beacon/src/types.rs b/bridges/snowbridge/primitives/beacon/src/types.rs index e12350510c9b..5c89ec6bc283 100644 --- a/bridges/snowbridge/primitives/beacon/src/types.rs +++ b/bridges/snowbridge/primitives/beacon/src/types.rs @@ -29,7 +29,7 @@ use milagro_bls::PublicKey as PublicKeyPrepared; pub type ValidatorIndex = u64; pub type ForkVersion = [u8; 4]; -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct ForkVersions { pub genesis: Fork, pub altair: Fork, @@ -38,13 +38,13 @@ pub struct ForkVersions { pub deneb: Fork, } -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct Fork { pub version: [u8; 4], pub epoch: u64, } -#[derive(Copy, Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct PublicKey(pub [u8; PUBKEY_SIZE]); impl Default for PublicKey { @@ -85,7 +85,7 @@ impl Serialize for PublicKey { } } -#[derive(Copy, Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct Signature(pub [u8; SIGNATURE_SIZE]); impl Default for Signature { @@ -116,7 +116,7 @@ pub struct FinalizedHeaderState { pub beacon_slot: u64, } -#[derive(Clone, Default, Encode, Decode, PartialEq, RuntimeDebug)] +#[derive(Clone, Default, Encode, Decode, PartialEq, Debug)] pub struct ForkData { // 1 or 0 bit, indicates whether a sync committee participated in a vote pub current_version: [u8; 4], @@ -129,7 +129,7 @@ impl ForkData { } } -#[derive(Clone, Default, Encode, Decode, PartialEq, RuntimeDebug)] +#[derive(Clone, Default, Encode, Decode, PartialEq, Debug)] pub struct SigningData { pub object_root: H256, pub domain: H256, @@ -142,9 +142,7 @@ impl SigningData { } /// Sync committee as it is stored in the runtime storage. -#[derive( - Encode, Decode, PartialEqNoBound, CloneNoBound, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, PartialEqNoBound, CloneNoBound, Debug, TypeInfo, MaxEncodedLen)] #[cfg_attr( feature = "std", derive(Serialize, Deserialize), @@ -214,9 +212,7 @@ impl TryFrom<&SyncCommittee> /// Beacon block header as it is stored in the runtime storage. The block root is the /// Merkleization of a BeaconHeader. -#[derive( - Copy, Clone, Default, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen, -)] +#[derive(Copy, Clone, Default, Encode, Decode, PartialEq, Debug, TypeInfo, MaxEncodedLen)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct BeaconHeader { // The slot for which this block is created. Must be greater than the slot of the block defined @@ -238,7 +234,7 @@ impl BeaconHeader { } } -#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo)] +#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(Deserialize), @@ -302,9 +298,7 @@ impl /// ExecutionPayloadHeader /// -#[derive( - Default, Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, -)] +#[derive(Default, Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(Serialize, Deserialize), @@ -339,15 +333,7 @@ impl ExecutionPayloadHeader { } #[derive( - Default, - Encode, - Decode, - Copy, - Clone, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, - MaxEncodedLen, + Default, Encode, Decode, Copy, Clone, PartialEqNoBound, Debug, TypeInfo, MaxEncodedLen, )] pub struct CompactBeaconState { #[codec(compact)] @@ -410,7 +396,7 @@ impl VersionedExecutionPayloadHeader { } } -#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo)] +#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(serde::Deserialize), @@ -427,7 +413,7 @@ pub struct ExecutionProof { pub execution_branch: Vec, } -#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo)] +#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(serde::Deserialize), diff --git a/bridges/snowbridge/primitives/beacon/src/updates.rs b/bridges/snowbridge/primitives/beacon/src/updates.rs index ca651b5806f2..89b5261c1ca1 100644 --- a/bridges/snowbridge/primitives/beacon/src/updates.rs +++ b/bridges/snowbridge/primitives/beacon/src/updates.rs @@ -8,7 +8,7 @@ use sp_std::prelude::*; use crate::types::{BeaconHeader, SyncAggregate, SyncCommittee}; -#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo)] +#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(serde::Serialize, serde::Deserialize), @@ -23,9 +23,7 @@ pub struct CheckpointUpdate { pub block_roots_branch: Vec, } -#[derive( - Default, Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, -)] +#[derive(Default, Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(serde::Deserialize), @@ -53,9 +51,7 @@ pub struct Update pub block_roots_branch: Vec, } -#[derive( - Default, Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, -)] +#[derive(Default, Encode, Decode, CloneNoBound, PartialEqNoBound, Debug, TypeInfo)] #[cfg_attr( feature = "std", derive(serde::Deserialize), diff --git a/bridges/snowbridge/primitives/core/src/inbound.rs b/bridges/snowbridge/primitives/core/src/inbound.rs index 9e8ed789ab50..559a84f36930 100644 --- a/bridges/snowbridge/primitives/core/src/inbound.rs +++ b/bridges/snowbridge/primitives/core/src/inbound.rs @@ -33,7 +33,7 @@ pub enum VerificationError { pub type MessageNonce = u64; /// A bridge message from the Gateway contract on Ethereum -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct Message { /// Event log emitted by Gateway contract pub event_log: Log, @@ -49,7 +49,7 @@ pub enum LogValidationError { } /// Event log -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct Log { pub address: H160, pub topics: Vec, @@ -66,7 +66,7 @@ impl Log { } /// Inclusion proof for a transaction receipt -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct Proof { // Proof keys and values (receipts tree) pub receipt_proof: (Vec>, Vec>), @@ -74,7 +74,7 @@ pub struct Proof { pub execution_proof: ExecutionProof, } -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct InboundQueueFixture { pub message: Message, pub finalized_header: BeaconHeader, diff --git a/bridges/snowbridge/primitives/core/src/lib.rs b/bridges/snowbridge/primitives/core/src/lib.rs index ed1af4225d24..1ecfcfc80b8b 100644 --- a/bridges/snowbridge/primitives/core/src/lib.rs +++ b/bridges/snowbridge/primitives/core/src/lib.rs @@ -66,9 +66,7 @@ pub fn eth(x: u128) -> U256 { pub const ROC: u128 = 1_000_000_000_000; /// Identifier for a message channel -#[derive( - Clone, Copy, Encode, Decode, PartialEq, Eq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo, -)] +#[derive(Clone, Copy, Encode, Decode, PartialEq, Eq, Default, Debug, MaxEncodedLen, TypeInfo)] pub struct ChannelId([u8; 32]); /// Deterministically derive a ChannelId for a sibling parachain @@ -126,7 +124,7 @@ impl AsRef<[u8]> for ChannelId { } } -#[derive(Clone, Encode, Decode, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, MaxEncodedLen, TypeInfo)] pub struct Channel { /// ID of the agent contract deployed on Ethereum pub agent_id: AgentId, diff --git a/bridges/snowbridge/primitives/core/src/outbound.rs b/bridges/snowbridge/primitives/core/src/outbound.rs index 0ba0fdb61089..8a502d5d3e05 100644 --- a/bridges/snowbridge/primitives/core/src/outbound.rs +++ b/bridges/snowbridge/primitives/core/src/outbound.rs @@ -276,7 +276,7 @@ mod v1 { } } -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] /// Fee for delivering message pub struct Fee diff --git a/bridges/snowbridge/primitives/core/src/pricing.rs b/bridges/snowbridge/primitives/core/src/pricing.rs index 0f392c7ad4bd..41babd65dd0b 100644 --- a/bridges/snowbridge/primitives/core/src/pricing.rs +++ b/bridges/snowbridge/primitives/core/src/pricing.rs @@ -5,7 +5,7 @@ use sp_core::U256; use sp_runtime::{FixedU128, RuntimeDebug}; use sp_std::prelude::*; -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub struct PricingParameters { /// ETH/DOT exchange rate pub exchange_rate: FixedU128, @@ -17,7 +17,7 @@ pub struct PricingParameters { pub multiplier: FixedU128, } -#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub struct Rewards { /// Local reward in DOT pub local: Balance, @@ -25,7 +25,7 @@ pub struct Rewards { pub remote: U256, } -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct InvalidPricingParameters; impl PricingParameters @@ -53,7 +53,7 @@ where } /// Holder for fixed point number implemented in -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct UD60x18(U256); diff --git a/bridges/snowbridge/primitives/ethereum/src/header.rs b/bridges/snowbridge/primitives/ethereum/src/header.rs index f0b51f8c79de..66827a3f2d6b 100644 --- a/bridges/snowbridge/primitives/ethereum/src/header.rs +++ b/bridges/snowbridge/primitives/ethereum/src/header.rs @@ -21,7 +21,7 @@ use ethereum_types::{Address, H256, H64, U256}; use crate::{mpt, receipt}; /// Complete block header id. -#[derive(Clone, Copy, Default, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Copy, Default, Encode, Decode, PartialEq, Debug, TypeInfo)] pub struct HeaderId { /// Header number. pub number: u64, @@ -33,7 +33,7 @@ const EMPTY_OMMERS_HASH: [u8; 32] = hex!("1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"); /// An Ethereum block header. -#[derive(Clone, Default, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Default, Encode, Decode, PartialEq, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct Header { /// Parent block hash. diff --git a/bridges/snowbridge/primitives/ethereum/src/receipt.rs b/bridges/snowbridge/primitives/ethereum/src/receipt.rs index 665a93dbb1e2..90cb77cd0b02 100644 --- a/bridges/snowbridge/primitives/ethereum/src/receipt.rs +++ b/bridges/snowbridge/primitives/ethereum/src/receipt.rs @@ -5,7 +5,7 @@ use codec::{Decode, Encode}; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; -#[derive(Clone, Default, Encode, Decode, PartialEq, RuntimeDebug)] +#[derive(Clone, Default, Encode, Decode, PartialEq, Debug)] pub struct Receipt { pub post_state_or_status: Vec, pub cumulative_gas_used: u64, diff --git a/bridges/snowbridge/primitives/router/src/inbound/mod.rs b/bridges/snowbridge/primitives/router/src/inbound/mod.rs index c20554c6d184..ab533d937c4b 100644 --- a/bridges/snowbridge/primitives/router/src/inbound/mod.rs +++ b/bridges/snowbridge/primitives/router/src/inbound/mod.rs @@ -28,7 +28,7 @@ pub enum VersionedMessage { /// For V1, the ethereum side sends messages which are transcoded into XCM. These messages are /// self-contained, in that they can be transcoded using only information in the message. -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, Debug)] pub struct MessageV1 { /// EIP-155 chain id of the origin Ethereum network pub chain_id: u64, diff --git a/cumulus/pallets/dmp-queue/src/migration.rs b/cumulus/pallets/dmp-queue/src/migration.rs index 349635cce547..4541223e1d03 100644 --- a/cumulus/pallets/dmp-queue/src/migration.rs +++ b/cumulus/pallets/dmp-queue/src/migration.rs @@ -24,7 +24,7 @@ use sp_std::vec::Vec; pub(crate) const LOG: &str = "runtime::dmp-queue-export-xcms"; /// The old `PageIndexData` struct. -#[derive(Copy, Clone, Eq, PartialEq, Default, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Eq, PartialEq, Default, Encode, Decode, Debug, TypeInfo)] pub struct PageIndexData { /// The lowest used page index. pub begin_used: PageCounter, diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 54a1def59600..a41b41095bd9 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1664,7 +1664,7 @@ pub trait OnSystemEvent { } /// Holds the most recent relay-parent state root and block number of the current parachain block. -#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Default, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Default, Debug)] pub struct RelayChainState { /// Current relay chain height. pub number: relay_chain::BlockNumber, diff --git a/cumulus/pallets/parachain-system/src/unincluded_segment.rs b/cumulus/pallets/parachain-system/src/unincluded_segment.rs index 1e83a945c4ee..00e855832915 100644 --- a/cumulus/pallets/parachain-system/src/unincluded_segment.rs +++ b/cumulus/pallets/parachain-system/src/unincluded_segment.rs @@ -28,7 +28,7 @@ use sp_runtime::RuntimeDebug; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; /// Constraints on outbound HRMP channel. -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct HrmpOutboundLimits { /// The maximum bytes that can be written to the channel. pub bytes_remaining: u32, @@ -37,7 +37,7 @@ pub struct HrmpOutboundLimits { } /// Limits on outbound message bandwidth. -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct OutboundBandwidthLimits { /// The amount of UMP messages remaining. pub ump_messages_remaining: u32, @@ -126,7 +126,7 @@ pub enum BandwidthUpdateError { } /// The number of messages and size in bytes submitted to HRMP channel. -#[derive(RuntimeDebug, Default, Copy, Clone, Encode, Decode, TypeInfo)] +#[derive(Debug, Default, Copy, Clone, Encode, Decode, TypeInfo)] pub struct HrmpChannelUpdate { /// The amount of messages submitted to the channel. pub msg_count: u32, @@ -185,7 +185,7 @@ impl HrmpChannelUpdate { /// /// This struct can be created with pub items, however, it should /// never hit the storage directly to avoid bypassing limitations checks. -#[derive(Default, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Default, Clone, Encode, Decode, TypeInfo, Debug)] pub struct UsedBandwidth { /// The amount of UMP messages sent. pub ump_msg_count: u32, @@ -246,7 +246,7 @@ impl UsedBandwidth { /// Ancestor of the block being currently executed, not yet included /// into the relay chain. -#[derive(Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Encode, Decode, TypeInfo, Debug)] pub struct Ancestor { /// Bandwidth used by this block. used_bandwidth: UsedBandwidth, @@ -312,7 +312,7 @@ impl HrmpWatermarkUpdate { /// Struct that keeps track of bandwidth used by the unincluded part of the chain /// along with the latest HRMP watermark. -#[derive(Default, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Default, Encode, Decode, TypeInfo, Debug)] pub struct SegmentTracker { /// Bandwidth used by the segment. used_bandwidth: UsedBandwidth, diff --git a/cumulus/pallets/xcmp-queue/src/lib.rs b/cumulus/pallets/xcmp-queue/src/lib.rs index 7de2fd809421..aa453efe4f2c 100644 --- a/cumulus/pallets/xcmp-queue/src/lib.rs +++ b/cumulus/pallets/xcmp-queue/src/lib.rs @@ -375,7 +375,7 @@ impl OutboundChannelDetails { } } -#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub struct QueueConfigData { /// The number of pages which must be in the queue for the other side to be told to suspend /// their sending. diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs index 5551b05e2025..04d1cfa4ad56 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs @@ -105,7 +105,7 @@ impl pallet_bridge_grandpa::Config for Runt } /// BridgeHubRococo chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct BridgeHubRococo; impl UnderlyingChainProvider for BridgeHubRococo { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs index 94b936889b77..033c22a67820 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs @@ -158,7 +158,7 @@ pub type ToRococoBulletinMaximalOutboundPayloadSize = messages::source::FromThisChainMaximalOutboundPayloadSize; /// RococoBulletin chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct RococoBulletin; impl UnderlyingChainProvider for RococoBulletin { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs index 1681ac7f4687..fe494e25b146 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs @@ -167,7 +167,7 @@ pub type ToBridgeHubWestendMaximalOutboundPayloadSize = messages::source::FromThisChainMaximalOutboundPayloadSize; /// BridgeHubWestend chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct BridgeHubWestend; impl UnderlyingChainProvider for BridgeHubWestend { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs index 425b53da30fc..d8123d167009 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs @@ -172,7 +172,7 @@ type ToBridgeHubRococoMaximalOutboundPayloadSize = messages::source::FromThisChainMaximalOutboundPayloadSize; /// BridgeHubRococo chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct BridgeHubRococo; impl UnderlyingChainProvider for BridgeHubRococo { @@ -182,7 +182,7 @@ impl UnderlyingChainProvider for BridgeHubRococo { impl messages::BridgedChainWithMessages for BridgeHubRococo {} /// BridgeHubWestend chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct BridgeHubWestend; impl UnderlyingChainProvider for BridgeHubWestend { diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/people.rs b/cumulus/parachains/runtimes/people/people-rococo/src/people.rs index 88a89711019d..73039d32d8c0 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/people.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/people.rs @@ -83,14 +83,7 @@ pub enum IdentityField { /// Information concerning the identity of the controller of an account. #[derive( - CloneNoBound, - Encode, - Decode, - EqNoBound, - MaxEncodedLen, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + CloneNoBound, Encode, Decode, EqNoBound, MaxEncodedLen, PartialEqNoBound, Debug, TypeInfo, )] #[codec(mel_bound())] pub struct IdentityInfo { diff --git a/cumulus/parachains/runtimes/people/people-westend/src/people.rs b/cumulus/parachains/runtimes/people/people-westend/src/people.rs index a5c0e66a3f88..9b27a17f2937 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/people.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/people.rs @@ -83,14 +83,7 @@ pub enum IdentityField { /// Information concerning the identity of the controller of an account. #[derive( - CloneNoBound, - Encode, - Decode, - EqNoBound, - MaxEncodedLen, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + CloneNoBound, Encode, Decode, EqNoBound, MaxEncodedLen, PartialEqNoBound, Debug, TypeInfo, )] #[codec(mel_bound())] pub struct IdentityInfo { diff --git a/polkadot/parachain/src/primitives.rs b/polkadot/parachain/src/primitives.rs index 5a1efdf89821..a9de939e743d 100644 --- a/polkadot/parachain/src/primitives.rs +++ b/polkadot/parachain/src/primitives.rs @@ -41,7 +41,7 @@ pub use polkadot_core_primitives::BlockNumber as RelayChainBlockNumber; Ord, Encode, Decode, - RuntimeDebug, + Debug, derive_more::From, TypeInfo, Serialize, @@ -59,16 +59,7 @@ impl HeadData { /// Parachain validation code. #[derive( - PartialEq, - Eq, - Clone, - Encode, - Decode, - RuntimeDebug, - derive_more::From, - TypeInfo, - Serialize, - Deserialize, + PartialEq, Eq, Clone, Encode, Decode, Debug, derive_more::From, TypeInfo, Serialize, Deserialize, )] #[cfg_attr(feature = "std", derive(Hash))] pub struct ValidationCode(#[serde(with = "bytes")] pub Vec); @@ -128,7 +119,7 @@ impl sp_std::fmt::LowerHex for ValidationCodeHash { /// Parachain block data. /// /// Contains everything required to validate para-block, may contain block and witness data. -#[derive(PartialEq, Eq, Clone, Encode, Decode, derive_more::From, TypeInfo, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, derive_more::From, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); @@ -146,7 +137,7 @@ pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec Ord, PartialEq, PartialOrd, - RuntimeDebug, + Debug, serde::Serialize, serde::Deserialize, TypeInfo, @@ -241,9 +232,7 @@ impl sp_std::ops::Sub for Id { } } -#[derive( - Clone, Copy, Default, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, TypeInfo, -)] +#[derive(Clone, Copy, Default, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo)] pub struct Sibling(pub Id); impl From for Sibling { @@ -293,7 +282,7 @@ impl IsSystem for Sibling { /// Only one channel is allowed between two participants in one direction, i.e. there cannot be 2 /// different channels identified by `(A, B)`. A channel with the same para id in sender and /// recipient is invalid. That is, however, not enforced. -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(Hash))] pub struct HrmpChannelId { /// The para that acts as the sender in this channel. diff --git a/polkadot/primitives/src/v7/async_backing.rs b/polkadot/primitives/src/v7/async_backing.rs index 1abe87b6dec4..6a0d95b46449 100644 --- a/polkadot/primitives/src/v7/async_backing.rs +++ b/polkadot/primitives/src/v7/async_backing.rs @@ -24,15 +24,7 @@ use scale_info::TypeInfo; /// Candidate's acceptance limitations for asynchronous backing per relay parent. #[derive( - RuntimeDebug, - Copy, - Clone, - PartialEq, - Encode, - Decode, - TypeInfo, - serde::Serialize, - serde::Deserialize, + Debug, Copy, Clone, PartialEq, Encode, Decode, TypeInfo, serde::Serialize, serde::Deserialize, )] pub struct AsyncBackingParams { @@ -50,7 +42,7 @@ pub struct AsyncBackingParams { } /// Constraints on inbound HRMP channels. -#[derive(RuntimeDebug, Clone, PartialEq, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, PartialEq, Encode, Decode, TypeInfo)] pub struct InboundHrmpLimitations { /// An exhaustive set of all valid watermarks, sorted ascending. /// @@ -60,7 +52,7 @@ pub struct InboundHrmpLimitations { } /// Constraints on outbound HRMP channels. -#[derive(RuntimeDebug, Clone, PartialEq, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, PartialEq, Encode, Decode, TypeInfo)] pub struct OutboundHrmpChannelLimitations { /// The maximum bytes that can be written to the channel. pub bytes_remaining: u32, @@ -71,7 +63,7 @@ pub struct OutboundHrmpChannelLimitations { /// Constraints on the actions that can be taken by a new parachain /// block. These limitations are implicitly associated with some particular /// parachain, which should be apparent from usage. -#[derive(RuntimeDebug, Clone, PartialEq, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, PartialEq, Encode, Decode, TypeInfo)] pub struct Constraints { /// The minimum relay-parent number accepted under these constraints. pub min_relay_parent_number: N, @@ -105,7 +97,7 @@ pub struct Constraints { } /// A candidate pending availability. -#[derive(RuntimeDebug, Clone, PartialEq, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, PartialEq, Encode, Decode, TypeInfo)] pub struct CandidatePendingAvailability { /// The hash of the candidate. pub candidate_hash: CandidateHash, @@ -121,7 +113,7 @@ pub struct CandidatePendingAvailability { /// The per-parachain state of the backing system, including /// state-machine constraints and candidates pending availability. -#[derive(RuntimeDebug, Clone, PartialEq, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, PartialEq, Encode, Decode, TypeInfo)] pub struct BackingState { /// The state-machine constraints of the parachain. pub constraints: Constraints, diff --git a/polkadot/primitives/src/v7/mod.rs b/polkadot/primitives/src/v7/mod.rs index 8a059408496c..877aba26d0c1 100644 --- a/polkadot/primitives/src/v7/mod.rs +++ b/polkadot/primitives/src/v7/mod.rs @@ -113,7 +113,7 @@ pub trait TypeIndex { /// Index of the validator is used as a lightweight replacement of the `ValidatorId` when /// appropriate. -#[derive(Eq, Ord, PartialEq, PartialOrd, Copy, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Eq, Ord, PartialEq, PartialOrd, Copy, Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash))] pub struct ValidatorIndex(pub u32); @@ -477,7 +477,7 @@ fn check_collator_signature>( } /// A unique descriptor of the candidate receipt. -#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Hash))] pub struct CandidateDescriptor { /// The ID of the para this is a candidate for. @@ -519,7 +519,7 @@ impl> CandidateDescriptor { } /// A candidate-receipt. -#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Debug)] pub struct CandidateReceipt { /// The descriptor of the candidate. pub descriptor: CandidateDescriptor, @@ -543,7 +543,7 @@ impl CandidateReceipt { } /// A candidate-receipt with commitments directly included. -#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Hash))] pub struct CommittedCandidateReceipt { /// The descriptor of the candidate. @@ -626,7 +626,7 @@ impl Ord for CommittedCandidateReceipt { /// The `PersistedValidationData` should be relatively lightweight primarily because it is /// constructed during inclusion for each candidate and therefore lies on the critical path of /// inclusion. -#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Default))] pub struct PersistedValidationData { /// The parent head-data. @@ -647,7 +647,7 @@ impl PersistedValidationData { } /// Commitments made in a `CandidateReceipt`. Many of these are outputs of validation. -#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Default, Hash))] pub struct CandidateCommitments { /// Messages destined to be interpreted by the Relay chain itself. @@ -675,7 +675,7 @@ impl CandidateCommitments { /// A bitfield concerning availability of backed candidates. /// /// Every bit refers to an availability core index. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo)] pub struct AvailabilityBitfield(pub BitVec); impl From> for AvailabilityBitfield { @@ -701,7 +701,7 @@ pub type SignedAvailabilityBitfields = Vec; pub type UncheckedSignedAvailabilityBitfields = Vec; /// A backed (or backable, depending on context) candidate. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct BackedCandidate { /// The candidate referred to. candidate: CommittedCandidateReceipt, @@ -883,9 +883,7 @@ pub fn check_candidate_backing + Clone + Encode + core::fmt::Debu } /// The unique (during session) index of a core. -#[derive( - Encode, Decode, Default, PartialOrd, Ord, Eq, PartialEq, Clone, Copy, TypeInfo, RuntimeDebug, -)] +#[derive(Encode, Decode, Default, PartialOrd, Ord, Eq, PartialEq, Clone, Copy, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Hash))] pub struct CoreIndex(pub u32); @@ -919,11 +917,11 @@ impl TypeIndex for GroupIndex { } /// A claim on authoring the next block for a given parathread (on-demand parachain). -#[derive(Clone, Encode, Decode, TypeInfo, PartialEq, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, PartialEq, Debug)] pub struct ParathreadClaim(pub Id, pub Option); /// An entry tracking a claim to ensure it does not pass the maximum number of retries. -#[derive(Clone, Encode, Decode, TypeInfo, PartialEq, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, PartialEq, Debug)] pub struct ParathreadEntry { /// The claim. pub claim: ParathreadClaim, @@ -932,7 +930,7 @@ pub struct ParathreadEntry { } /// A helper data-type for tracking validator-group rotations. -#[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct GroupRotationInfo { /// The block number where the session started. @@ -1020,7 +1018,7 @@ impl GroupRotationInfo { } /// Information about a core which is currently occupied. -#[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct OccupiedCore { // NOTE: this has no ParaId as it can be deduced from the candidate descriptor. @@ -1055,7 +1053,7 @@ impl OccupiedCore { } /// Information about a core which is currently occupied. -#[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[derive(Clone, Encode, Decode, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct ScheduledCore { /// The ID of a para scheduled. @@ -1144,7 +1142,7 @@ pub enum CandidateEvent { } /// Scraped runtime backing votes and resolved disputes. -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct ScrapedOnChainVotes { /// The session in which the block was included. @@ -1160,7 +1158,7 @@ pub struct ScrapedOnChainVotes { } /// A vote of approval on a candidate. -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct ApprovalVote(pub CandidateHash); impl ApprovalVote { @@ -1173,7 +1171,7 @@ impl ApprovalVote { } /// A vote of approval for multiple candidates. -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct ApprovalVoteMultipleCandidates<'a>(pub &'a [CandidateHash]); impl<'a> ApprovalVoteMultipleCandidates<'a> { @@ -1194,15 +1192,7 @@ impl<'a> ApprovalVoteMultipleCandidates<'a> { /// Approval voting configuration parameters #[derive( - RuntimeDebug, - Copy, - Clone, - PartialEq, - Encode, - Decode, - TypeInfo, - serde::Serialize, - serde::Deserialize, + Debug, Copy, Clone, PartialEq, Encode, Decode, TypeInfo, serde::Serialize, serde::Deserialize, )] pub struct ApprovalVotingParams { /// The maximum number of candidates `approval-voting` can vote for with @@ -1239,7 +1229,7 @@ impl From for u8 { /// Abridged version of `HostConfiguration` (from the `Configuration` parachains host runtime /// module) meant to be used by a parachain or PDK such as cumulus. -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct AbridgedHostConfiguration { /// The maximum validation code size, in bytes. @@ -1274,7 +1264,7 @@ pub struct AbridgedHostConfiguration { /// Abridged version of `HrmpChannel` (from the `Hrmp` parachains host runtime module) meant to be /// used by a parachain or PDK such as cumulus. -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct AbridgedHrmpChannel { /// The maximum number of messages that can be pending in the channel at once. @@ -1520,7 +1510,7 @@ pub enum InvalidDisputeStatementKind { } /// An explicit statement on a candidate issued as part of a dispute. -#[derive(Clone, PartialEq, RuntimeDebug)] +#[derive(Clone, PartialEq, Debug)] pub struct ExplicitDisputeStatement { /// Whether the candidate is valid pub valid: bool, @@ -1540,7 +1530,7 @@ impl ExplicitDisputeStatement { } /// A set of statements about a specific candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub struct DisputeStatementSet { /// The candidate referenced by this set. pub candidate_hash: CandidateHash, @@ -1566,7 +1556,7 @@ impl AsRef for DisputeStatementSet { pub type MultiDisputeStatementSet = Vec; /// A _checked_ set of dispute statements. -#[derive(Clone, PartialEq, RuntimeDebug, Encode)] +#[derive(Clone, PartialEq, Debug, Encode)] pub struct CheckedDisputeStatementSet(DisputeStatementSet); impl AsRef for CheckedDisputeStatementSet { @@ -1593,7 +1583,7 @@ impl CheckedDisputeStatementSet { pub type CheckedMultiDisputeStatementSet = Vec; /// The entire state of a dispute. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, TypeInfo)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, TypeInfo)] pub struct DisputeState { /// A bitfield indicating all validators for the candidate. pub validators_for: BitVec, // one bit per validator. @@ -1606,7 +1596,7 @@ pub struct DisputeState { } /// Parachains inherent-data passed into the runtime by a block author -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub struct InherentData { /// Signed bitfields by validators about availability. pub bitfields: UncheckedSignedAvailabilityBitfields, @@ -1670,7 +1660,7 @@ impl ValidityAttestation { } /// A type returned by runtime with current session index and a parent hash. -#[derive(Clone, Eq, PartialEq, Default, Decode, Encode, RuntimeDebug)] +#[derive(Clone, Eq, PartialEq, Default, Decode, Encode, Debug)] pub struct SigningContext { /// Current session index. pub session_index: sp_staking::SessionIndex, @@ -1753,7 +1743,7 @@ impl parity_scale_codec::Decode for CompactStatement { } /// `IndexedVec` struct indexed by type specific indices. -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct IndexedVec(Vec, PhantomData K>); @@ -1843,7 +1833,7 @@ pub fn effective_minimum_backing_votes( /// /// NOTE: `SessionInfo` is frozen. Do not include new fields, consider creating a separate runtime /// API. Reasoning and further outlook [here](https://github.com/paritytech/polkadot/issues/6586). -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct SessionInfo { /****** New in v2 ****** */ @@ -1903,7 +1893,7 @@ pub struct SessionInfo { /// A statement from the specified validator whether the given validation code passes PVF /// pre-checking or not anchored to the given session index. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Debug, TypeInfo)] pub struct PvfCheckStatement { /// `true` if the subject passed pre-checking and `false` otherwise. pub accept: bool, diff --git a/polkadot/primitives/src/v7/signed.rs b/polkadot/primitives/src/v7/signed.rs index 96646d54cbba..da42ba585ed0 100644 --- a/polkadot/primitives/src/v7/signed.rs +++ b/polkadot/primitives/src/v7/signed.rs @@ -36,7 +36,7 @@ use super::{SigningContext, ValidatorId, ValidatorIndex, ValidatorSignature}; /// /// `Signed` can easily be converted into `UncheckedSigned` and conversion back via `into_signed` /// enforces a valid signature again. -#[derive(Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Signed(UncheckedSigned); impl Signed { @@ -47,7 +47,7 @@ impl Signed { } /// Unchecked signed data, can be converted to `Signed` by checking the signature. -#[derive(Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, TypeInfo)] pub struct UncheckedSigned { /// The payload is part of the signed data. The rest is the signing context, /// which is known both at signing and at validation. diff --git a/polkadot/primitives/src/vstaging/mod.rs b/polkadot/primitives/src/vstaging/mod.rs index 1af73993f640..7b25b8e2dfd9 100644 --- a/polkadot/primitives/src/vstaging/mod.rs +++ b/polkadot/primitives/src/vstaging/mod.rs @@ -27,15 +27,7 @@ use sp_arithmetic::Perbill; /// Scheduler configuration parameters. All coretime/ondemand parameters are here. #[derive( - RuntimeDebug, - Copy, - Clone, - PartialEq, - Encode, - Decode, - TypeInfo, - serde::Serialize, - serde::Deserialize, + Debug, Copy, Clone, PartialEq, Encode, Decode, TypeInfo, serde::Serialize, serde::Deserialize, )] pub struct SchedulerParams { /// How often parachain groups should be rotated across parachains. diff --git a/polkadot/runtime/common/src/assigned_slots/mod.rs b/polkadot/runtime/common/src/assigned_slots/mod.rs index 9b24b99cfbe2..c7bdac73d1c6 100644 --- a/polkadot/runtime/common/src/assigned_slots/mod.rs +++ b/polkadot/runtime/common/src/assigned_slots/mod.rs @@ -53,7 +53,7 @@ pub enum SlotLeasePeriodStart { } /// Information about a temporary parachain slot. -#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, MaxEncodedLen, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, MaxEncodedLen, Debug, TypeInfo)] pub struct ParachainTemporarySlot { /// Manager account of the para. pub manager: AccountId, diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index 8407c7f0dda9..9ed2894e417c 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -107,7 +107,7 @@ impl Default for StatementKind { /// An Ethereum address (i.e. 20 bytes, used to represent an Ethereum account). /// /// This gets serialized to the 0x-prefixed hex representation. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default, RuntimeDebug, TypeInfo)] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default, Debug, TypeInfo)] pub struct EthereumAddress([u8; 20]); impl Serialize for EthereumAddress { diff --git a/polkadot/runtime/common/src/crowdloan/mod.rs b/polkadot/runtime/common/src/crowdloan/mod.rs index 477530467fa1..de7f1e497f8c 100644 --- a/polkadot/runtime/common/src/crowdloan/mod.rs +++ b/polkadot/runtime/common/src/crowdloan/mod.rs @@ -137,7 +137,7 @@ pub enum LastContribution { /// Information on a funding effort for a pre-existing parachain. We assume that the parachain ID /// is known as it's used for the key of the storage item for which this is the value (`Funds`). -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] #[codec(dumb_trait_bound)] pub struct FundInfo { /// The owning account who placed the deposit. diff --git a/polkadot/runtime/common/src/paras_registrar/mod.rs b/polkadot/runtime/common/src/paras_registrar/mod.rs index a49ebab3e26a..33019aeb315a 100644 --- a/polkadot/runtime/common/src/paras_registrar/mod.rs +++ b/polkadot/runtime/common/src/paras_registrar/mod.rs @@ -44,7 +44,7 @@ use sp_runtime::{ RuntimeDebug, }; -#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, Debug, TypeInfo)] pub struct ParaInfo { /// The account that has placed a deposit for registering this para. pub(crate) manager: Account, diff --git a/polkadot/runtime/common/src/purchase.rs b/polkadot/runtime/common/src/purchase.rs index b90bbb3a7cfb..6ea14cc2f46b 100644 --- a/polkadot/runtime/common/src/purchase.rs +++ b/polkadot/runtime/common/src/purchase.rs @@ -71,7 +71,7 @@ impl AccountValidity { } /// All information about an account regarding the purchase of DOTs. -#[derive(Encode, Decode, Default, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Default, Clone, Eq, PartialEq, Debug, TypeInfo)] pub struct AccountStatus { /// The current validity status of the user. Will denote if the user has passed KYC, /// how much they are able to purchase, and when their purchase process has completed. diff --git a/polkadot/runtime/parachains/src/assigner_coretime/mod.rs b/polkadot/runtime/parachains/src/assigner_coretime/mod.rs index 1e821dd86846..bbcebbee7613 100644 --- a/polkadot/runtime/parachains/src/assigner_coretime/mod.rs +++ b/polkadot/runtime/parachains/src/assigner_coretime/mod.rs @@ -45,7 +45,7 @@ use sp_std::prelude::*; pub use pallet::*; /// Fraction expressed as a nominator with an assumed denominator of 57,600. -#[derive(RuntimeDebug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, TypeInfo)] pub struct PartsOf57600(u16); impl PartsOf57600 { diff --git a/polkadot/runtime/parachains/src/disputes.rs b/polkadot/runtime/parachains/src/disputes.rs index 62e02e67157d..06359cd5264b 100644 --- a/polkadot/runtime/parachains/src/disputes.rs +++ b/polkadot/runtime/parachains/src/disputes.rs @@ -604,7 +604,7 @@ impl From for Error { } /// A transport statement bit change for a single validator. -#[derive(RuntimeDebug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq)] struct ImportUndo { /// The validator index to which to associate the statement import. validator_index: ValidatorIndex, diff --git a/polkadot/runtime/parachains/src/paras/mod.rs b/polkadot/runtime/parachains/src/paras/mod.rs index 36a693bcc8e2..e28f9d072751 100644 --- a/polkadot/runtime/parachains/src/paras/mod.rs +++ b/polkadot/runtime/parachains/src/paras/mod.rs @@ -289,7 +289,7 @@ impl ParaPastCodeMeta { } /// Arguments for initializing a para. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Serialize, Deserialize)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo, Serialize, Deserialize)] pub struct ParaGenesisArgs { /// The initial head data to use. pub genesis_head: HeadData, diff --git a/polkadot/runtime/parachains/src/paras_inherent/mod.rs b/polkadot/runtime/parachains/src/paras_inherent/mod.rs index ac4cf5dc8d41..2c5ab3dc701f 100644 --- a/polkadot/runtime/parachains/src/paras_inherent/mod.rs +++ b/polkadot/runtime/parachains/src/paras_inherent/mod.rs @@ -82,7 +82,7 @@ const LOG_TARGET: &str = "runtime::inclusion-inherent"; /// A bitfield concerning concluded disputes for candidates /// associated to the core index equivalent to the bit position. -#[derive(Default, PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Default, PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo)] pub(crate) struct DisputedBitfield(pub(crate) BitVec); impl From> for DisputedBitfield { diff --git a/polkadot/runtime/parachains/src/scheduler/migration.rs b/polkadot/runtime/parachains/src/scheduler/migration.rs index 5482c8821e58..b6804fb07ab7 100644 --- a/polkadot/runtime/parachains/src/scheduler/migration.rs +++ b/polkadot/runtime/parachains/src/scheduler/migration.rs @@ -26,7 +26,7 @@ use frame_support::{ /// /// `Assignment` used to be a concrete type with the same layout V0Assignment, identical on all /// assignment providers. This can be removed once storage has been migrated. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Clone)] +#[derive(Encode, Decode, Debug, TypeInfo, PartialEq, Clone)] struct V0Assignment { pub para_id: ParaId, } diff --git a/polkadot/xcm/xcm-executor/src/assets.rs b/polkadot/xcm/xcm-executor/src/assets.rs index 4407752f7024..5685dd643f7a 100644 --- a/polkadot/xcm/xcm-executor/src/assets.rs +++ b/polkadot/xcm/xcm-executor/src/assets.rs @@ -29,7 +29,7 @@ use xcm::latest::{ }; /// Map of non-wildcard fungible and non-fungible assets held in the holding register. -#[derive(Default, Clone, RuntimeDebug, Eq, PartialEq)] +#[derive(Default, Clone, Debug, Eq, PartialEq)] pub struct AssetsInHolding { /// The fungible assets. pub fungible: BTreeMap, diff --git a/substrate/frame/alliance/src/types.rs b/substrate/frame/alliance/src/types.rs index 784993b2bc13..04b3ba2ad7d7 100644 --- a/substrate/frame/alliance/src/types.rs +++ b/substrate/frame/alliance/src/types.rs @@ -22,9 +22,7 @@ use sp_runtime::RuntimeDebug; use sp_std::{convert::TryInto, prelude::*}; /// A Multihash instance that only supports the basic functionality and no hashing. -#[derive( - Clone, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen, -)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct Multihash { /// The code of the Multihash. pub code: u64, @@ -63,9 +61,7 @@ pub enum Version { /// Representation of a CID. /// /// The generic is about the allocated size of the multihash. -#[derive( - Clone, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen, -)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct Cid { /// The version of CID. pub version: Version, @@ -95,9 +91,7 @@ impl Cid { } /// Witness data for the `disband` call. -#[derive( - Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo, Default, -)] +#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo, Default)] pub struct DisbandWitness { /// Total number of fellow members in the current Alliance. #[codec(compact)] diff --git a/substrate/frame/assets/src/types.rs b/substrate/frame/assets/src/types.rs index 11edc7d3fcb5..ae6ef2382b18 100644 --- a/substrate/frame/assets/src/types.rs +++ b/substrate/frame/assets/src/types.rs @@ -48,7 +48,7 @@ pub(super) enum AssetStatus { Destroying, } -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub struct AssetDetails { /// Can change `owner`, `issuer`, `freezer` and `admin` accounts. pub(super) owner: AccountId, @@ -78,7 +78,7 @@ pub struct AssetDetails { } /// Data concerning an approval. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, MaxEncodedLen, TypeInfo)] pub struct Approval { /// The amount of funds approved for the balance transfer from the owner to some delegated /// target. @@ -172,7 +172,7 @@ impl AccountStatus { } } -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub struct AssetAccount { /// The balance. pub(super) balance: Balance, @@ -184,7 +184,7 @@ pub struct AssetAccount { pub(super) extra: Extra, } -#[derive(Clone, Encode, Decode, Eq, PartialEq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Default, Debug, MaxEncodedLen, TypeInfo)] pub struct AssetMetadata { /// The balance deposited for this metadata. /// diff --git a/substrate/frame/atomic-swap/src/lib.rs b/substrate/frame/atomic-swap/src/lib.rs index dc0300dc1a5c..7d81a62f91a3 100644 --- a/substrate/frame/atomic-swap/src/lib.rs +++ b/substrate/frame/atomic-swap/src/lib.rs @@ -61,7 +61,7 @@ use sp_runtime::RuntimeDebug; use sp_std::vec::Vec; /// Pending atomic swap operation. -#[derive(Clone, Eq, PartialEq, RuntimeDebugNoBound, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] #[codec(mel_bound())] pub struct PendingSwap { @@ -96,7 +96,7 @@ pub trait SwapAction { } /// A swap action that only allows transferring balances. -#[derive(Clone, RuntimeDebug, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Debug, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(C))] #[codec(mel_bound())] pub struct BalanceSwapAction> { diff --git a/substrate/frame/balances/src/types.rs b/substrate/frame/balances/src/types.rs index 3e36a83575c8..9c7bdea19e5f 100644 --- a/substrate/frame/balances/src/types.rs +++ b/substrate/frame/balances/src/types.rs @@ -59,7 +59,7 @@ impl BitOr for Reasons { /// A single lock on a balance. There can be many of these on an account and they "overlap", so the /// same balance is frozen by multiple locks. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub struct BalanceLock { /// An identifier for this lock. Only one lock may be in existence for each identifier. pub id: LockIdentifier, @@ -70,7 +70,7 @@ pub struct BalanceLock { } /// Store named reserved balance. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub struct ReserveData { /// The identifier for the named reserve. pub id: ReserveIdentifier, @@ -79,7 +79,7 @@ pub struct ReserveData { } /// An identifier and balance. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub struct IdAmount { /// An identifier for this item. pub id: Id, @@ -88,7 +88,7 @@ pub struct IdAmount { } /// All balance information for an account. -#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, Debug, MaxEncodedLen, TypeInfo)] pub struct AccountData { /// Non-reserved part of the balance which the account holder may be able to control. /// @@ -110,7 +110,7 @@ pub struct AccountData { const IS_NEW_LOGIC: u128 = 0x80000000_00000000_00000000_00000000u128; -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub struct ExtraFlags(pub(crate) u128); impl Default for ExtraFlags { fn default() -> Self { diff --git a/substrate/frame/bounties/src/lib.rs b/substrate/frame/bounties/src/lib.rs index c099fc48b7a3..9fed49acf144 100644 --- a/substrate/frame/bounties/src/lib.rs +++ b/substrate/frame/bounties/src/lib.rs @@ -117,7 +117,7 @@ pub type BountyIndex = u32; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; /// A bounty proposal. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct Bounty { /// The account proposing it. proposer: AccountId, diff --git a/substrate/frame/broker/src/core_mask.rs b/substrate/frame/broker/src/core_mask.rs index b8d045077d82..8ea221067775 100644 --- a/substrate/frame/broker/src/core_mask.rs +++ b/substrate/frame/broker/src/core_mask.rs @@ -24,9 +24,7 @@ use sp_core::RuntimeDebug; pub const CORE_MASK_BITS: usize = 80; // TODO: Use BitArr instead; for this, we'll need to ensure Codec is impl'ed for `BitArr`. -#[derive( - Encode, Decode, Default, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct CoreMask([u8; 10]); impl CoreMask { pub fn void() -> Self { diff --git a/substrate/frame/broker/src/types.rs b/substrate/frame/broker/src/types.rs index f2cae9a41ad4..1c7b00ecd48c 100644 --- a/substrate/frame/broker/src/types.rs +++ b/substrate/frame/broker/src/types.rs @@ -51,7 +51,7 @@ pub enum Finality { } /// Self-describing identity for a Region of Bulk Coretime. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct RegionId { /// The timeslice at which this Region begins. pub begin: Timeslice, @@ -79,7 +79,7 @@ fn region_id_converts_u128() { } /// The rest of the information describing a Region. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct RegionRecord { /// The end of the Region. pub end: Timeslice, @@ -91,7 +91,7 @@ pub struct RegionRecord { pub type RegionRecordOf = RegionRecord<::AccountId, BalanceOf>; /// An distinct item which can be scheduled on a Polkadot Core. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct ScheduleItem { /// The regularity parts in which this Item will be scheduled on the Core. pub mask: CoreMask, @@ -102,7 +102,7 @@ pub type Schedule = BoundedVec /// The record body of a Region which was contributed to the Instantaneous Coretime Pool. This helps /// with making pro rata payments to contributors. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct ContributionRecord { /// The end of the Region contributed. pub length: Timeslice, @@ -113,7 +113,7 @@ pub type ContributionRecordOf = ContributionRecord<::AccountId> /// A per-timeslice bookkeeping record for tracking Instantaneous Coretime Pool activity and /// making proper payments to contributors. -#[derive(Encode, Decode, Clone, Default, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Default, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct InstaPoolHistoryRecord { /// The total amount of Coretime (measured in Core Mask Bits minus any contributions which have /// already been paid out. @@ -153,7 +153,7 @@ impl CompletionStatus { } /// The identity of a possible Core workload renewal. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct AllowedRenewalId { /// The core whose workload at the sale ending with `when` may be renewed to begin at `when`. pub core: CoreIndex, @@ -162,7 +162,7 @@ pub struct AllowedRenewalId { } /// A record of an allowed renewal. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct AllowedRenewalRecord { /// The price for which the next renewal can be made. pub price: Balance, @@ -173,7 +173,7 @@ pub struct AllowedRenewalRecord { pub type AllowedRenewalRecordOf = AllowedRenewalRecord>; /// General status of the system. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct StatusRecord { /// The total number of cores which can be assigned (one plus the maximum index which can /// be used in `Coretime::assign`). @@ -191,9 +191,7 @@ pub struct StatusRecord { } /// A record of flux in the InstaPool. -#[derive( - Encode, Decode, Clone, Copy, Default, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, Clone, Copy, Default, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct PoolIoRecord { /// The total change of the portion of the pool supplied by purchased Bulk Coretime, measured /// in Core Mask Bits. @@ -204,7 +202,7 @@ pub struct PoolIoRecord { } /// The status of a Bulk Coretime Sale. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct SaleInfoRecord { /// The local block number at which the sale will/did start. pub sale_start: BlockNumber, @@ -239,7 +237,7 @@ pub type ReservationsRecord = BoundedVec; pub type ReservationsRecordOf = ReservationsRecord<::MaxReservedCores>; /// Information on a single legacy lease. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct LeaseRecordItem { /// The timeslice until the lease is valid. pub until: Timeslice, @@ -252,7 +250,7 @@ pub type LeasesRecord = BoundedVec; pub type LeasesRecordOf = LeasesRecord<::MaxLeasedCores>; /// Configuration of this pallet. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct ConfigRecord { /// The number of Relay-chain blocks in advance which scheduling should be fixed and the /// `Coretime::assign` API used to inform the Relay-chain. diff --git a/substrate/frame/child-bounties/src/lib.rs b/substrate/frame/child-bounties/src/lib.rs index 1eedeaa5a1ae..2d4c6ef9e277 100644 --- a/substrate/frame/child-bounties/src/lib.rs +++ b/substrate/frame/child-bounties/src/lib.rs @@ -83,7 +83,7 @@ type BountyIndex = pallet_bounties::BountyIndex; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; /// A child bounty proposal. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct ChildBounty { /// The parent of this child-bounty. parent_bounty: BountyIndex, diff --git a/substrate/frame/collective/src/lib.rs b/substrate/frame/collective/src/lib.rs index d0009d02f68c..46bf55ab50d5 100644 --- a/substrate/frame/collective/src/lib.rs +++ b/substrate/frame/collective/src/lib.rs @@ -156,7 +156,7 @@ impl GetBacking for RawOrigin { } /// Info for keeping track of a motion being voted on. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo)] pub struct Votes { /// The proposal's unique index. index: ProposalIndex, diff --git a/substrate/frame/contracts/src/migration/v10.rs b/substrate/frame/contracts/src/migration/v10.rs index 61632a1fd1ba..f164a2a63c1a 100644 --- a/substrate/frame/contracts/src/migration/v10.rs +++ b/substrate/frame/contracts/src/migration/v10.rs @@ -98,7 +98,7 @@ pub fn store_old_contract_info( v9::ContractInfoOf::::insert(account, info); } -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct DepositAccount(AccountIdOf); @@ -110,7 +110,7 @@ impl Deref for DepositAccount { } } -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T, OldCurrency))] pub struct ContractInfo where diff --git a/substrate/frame/contracts/src/migration/v13.rs b/substrate/frame/contracts/src/migration/v13.rs index 6929bbce28e5..547134a267f7 100644 --- a/substrate/frame/contracts/src/migration/v13.rs +++ b/substrate/frame/contracts/src/migration/v13.rs @@ -76,7 +76,7 @@ pub fn store_old_contract_info(account: T::AccountId, info: crate::Co pub type ContractInfoOf = StorageMap, Twox64Concat, ::AccountId, ContractInfo>; -#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { trie_id: TrieId, diff --git a/substrate/frame/contracts/src/migration/v15.rs b/substrate/frame/contracts/src/migration/v15.rs index 3c700d1c0b02..0d1615dce6c8 100644 --- a/substrate/frame/contracts/src/migration/v15.rs +++ b/substrate/frame/contracts/src/migration/v15.rs @@ -96,7 +96,7 @@ pub fn store_old_contract_info(account: T::AccountId, info: crate::Co v14::ContractInfoOf::::insert(account, info); } -#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] struct ContractInfo { pub trie_id: TrieId, diff --git a/substrate/frame/contracts/src/migration/v16.rs b/substrate/frame/contracts/src/migration/v16.rs index 74fbc997718d..a80b70f2dec8 100644 --- a/substrate/frame/contracts/src/migration/v16.rs +++ b/substrate/frame/contracts/src/migration/v16.rs @@ -55,7 +55,7 @@ pub fn store_old_contract_info( pub type ContractInfoOf = StorageMap, Twox64Concat, ::AccountId, ContractInfo>; -#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { trie_id: TrieId, diff --git a/substrate/frame/contracts/src/primitives.rs b/substrate/frame/contracts/src/primitives.rs index ab73b28e8c49..590a331ea505 100644 --- a/substrate/frame/contracts/src/primitives.rs +++ b/substrate/frame/contracts/src/primitives.rs @@ -37,7 +37,7 @@ use sp_std::prelude::*; /// It has been extended to include `events` at the end of the struct while not bumping the /// `ContractsApi` version. Therefore when SCALE decoding a `ContractResult` its trailing data /// should be ignored to avoid any potential compatibility issues. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub struct ContractResult { /// How much weight was consumed during execution. pub gas_consumed: Weight, @@ -108,7 +108,7 @@ pub enum ContractAccessError { } /// Output of a contract call or instantiation which ran to completion. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct ExecReturnValue { /// Flags passed along by `seal_return`. Empty when `seal_return` was never called. pub flags: ReturnFlags, @@ -124,7 +124,7 @@ impl ExecReturnValue { } /// The result of a successful contract instantiation. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct InstantiateReturnValue { /// The output of the called constructor. pub result: ExecReturnValue, @@ -133,7 +133,7 @@ pub struct InstantiateReturnValue { } /// The result of successfully uploading a contract. -#[derive(Clone, PartialEq, Eq, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, MaxEncodedLen, Debug, TypeInfo)] pub struct CodeUploadReturnValue { /// The key under which the new code is stored. pub code_hash: CodeHash, diff --git a/substrate/frame/contracts/src/storage.rs b/substrate/frame/contracts/src/storage.rs index 1e9739a1599e..082b404cad7a 100644 --- a/substrate/frame/contracts/src/storage.rs +++ b/substrate/frame/contracts/src/storage.rs @@ -44,7 +44,7 @@ use self::meter::Diff; /// Information for managing an account and its sub trie abstraction. /// This is the required info to cache for an account. -#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { /// Unique ID for the subtree encoded as a bytes vector. diff --git a/substrate/frame/contracts/src/storage/meter.rs b/substrate/frame/contracts/src/storage/meter.rs index 5db9a772ad82..f029ab1a014c 100644 --- a/substrate/frame/contracts/src/storage/meter.rs +++ b/substrate/frame/contracts/src/storage/meter.rs @@ -115,7 +115,7 @@ impl State for Root {} impl State for Nested {} /// A type that allows the metering of consumed or freed storage of a single contract call stack. -#[derive(DefaultNoBound, RuntimeDebugNoBound)] +#[derive(DefaultNoBound, Debug)] pub struct RawMeter { /// The limit of how much balance this meter is allowed to consume. limit: BalanceOf, @@ -135,7 +135,7 @@ pub struct RawMeter { } /// This type is used to describe a storage change when charging from the meter. -#[derive(Default, RuntimeDebugNoBound)] +#[derive(Default, Debug)] pub struct Diff { /// How many bytes were added to storage. pub bytes_added: u32, @@ -238,7 +238,7 @@ pub enum ContractState { /// The only exception is when a special (tougher) deposit limit is specified for a cross-contract /// call. In that case the limit is enforced once the call is returned, rolling it back if /// exhausted. -#[derive(RuntimeDebugNoBound, Clone)] +#[derive(Debug, Clone)] struct Charge { contract: T::AccountId, amount: DepositOf, diff --git a/substrate/frame/contracts/src/wasm/runtime.rs b/substrate/frame/contracts/src/wasm/runtime.rs index 52ceda99edb7..c8926e02cb2e 100644 --- a/substrate/frame/contracts/src/wasm/runtime.rs +++ b/substrate/frame/contracts/src/wasm/runtime.rs @@ -106,7 +106,7 @@ impl From for ReturnErrorCode { } /// The data passed through when a contract uses `seal_return`. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct ReturnData { /// The flags as passed through by the contract. They are still unchecked and /// will later be parsed into a `ReturnFlags` bitflags struct. diff --git a/substrate/frame/conviction-voting/src/types.rs b/substrate/frame/conviction-voting/src/types.rs index 2c45b54485bd..47e6d9fcfaab 100644 --- a/substrate/frame/conviction-voting/src/types.rs +++ b/substrate/frame/conviction-voting/src/types.rs @@ -33,14 +33,7 @@ use crate::{AccountVote, Conviction, Vote}; /// Info regarding an ongoing referendum. #[derive( - CloneNoBound, - PartialEqNoBound, - EqNoBound, - RuntimeDebugNoBound, - TypeInfo, - Encode, - Decode, - MaxEncodedLen, + CloneNoBound, PartialEqNoBound, EqNoBound, Debug, TypeInfo, Encode, Decode, MaxEncodedLen, )] #[scale_info(skip_type_params(Total))] #[codec(mel_bound(Votes: MaxEncodedLen))] @@ -217,9 +210,7 @@ impl< } /// Amount of votes and capital placed in delegation for an account. -#[derive( - Encode, Decode, Default, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct Delegations { /// The number of votes (this is post-conviction). pub votes: Balance, diff --git a/substrate/frame/conviction-voting/src/vote.rs b/substrate/frame/conviction-voting/src/vote.rs index 5ae08f0de65f..024ee7373cc0 100644 --- a/substrate/frame/conviction-voting/src/vote.rs +++ b/substrate/frame/conviction-voting/src/vote.rs @@ -28,7 +28,7 @@ use sp_runtime::{ use sp_std::prelude::*; /// A number of lock periods, plus a vote, one way or the other. -#[derive(Copy, Clone, Eq, PartialEq, Default, RuntimeDebug, MaxEncodedLen)] +#[derive(Copy, Clone, Eq, PartialEq, Default, Debug, MaxEncodedLen)] pub struct Vote { pub aye: bool, pub conviction: Conviction, @@ -124,7 +124,7 @@ impl AccountVote { PartialEq, Ord, PartialOrd, - RuntimeDebug, + Debug, TypeInfo, MaxEncodedLen, )] @@ -150,7 +150,7 @@ impl PriorLock { /// The amount of balance delegated. pub balance: Balance, @@ -166,7 +166,7 @@ pub struct Delegating { } /// Information concerning the direct vote-casting of some voting power. -#[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, BlockNumber: MaxEncodedLen, PollIndex: MaxEncodedLen))] pub struct Casting diff --git a/substrate/frame/core-fellowship/src/lib.rs b/substrate/frame/core-fellowship/src/lib.rs index afb188261fd4..31724e4ae3af 100644 --- a/substrate/frame/core-fellowship/src/lib.rs +++ b/substrate/frame/core-fellowship/src/lib.rs @@ -100,7 +100,7 @@ pub enum Wish { pub type Evidence = BoundedVec>::EvidenceSize>; /// The status of the pallet instance. -#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, Debug)] pub struct ParamsType { /// The amounts to be paid when a member of a given rank (-1) is active. active_salary: [Balance; RANKS], @@ -129,7 +129,7 @@ impl D } /// The status of a single member. -#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, Debug)] pub struct MemberStatus { /// Are they currently active? is_active: bool, diff --git a/substrate/frame/democracy/src/types.rs b/substrate/frame/democracy/src/types.rs index ee6e2e0aa253..86a764736e5f 100644 --- a/substrate/frame/democracy/src/types.rs +++ b/substrate/frame/democracy/src/types.rs @@ -32,7 +32,7 @@ pub type PropIndex = u32; pub type ReferendumIndex = u32; /// Info regarding an ongoing referendum. -#[derive(Encode, MaxEncodedLen, Decode, Default, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, MaxEncodedLen, Decode, Default, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Tally { /// The number of aye votes, expressed in terms of post-conviction lock-vote. pub ayes: Balance, @@ -43,9 +43,7 @@ pub struct Tally { } /// Amount of votes and capital placed in delegation for an account. -#[derive( - Encode, MaxEncodedLen, Decode, Default, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, -)] +#[derive(Encode, MaxEncodedLen, Decode, Default, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Delegations { /// The number of votes (this is post-conviction). pub votes: Balance, @@ -168,7 +166,7 @@ impl< } /// Info regarding an ongoing referendum. -#[derive(Encode, MaxEncodedLen, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, MaxEncodedLen, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct ReferendumStatus { /// When voting on this referendum will end. pub end: BlockNumber, diff --git a/substrate/frame/democracy/src/vote.rs b/substrate/frame/democracy/src/vote.rs index b3fe9aa28e1a..9d59e25bca38 100644 --- a/substrate/frame/democracy/src/vote.rs +++ b/substrate/frame/democracy/src/vote.rs @@ -28,7 +28,7 @@ use sp_runtime::{ use sp_std::prelude::*; /// A number of lock periods, plus a vote, one way or the other. -#[derive(Copy, Clone, Eq, PartialEq, Default, RuntimeDebug)] +#[derive(Copy, Clone, Eq, PartialEq, Default, Debug)] pub struct Vote { pub aye: bool, pub conviction: Conviction, @@ -124,7 +124,7 @@ impl AccountVote { PartialEq, Ord, PartialOrd, - RuntimeDebug, + Debug, TypeInfo, )] pub struct PriorLock(BlockNumber, Balance); diff --git a/substrate/frame/election-provider-multi-phase/src/lib.rs b/substrate/frame/election-provider-multi-phase/src/lib.rs index 63b4c49cdfe4..97f85188bf3f 100644 --- a/substrate/frame/election-provider-multi-phase/src/lib.rs +++ b/substrate/frame/election-provider-multi-phase/src/lib.rs @@ -403,7 +403,7 @@ impl Default for ElectionCompute { /// /// Such a solution should never become effective in anyway before being checked by the /// `Pallet::feasibility_check`. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, PartialOrd, Ord, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, PartialOrd, Ord, TypeInfo)] pub struct RawSolution { /// the solution itself. pub solution: S, @@ -422,14 +422,7 @@ impl Default for RawSolution { /// A checked solution, ready to be enacted. #[derive( - PartialEqNoBound, - EqNoBound, - Clone, - Encode, - Decode, - RuntimeDebug, - DefaultNoBound, - scale_info::TypeInfo, + PartialEqNoBound, EqNoBound, Clone, Encode, Decode, Debug, DefaultNoBound, scale_info::TypeInfo, )] #[scale_info(skip_type_params(AccountId, MaxWinners))] pub struct ReadySolution @@ -454,7 +447,7 @@ where /// [`ElectionDataProvider`] and are kept around until the round is finished. /// /// These are stored together because they are often accessed together. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, Default, TypeInfo)] #[scale_info(skip_type_params(T))] pub struct RoundSnapshot { /// All of the voters. diff --git a/substrate/frame/election-provider-multi-phase/src/signed.rs b/substrate/frame/election-provider-multi-phase/src/signed.rs index ae830ed0382d..e56dae0cfced 100644 --- a/substrate/frame/election-provider-multi-phase/src/signed.rs +++ b/substrate/frame/election-provider-multi-phase/src/signed.rs @@ -46,7 +46,7 @@ use sp_std::{ /// A raw, unchecked signed submission. /// /// This is just a wrapper around [`RawSolution`] and some additional info. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, scale_info::TypeInfo)] pub struct SignedSubmission { /// Who submitted this solution. pub who: AccountId, diff --git a/substrate/frame/election-provider-support/src/lib.rs b/substrate/frame/election-provider-support/src/lib.rs index 2e9ee3b8a48b..df1d208e8b4b 100644 --- a/substrate/frame/election-provider-support/src/lib.rs +++ b/substrate/frame/election-provider-support/src/lib.rs @@ -237,7 +237,7 @@ mod tests; /// The voter and target identifiers have already been replaced with appropriate indices, /// making it fast to repeatedly encode into a `SolutionOf`. This property turns out /// to be important when trimming for solution length. -#[derive(RuntimeDebug, Clone, Default)] +#[derive(Debug, Clone, Default)] #[cfg_attr(feature = "std", derive(PartialEq, Eq, Encode, Decode))] pub struct IndexAssignment { /// Index of the voter among the voters list. diff --git a/substrate/frame/elections-phragmen/src/lib.rs b/substrate/frame/elections-phragmen/src/lib.rs index b4be07030efb..1d6a3a61315f 100644 --- a/substrate/frame/elections-phragmen/src/lib.rs +++ b/substrate/frame/elections-phragmen/src/lib.rs @@ -147,7 +147,7 @@ pub enum Renouncing { } /// An active voter. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, TypeInfo)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, TypeInfo)] pub struct Voter { /// The members being backed. pub votes: Vec, @@ -166,7 +166,7 @@ impl Default for Voter { } /// A holder of a seat as either a member or a runner-up. -#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, TypeInfo)] +#[derive(Encode, Decode, Clone, Default, Debug, PartialEq, TypeInfo)] pub struct SeatHolder { /// The holder. pub who: AccountId, diff --git a/substrate/frame/elections-phragmen/src/migrations/v3.rs b/substrate/frame/elections-phragmen/src/migrations/v3.rs index cdca1138ebbd..72789dd05148 100644 --- a/substrate/frame/elections-phragmen/src/migrations/v3.rs +++ b/substrate/frame/elections-phragmen/src/migrations/v3.rs @@ -26,14 +26,14 @@ use frame_support::{ use sp_runtime::RuntimeDebug; use sp_std::prelude::*; -#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq)] +#[derive(Encode, Decode, Clone, Default, Debug, PartialEq)] struct SeatHolder { who: AccountId, stake: Balance, deposit: Balance, } -#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq)] +#[derive(Encode, Decode, Clone, Default, Debug, PartialEq)] struct Voter { votes: Vec, stake: Balance, diff --git a/substrate/frame/examples/offchain-worker/src/lib.rs b/substrate/frame/examples/offchain-worker/src/lib.rs index 0a90e896188e..d825008f0df8 100644 --- a/substrate/frame/examples/offchain-worker/src/lib.rs +++ b/substrate/frame/examples/offchain-worker/src/lib.rs @@ -345,7 +345,7 @@ pub mod pallet { /// Payload used by this example crate to hold price /// data required to submit a transaction. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, scale_info::TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, scale_info::TypeInfo)] pub struct PricePayload { block_number: BlockNumber, price: u32, diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index 411537aa8c65..76e9f69965c1 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -163,9 +163,7 @@ use sp_runtime::RuntimeDebug; /// Example struct holding the most recently set [`u32`] and the /// second most recently set [`u32`] (if one existed). #[docify::export] -#[derive( - Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, -)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, scale_info::TypeInfo, MaxEncodedLen)] pub struct CurrentAndPreviousValue { /// The most recently set value. pub current: u32, diff --git a/substrate/frame/fast-unstake/src/types.rs b/substrate/frame/fast-unstake/src/types.rs index 3fb5720861fa..0fb30b5274ef 100644 --- a/substrate/frame/fast-unstake/src/types.rs +++ b/substrate/frame/fast-unstake/src/types.rs @@ -46,9 +46,7 @@ pub(crate) type BalanceOf = /// /// This is stored in [`crate::Head`] storage item and points to the current unstake request that is /// being processed. -#[derive( - Encode, Decode, EqNoBound, PartialEqNoBound, Clone, TypeInfo, RuntimeDebugNoBound, MaxEncodedLen, -)] +#[derive(Encode, Decode, EqNoBound, PartialEqNoBound, Clone, TypeInfo, Debug, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct UnstakeRequest { /// This list of stashes are being processed in this request, and their corresponding deposit. diff --git a/substrate/frame/identity/src/legacy.rs b/substrate/frame/identity/src/legacy.rs index 60e812c2238b..c33b4e1f96aa 100644 --- a/substrate/frame/identity/src/legacy.rs +++ b/substrate/frame/identity/src/legacy.rs @@ -65,14 +65,7 @@ impl TypeInfo for IdentityField { /// NOTE: This should be stored at the end of the storage item to facilitate the addition of extra /// fields in a backwards compatible way through a specialized `Decode` impl. #[derive( - CloneNoBound, - Encode, - Decode, - EqNoBound, - MaxEncodedLen, - PartialEqNoBound, - RuntimeDebugNoBound, - TypeInfo, + CloneNoBound, Encode, Decode, EqNoBound, MaxEncodedLen, PartialEqNoBound, Debug, TypeInfo, )] #[codec(mel_bound())] #[scale_info(skip_type_params(FieldLimit))] diff --git a/substrate/frame/identity/src/types.rs b/substrate/frame/identity/src/types.rs index 10f0db8c25d8..ed35160d41e8 100644 --- a/substrate/frame/identity/src/types.rs +++ b/substrate/frame/identity/src/types.rs @@ -253,9 +253,7 @@ pub trait IdentityInformationProvider: /// /// NOTE: This is stored separately primarily to facilitate the addition of extra fields in a /// backwards compatible way through a specialized `Decode` impl. -#[derive( - CloneNoBound, Encode, Eq, MaxEncodedLen, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, -)] +#[derive(CloneNoBound, Encode, Eq, MaxEncodedLen, PartialEqNoBound, Debug, TypeInfo)] #[codec(mel_bound())] #[scale_info(skip_type_params(MaxJudgements))] pub struct Registration< @@ -302,7 +300,7 @@ impl< } /// Information concerning a registrar. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub struct RegistrarInfo< Balance: Encode + Decode + Clone + Debug + Eq + PartialEq, AccountId: Encode + Decode + Clone + Debug + Eq + PartialEq, diff --git a/substrate/frame/im-online/src/lib.rs b/substrate/frame/im-online/src/lib.rs index 239b47834d1f..f6ec98e54bf1 100644 --- a/substrate/frame/im-online/src/lib.rs +++ b/substrate/frame/im-online/src/lib.rs @@ -156,7 +156,7 @@ const INCLUDE_THRESHOLD: u32 = 3; /// This stores the block number at which heartbeat was requested and when the worker /// has actually managed to produce it. /// Note we store such status for every `authority_index` separately. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)] struct HeartbeatStatus { /// An index of the session that we are supposed to send heartbeat for. pub session_index: SessionIndex, @@ -216,7 +216,7 @@ impl sp_std::fmt::Debug for OffchainErr where BlockNumber: PartialEq + Eq + Decode + Encode, @@ -813,7 +813,7 @@ impl OneSessionHandler for Pallet { } /// An offence that is filed if a validator didn't send a heartbeat message. -#[derive(RuntimeDebug, TypeInfo)] +#[derive(Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] pub struct UnresponsivenessOffence { /// The current session index in which we report the unresponsive validators. diff --git a/substrate/frame/lottery/src/lib.rs b/substrate/frame/lottery/src/lib.rs index 54a8edd38606..8331e9c1298e 100644 --- a/substrate/frame/lottery/src/lib.rs +++ b/substrate/frame/lottery/src/lib.rs @@ -78,9 +78,7 @@ type BalanceOf = // We use this to uniquely match someone's incoming call with the calls configured for the lottery. type CallIndex = (u8, u8); -#[derive( - Encode, Decode, Default, Eq, PartialEq, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, -)] +#[derive(Encode, Decode, Default, Eq, PartialEq, Debug, scale_info::TypeInfo, MaxEncodedLen)] pub struct LotteryConfig { /// Price per entry. price: Balance, diff --git a/substrate/frame/message-queue/src/lib.rs b/substrate/frame/message-queue/src/lib.rs index ef3420d21be5..ef17ce0c8459 100644 --- a/substrate/frame/message-queue/src/lib.rs +++ b/substrate/frame/message-queue/src/lib.rs @@ -241,9 +241,7 @@ pub struct ItemHeader { } /// A page of messages. Pages always contain at least one item. -#[derive( - CloneNoBound, Encode, Decode, RuntimeDebugNoBound, DefaultNoBound, TypeInfo, MaxEncodedLen, -)] +#[derive(CloneNoBound, Encode, Decode, Debug, DefaultNoBound, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(HeapSize))] #[codec(mel_bound(Size: MaxEncodedLen))] pub struct Page + Debug + Clone + Default, HeapSize: Get> { @@ -399,7 +397,7 @@ impl< } /// A single link in the double-linked Ready Ring list. -#[derive(Clone, Encode, Decode, MaxEncodedLen, TypeInfo, RuntimeDebug, PartialEq)] +#[derive(Clone, Encode, Decode, MaxEncodedLen, TypeInfo, Debug, PartialEq)] pub struct Neighbours { /// The previous queue. prev: MessageOrigin, @@ -412,7 +410,7 @@ pub struct Neighbours { /// Each queue has exactly one book which holds all of its pages. All pages of a book combined /// contain all of the messages of its queue; hence the name *Book*. /// Books can be chained together in a double-linked fashion through their `ready_neighbours` field. -#[derive(Clone, Encode, Decode, MaxEncodedLen, TypeInfo, RuntimeDebug)] +#[derive(Clone, Encode, Decode, MaxEncodedLen, TypeInfo, Debug)] pub struct BookState { /// The first page with some items to be processed in it. If this is `>= end`, then there are /// no pages with items to be processing in them. diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index c7a5b624157b..7f6f95f5c2b1 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -54,7 +54,7 @@ pub type AuthorityIndex = u32; /// Like [`Mixnode`], but encoded size is bounded. #[derive( - Clone, Decode, Encode, MaxEncodedLen, PartialEq, TypeInfo, RuntimeDebug, Serialize, Deserialize, + Clone, Decode, Encode, MaxEncodedLen, PartialEq, TypeInfo, Debug, Serialize, Deserialize, )] pub struct BoundedMixnode { /// Key-exchange public key for the mixnode. @@ -123,7 +123,7 @@ pub type BoundedMixnodeFor = BoundedMixnode< /// A mixnode registration. A registration transaction is formed from one of these plus an /// [`AuthoritySignature`]. -#[derive(Clone, Decode, Encode, PartialEq, TypeInfo, RuntimeDebug)] +#[derive(Clone, Decode, Encode, PartialEq, TypeInfo, Debug)] pub struct Registration { /// Block number at the time of creation. When a registration transaction fails to make it on /// to the chain for whatever reason, we send out another one. We want this one to have a diff --git a/substrate/frame/multisig/src/lib.rs b/substrate/frame/multisig/src/lib.rs index a83b78e316f5..2f5d14ff9f52 100644 --- a/substrate/frame/multisig/src/lib.rs +++ b/substrate/frame/multisig/src/lib.rs @@ -91,9 +91,7 @@ type BalanceOf = /// A global extrinsic index, formed as the extrinsic index within a block, together with that /// block's height. This allows a transaction in which a multisig operation of a particular /// composite was created to be uniquely identified. -#[derive( - Copy, Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen, -)] +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Default, Debug, TypeInfo, MaxEncodedLen)] pub struct Timepoint { /// The height of the chain at the point in time. height: BlockNumber, @@ -102,7 +100,7 @@ pub struct Timepoint { } /// An open multisig operation. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(MaxApprovals))] pub struct Multisig where diff --git a/substrate/frame/nfts/src/types.rs b/substrate/frame/nfts/src/types.rs index 5a9f6ae2f0e2..4865755e2e0e 100644 --- a/substrate/frame/nfts/src/types.rs +++ b/substrate/frame/nfts/src/types.rs @@ -88,7 +88,7 @@ pub(super) type PreSignedAttributesOf = PreSignedAttributes< >; /// Information about a collection. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct CollectionDetails { /// Collection's owner. pub(super) owner: AccountId, @@ -106,7 +106,7 @@ pub struct CollectionDetails { } /// Witness data for the destroy transactions. -#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct DestroyWitness { /// The total number of items in this collection that have outstanding item metadata. #[codec(compact)] @@ -130,7 +130,7 @@ impl CollectionDetails { } /// Witness data for items mint transactions. -#[derive(Clone, Encode, Decode, Default, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Default, Eq, PartialEq, Debug, TypeInfo)] pub struct MintWitness { /// Provide the id of the item in a required collection. pub owned_item: Option, @@ -139,7 +139,7 @@ pub struct MintWitness { } /// Information concerning the ownership of a single unique item. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] pub struct ItemDetails { /// The owner of this item. pub(super) owner: AccountId, @@ -151,7 +151,7 @@ pub struct ItemDetails { } /// Information about the reserved item deposit. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct ItemDeposit { /// A depositor account. pub(super) account: AccountId, @@ -160,7 +160,7 @@ pub struct ItemDeposit { } /// Information about the collection's metadata. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(StringLimit))] #[codec(mel_bound(Deposit: MaxEncodedLen))] pub struct CollectionMetadata> { @@ -175,7 +175,7 @@ pub struct CollectionMetadata> { } /// Information about the item's metadata. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(StringLimit))] pub struct ItemMetadata> { /// The balance deposited for this metadata. @@ -189,7 +189,7 @@ pub struct ItemMetadata> { } /// Information about the tip. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct ItemTip { /// The collection of the item. pub(super) collection: CollectionId, @@ -202,7 +202,7 @@ pub struct ItemTip { } /// Information about the pending swap. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] pub struct PendingSwap { /// The collection that contains the item that the user wants to receive. pub(super) desired_collection: CollectionId, @@ -215,7 +215,7 @@ pub struct PendingSwap { } /// Information about the reserved attribute deposit. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct AttributeDeposit { /// A depositor account. pub(super) account: Option, @@ -224,7 +224,7 @@ pub struct AttributeDeposit { } /// Information about the reserved item's metadata deposit. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct ItemMetadataDeposit { /// A depositor account, None means the deposit is collection's owner. pub(super) account: Option, @@ -242,7 +242,7 @@ pub enum PriceDirection { } /// Holds the details about the price. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct PriceWithDirection { /// An amount. pub(super) amount: Amount, @@ -268,7 +268,7 @@ pub enum CollectionSetting { } /// Wrapper type for `BitFlags` that implements `Codec`. -#[derive(Clone, Copy, PartialEq, Eq, Default, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] pub struct CollectionSettings(pub BitFlags); impl CollectionSettings { @@ -302,7 +302,7 @@ pub enum MintType { } /// Holds the information about minting. -#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct MintSettings { /// Whether anyone can mint or if minters are restricted to some subset. pub mint_type: MintType, @@ -344,7 +344,7 @@ pub enum AttributeNamespace { } /// A witness data to cancel attributes approval operation. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] pub struct CancelAttributesApprovalWitness { /// An amount of attributes previously created by account. pub account_attributes: u32, @@ -360,9 +360,7 @@ pub enum PalletAttributes { } /// Collection's configuration. -#[derive( - Clone, Copy, Decode, Default, Encode, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo, -)] +#[derive(Clone, Copy, Decode, Default, Encode, MaxEncodedLen, PartialEq, Debug, TypeInfo)] pub struct CollectionConfig { /// Collection's settings. pub settings: CollectionSettings, @@ -401,7 +399,7 @@ pub enum ItemSetting { } /// Wrapper type for `BitFlags` that implements `Codec`. -#[derive(Clone, Copy, PartialEq, Eq, Default, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] pub struct ItemSettings(pub BitFlags); impl ItemSettings { @@ -422,9 +420,7 @@ impl ItemSettings { impl_codec_bitflags!(ItemSettings, u64, ItemSetting); /// Item's configuration. -#[derive( - Encode, Decode, Default, PartialEq, RuntimeDebug, Clone, Copy, MaxEncodedLen, TypeInfo, -)] +#[derive(Encode, Decode, Default, PartialEq, Debug, Clone, Copy, MaxEncodedLen, TypeInfo)] pub struct ItemConfig { /// Item's settings. pub settings: ItemSettings, @@ -464,7 +460,7 @@ pub enum PalletFeature { } /// Wrapper type for `BitFlags` that implements `Codec`. -#[derive(Default, RuntimeDebug)] +#[derive(Default, Debug)] pub struct PalletFeatures(pub BitFlags); impl PalletFeatures { @@ -494,7 +490,7 @@ pub enum CollectionRole { } /// A wrapper type that implements `Codec`. -#[derive(Clone, Copy, PartialEq, Eq, Default, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] pub struct CollectionRoles(pub BitFlags); impl CollectionRoles { @@ -514,7 +510,7 @@ impl CollectionRoles { } impl_codec_bitflags!(CollectionRoles, u8, CollectionRole); -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub struct PreSignedMint { /// A collection of the item to be minted. pub(super) collection: CollectionId, @@ -532,7 +528,7 @@ pub struct PreSignedMint { pub(super) mint_price: Option, } -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub struct PreSignedAttributes { /// Collection's ID. pub(super) collection: CollectionId, diff --git a/substrate/frame/nomination-pools/src/lib.rs b/substrate/frame/nomination-pools/src/lib.rs index 0fdb7e3eff5c..a35e5aa71be0 100644 --- a/substrate/frame/nomination-pools/src/lib.rs +++ b/substrate/frame/nomination-pools/src/lib.rs @@ -483,13 +483,7 @@ impl ClaimPermission { /// A member in a pool. #[derive( - Encode, - Decode, - MaxEncodedLen, - TypeInfo, - RuntimeDebugNoBound, - CloneNoBound, - frame_support::PartialEqNoBound, + Encode, Decode, MaxEncodedLen, TypeInfo, Debug, CloneNoBound, frame_support::PartialEqNoBound, )] #[cfg_attr(feature = "std", derive(DefaultNoBound))] #[codec(mel_bound(T: Config))] @@ -929,7 +923,7 @@ pub struct BondedPoolInner { /// /// The main purpose of this is to wrap a [`BondedPoolInner`], with the account /// + id of the pool, for easier access. -#[derive(RuntimeDebugNoBound)] +#[derive(Debug)] #[cfg_attr(feature = "std", derive(Clone, PartialEq))] pub struct BondedPool { /// The identifier of the pool. @@ -1304,7 +1298,7 @@ impl BondedPool { /// A reward pool is not so much a pool anymore, since it does not contain any shares or points. /// Rather, simply to fit nicely next to bonded pool and unbonding pools in terms of terminology. In /// reality, a reward pool is just a container for a few pool-dependent data related to the rewards. -#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, RuntimeDebugNoBound)] +#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, Debug)] #[cfg_attr(feature = "std", derive(Clone, PartialEq, DefaultNoBound))] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] @@ -1464,7 +1458,7 @@ impl RewardPool { } /// An unbonding pool. This is always mapped with an era. -#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] +#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, Debug)] #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] @@ -1507,7 +1501,7 @@ impl UnbondPool { } } -#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] +#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, Debug)] #[cfg_attr(feature = "std", derive(Clone, PartialEq))] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] diff --git a/substrate/frame/proxy/src/lib.rs b/substrate/frame/proxy/src/lib.rs index 2b3fac5f59e4..a746b3773e17 100644 --- a/substrate/frame/proxy/src/lib.rs +++ b/substrate/frame/proxy/src/lib.rs @@ -60,17 +60,7 @@ type AccountIdLookupOf = <::Lookup as StaticLookup /// The parameters under which a particular account has a proxy relationship with some other /// account. #[derive( - Encode, - Decode, - Clone, - Copy, - Eq, - PartialEq, - Ord, - PartialOrd, - RuntimeDebug, - MaxEncodedLen, - TypeInfo, + Encode, Decode, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, MaxEncodedLen, TypeInfo, )] pub struct ProxyDefinition { /// The account which may act on behalf of another. @@ -83,7 +73,7 @@ pub struct ProxyDefinition { } /// Details surrounding a specific instance of an announcement to make a call. -#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, Debug, MaxEncodedLen, TypeInfo)] pub struct Announcement { /// The account which made the announcement. real: AccountId, diff --git a/substrate/frame/ranked-collective/src/lib.rs b/substrate/frame/ranked-collective/src/lib.rs index ceaf03de2110..7c93af94ecb7 100644 --- a/substrate/frame/ranked-collective/src/lib.rs +++ b/substrate/frame/ranked-collective/src/lib.rs @@ -81,14 +81,7 @@ pub type Votes = u32; /// Aggregated votes for an ongoing poll by members of the ranked collective. #[derive( - CloneNoBound, - PartialEqNoBound, - EqNoBound, - RuntimeDebugNoBound, - TypeInfo, - Encode, - Decode, - MaxEncodedLen, + CloneNoBound, PartialEqNoBound, EqNoBound, Debug, TypeInfo, Encode, Decode, MaxEncodedLen, )] #[scale_info(skip_type_params(T, I, M))] #[codec(mel_bound())] @@ -173,7 +166,7 @@ impl, I: 'static, M: GetMaxVoters>> } /// Record needed for every member. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub struct MemberRecord { /// The rank of the member. rank: Rank, diff --git a/substrate/frame/recovery/src/lib.rs b/substrate/frame/recovery/src/lib.rs index 5673147c8e00..c0f3264b7c85 100644 --- a/substrate/frame/recovery/src/lib.rs +++ b/substrate/frame/recovery/src/lib.rs @@ -183,7 +183,7 @@ type FriendsOf = BoundedVec<::AccountId, = <::Lookup as StaticLookup>::Source; /// An active recovery process. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, Debug, TypeInfo, MaxEncodedLen)] pub struct ActiveRecovery { /// The block number when the recovery process started. created: BlockNumber, @@ -195,7 +195,7 @@ pub struct ActiveRecovery { } /// Configuration for recovering an account. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, Debug, TypeInfo, MaxEncodedLen)] pub struct RecoveryConfig { /// The minimum number of blocks since the start of the recovery process before the account /// can be recovered. diff --git a/substrate/frame/referenda/src/types.rs b/substrate/frame/referenda/src/types.rs index b3c583322cce..3b1095695e36 100644 --- a/substrate/frame/referenda/src/types.rs +++ b/substrate/frame/referenda/src/types.rs @@ -95,7 +95,7 @@ impl> InsertSorted for BoundedVec { } } -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct DecidingStatus { /// When this referendum began being "decided". If confirming, then the /// end will actually be delayed until the end of the confirmation period. @@ -105,7 +105,7 @@ pub struct DecidingStatus { pub confirming: Option, } -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct Deposit { pub who: AccountId, pub amount: Balance, @@ -176,7 +176,7 @@ pub trait TracksInfo { } /// Info regarding an ongoing referendum. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, MaxEncodedLen)] pub struct ReferendumStatus< TrackId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, RuntimeOrigin: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, diff --git a/substrate/frame/salary/src/lib.rs b/substrate/frame/salary/src/lib.rs index efb4f5d3c542..102b9c71fa0b 100644 --- a/substrate/frame/salary/src/lib.rs +++ b/substrate/frame/salary/src/lib.rs @@ -49,7 +49,7 @@ pub use weights::WeightInfo; pub type Cycle = u32; /// The status of the pallet instance. -#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, Debug)] pub struct StatusType { /// The index of the "current cycle" (i.e. the last cycle being processed). cycle_index: CycleIndex, @@ -77,7 +77,7 @@ pub enum ClaimState { use ClaimState::*; /// The status of a single payee/claimant. -#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, RuntimeDebug)] +#[derive(Encode, Decode, Eq, PartialEq, Clone, TypeInfo, MaxEncodedLen, Debug)] pub struct ClaimantStatus { /// The most recent cycle in which the claimant was active. last_active: CycleIndex, diff --git a/substrate/frame/scheduler/src/lib.rs b/substrate/frame/scheduler/src/lib.rs index d19a1e0001dd..6ed2395e961f 100644 --- a/substrate/frame/scheduler/src/lib.rs +++ b/substrate/frame/scheduler/src/lib.rs @@ -123,7 +123,7 @@ pub type BoundedCallOf = Bounded<::RuntimeCall, ::Hashing>; /// The configuration of the retry mechanism for a given task along with its current state. -#[derive(Clone, Copy, RuntimeDebug, PartialEq, Eq, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct RetryConfig { /// Initial amount of retries allowed. total_retries: u8, @@ -134,7 +134,7 @@ pub struct RetryConfig { } #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))] -#[derive(Clone, RuntimeDebug, Encode, Decode)] +#[derive(Clone, Debug, Encode, Decode)] struct ScheduledV1 { maybe_id: Option>, priority: schedule::Priority, @@ -144,7 +144,7 @@ struct ScheduledV1 { /// Information regarding an item to be executed in the future. #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))] -#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct Scheduled { /// The unique identity for this task, if there is one. maybe_id: Option, diff --git a/substrate/frame/society/src/lib.rs b/substrate/frame/society/src/lib.rs index 5bce245f73f1..db764cf3172f 100644 --- a/substrate/frame/society/src/lib.rs +++ b/substrate/frame/society/src/lib.rs @@ -295,7 +295,7 @@ type NegativeImbalanceOf = <>::Currency as Currency< >>::NegativeImbalance; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Vote { approve: bool, weight: u32, @@ -314,7 +314,7 @@ pub enum Judgement { } /// Details of a payout given as a per-block linear "trickle". -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, Default, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, Default, TypeInfo)] pub struct Payout { /// Total value of the payout. value: Balance, @@ -339,7 +339,7 @@ pub enum VouchingStatus { pub type StrikeCount = u32; /// A bid for entry into society. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Bid { /// The bidder/candidate trying to enter society who: AccountId, @@ -359,7 +359,7 @@ pub type Rank = u32; pub type VoteCount = u32; /// Tally of votes. -#[derive(Default, Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Default, Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Tally { /// The approval votes. approvals: VoteCount, @@ -386,7 +386,7 @@ impl Tally { } /// A bid for entry into society. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct Candidacy { /// The index of the round where the candidacy began. round: RoundIndex, @@ -420,7 +420,7 @@ pub type PayoutsFor = BoundedVec<(BlockNumberFor, BalanceOf), >::MaxPayouts>; /// Information concerning a member. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct MemberRecord { rank: Rank, strikes: StrikeCount, @@ -429,7 +429,7 @@ pub struct MemberRecord { } /// Information concerning a member. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, Default)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, Default)] pub struct PayoutRecord { paid: Balance, payouts: PayoutsVec, @@ -441,7 +441,7 @@ pub type PayoutRecordFor = PayoutRecord< >; /// Record for an individual new member who was elevated from a candidate recently. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct IntakeRecord { who: AccountId, bid: Balance, @@ -451,7 +451,7 @@ pub struct IntakeRecord { pub type IntakeRecordFor = IntakeRecord<::AccountId, BalanceOf>; -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, TypeInfo)] pub struct GroupParams { max_members: u32, max_intake: u32, diff --git a/substrate/frame/staking/src/lib.rs b/substrate/frame/staking/src/lib.rs index f5b7e3eca3de..c55cd869da42 100644 --- a/substrate/frame/staking/src/lib.rs +++ b/substrate/frame/staking/src/lib.rs @@ -368,7 +368,7 @@ type NegativeImbalanceOf = <::Currency as Currency< type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; /// Information regarding the active era (era in used in session). -#[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub struct ActiveEraInfo { /// Index of era. pub index: EraIndex, @@ -382,7 +382,7 @@ pub struct ActiveEraInfo { /// Reward points of an era. Used to split era total payout between validators. /// /// This points will be used to reward validators and their respective nominators. -#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Encode, Decode, Debug, TypeInfo)] pub struct EraRewardPoints { /// Total number of points. Equals the sum of reward points for each validator. pub total: RewardPoint, @@ -414,7 +414,7 @@ pub enum RewardDestination { } /// Preference of what happens regarding validation. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo, Default, MaxEncodedLen)] pub struct ValidatorPrefs { /// Reward that validator takes up-front; only the rest is split between themselves and /// nominators. @@ -427,7 +427,7 @@ pub struct ValidatorPrefs { } /// Just a Balance/BlockNumber tuple to encode when a chunk of funds will be unlocked. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub struct UnlockChunk { /// Amount of funds to be unlocked. #[codec(compact)] @@ -447,14 +447,7 @@ pub struct UnlockChunk { /// leaving here to enforce a clean PR diff, given how critical this logic is. Tracking issue /// . #[derive( - PartialEqNoBound, - EqNoBound, - CloneNoBound, - Encode, - Decode, - RuntimeDebugNoBound, - TypeInfo, - MaxEncodedLen, + PartialEqNoBound, EqNoBound, CloneNoBound, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, )] #[scale_info(skip_type_params(T))] pub struct StakingLedger { @@ -714,9 +707,7 @@ impl StakingLedger { } /// A record of the nominations made by a specific account. -#[derive( - PartialEqNoBound, EqNoBound, Clone, Encode, Decode, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen, -)] +#[derive(PartialEqNoBound, EqNoBound, Clone, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] #[codec(mel_bound())] #[scale_info(skip_type_params(T))] pub struct Nominations { @@ -737,7 +728,7 @@ pub struct Nominations { /// /// This is useful where we need to take into account the validator's own stake and total exposure /// in consideration, in addition to the individual nominators backing them. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Eq)] +#[derive(Encode, Decode, Debug, TypeInfo, PartialEq, Eq)] pub struct PagedExposure { exposure_metadata: PagedExposureMetadata, exposure_page: ExposurePage, @@ -782,7 +773,7 @@ impl { /// The stash ID of the offending validator. validator: AccountId, diff --git a/substrate/frame/staking/src/slashing.rs b/substrate/frame/staking/src/slashing.rs index 2011e9eb8301..203b570d32b3 100644 --- a/substrate/frame/staking/src/slashing.rs +++ b/substrate/frame/staking/src/slashing.rs @@ -90,7 +90,7 @@ impl SlashingSpan { } /// An encoding of all of a nominator's slashing spans. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Debug, TypeInfo)] pub struct SlashingSpans { // the index of the current slashing span of the nominator. different for // every stash, resets when the account hits free balance 0. diff --git a/substrate/frame/support/src/dispatch.rs b/substrate/frame/support/src/dispatch.rs index 4a313551aca6..8d8748f06773 100644 --- a/substrate/frame/support/src/dispatch.rs +++ b/substrate/frame/support/src/dispatch.rs @@ -234,7 +234,7 @@ impl<'a> OneOrMany for &'a [DispatchClass] { } /// A bundle of static information collected from the `#[pallet::weight]` attributes. -#[derive(Clone, Copy, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode, TypeInfo)] +#[derive(Clone, Copy, Eq, PartialEq, Default, Debug, Encode, Decode, TypeInfo)] pub struct DispatchInfo { /// Weight of this transaction. pub weight: Weight, @@ -279,7 +279,7 @@ pub fn extract_actual_pays_fee(result: &DispatchResultWithPostInfo, info: &Dispa /// Weight information that is only available post dispatch. /// NOTE: This can only be used to reduce the weight or fee, not increase it. -#[derive(Clone, Copy, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode, TypeInfo)] +#[derive(Clone, Copy, Eq, PartialEq, Default, Debug, Encode, Decode, TypeInfo)] pub struct PostDispatchInfo { /// Actual weight consumed by a call or `None` which stands for the worst case static weight. pub actual_weight: Option, diff --git a/substrate/frame/support/src/traits/messages.rs b/substrate/frame/support/src/traits/messages.rs index 2eec606b6d18..0e0a06cf2a44 100644 --- a/substrate/frame/support/src/traits/messages.rs +++ b/substrate/frame/support/src/traits/messages.rs @@ -123,7 +123,7 @@ impl ServiceQueues for NoopServiceQueues { } /// The resource footprint of a queue. -#[derive(Default, Copy, Clone, Eq, PartialEq, RuntimeDebug)] +#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)] pub struct QueueFootprint { /// The number of pages in the queue (including overweight pages). pub pages: u32, diff --git a/substrate/frame/support/src/traits/metadata.rs b/substrate/frame/support/src/traits/metadata.rs index 8bda4186bc96..25134ea91d23 100644 --- a/substrate/frame/support/src/traits/metadata.rs +++ b/substrate/frame/support/src/traits/metadata.rs @@ -40,7 +40,7 @@ pub trait PalletInfo { } /// Information regarding an instance of a pallet. -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] pub struct PalletInfoData { /// Index of the pallet as configured in the runtime. pub index: usize, @@ -95,7 +95,7 @@ impl PalletsInfoAccess for Tuple { } /// The function and pallet name of the Call. -#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug)] +#[derive(Clone, Eq, PartialEq, Default, Debug)] pub struct CallMetadata { /// Name of the function. pub function_name: &'static str, diff --git a/substrate/frame/support/src/traits/storage.rs b/substrate/frame/support/src/traits/storage.rs index 9e467aea4220..4f171de37393 100644 --- a/substrate/frame/support/src/traits/storage.rs +++ b/substrate/frame/support/src/traits/storage.rs @@ -161,7 +161,7 @@ impl WhitelistedStorageKeys for Tuple { /// The resource footprint of a bunch of blobs. We assume only the number of blobs and their total /// size in bytes matter. -#[derive(Default, Copy, Clone, Eq, PartialEq, RuntimeDebug)] +#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)] pub struct Footprint { /// The number of blobs. pub count: u64, diff --git a/substrate/frame/support/src/traits/tokens/fungible/imbalance.rs b/substrate/frame/support/src/traits/tokens/fungible/imbalance.rs index 020dffe28c85..194841682d3c 100644 --- a/substrate/frame/support/src/traits/tokens/fungible/imbalance.rs +++ b/substrate/frame/support/src/traits/tokens/fungible/imbalance.rs @@ -47,7 +47,7 @@ impl HandleImbalanceDrop for () { /// /// Importantly, it has a special `Drop` impl, and cannot be created outside of this module. #[must_use] -#[derive(EqNoBound, PartialEqNoBound, RuntimeDebugNoBound)] +#[derive(EqNoBound, PartialEqNoBound, Debug)] pub struct Imbalance< B: Balance, OnDrop: HandleImbalanceDrop, diff --git a/substrate/frame/support/src/traits/tokens/fungible/mod.rs b/substrate/frame/support/src/traits/tokens/fungible/mod.rs index 01c3b9dfe46a..4135143e058f 100644 --- a/substrate/frame/support/src/traits/tokens/fungible/mod.rs +++ b/substrate/frame/support/src/traits/tokens/fungible/mod.rs @@ -189,14 +189,7 @@ use crate::{ /// The aggregate amount frozen under `R::get()` for any account which has multiple tickets, /// is the *cumulative* amounts of each ticket's footprint (each individually determined by `D`). #[derive( - CloneNoBound, - EqNoBound, - PartialEqNoBound, - Encode, - Decode, - TypeInfo, - MaxEncodedLen, - RuntimeDebugNoBound, + CloneNoBound, EqNoBound, PartialEqNoBound, Encode, Decode, TypeInfo, MaxEncodedLen, Debug, )] #[scale_info(skip_type_params(A, F, R, D))] #[codec(mel_bound())] @@ -231,14 +224,7 @@ impl< /// Consideration method using a `fungible` balance frozen as the cost exacted for the footprint. #[derive( - CloneNoBound, - EqNoBound, - PartialEqNoBound, - Encode, - Decode, - TypeInfo, - MaxEncodedLen, - RuntimeDebugNoBound, + CloneNoBound, EqNoBound, PartialEqNoBound, Encode, Decode, TypeInfo, MaxEncodedLen, Debug, )] #[scale_info(skip_type_params(A, F, R, D))] #[codec(mel_bound())] @@ -282,14 +268,7 @@ impl< /// track the specific balance which is frozen. If you are uncertain then use `FreezeConsideration` /// instead, since this works in all circumstances. #[derive( - CloneNoBound, - EqNoBound, - PartialEqNoBound, - Encode, - Decode, - TypeInfo, - MaxEncodedLen, - RuntimeDebugNoBound, + CloneNoBound, EqNoBound, PartialEqNoBound, Encode, Decode, TypeInfo, MaxEncodedLen, Debug, )] #[scale_info(skip_type_params(A, Fx, Rx, D))] #[codec(mel_bound())] @@ -321,14 +300,7 @@ impl< /// track the specific balance which is frozen. If you are uncertain then use `FreezeConsideration` /// instead, since this works in all circumstances. #[derive( - CloneNoBound, - EqNoBound, - PartialEqNoBound, - Encode, - Decode, - TypeInfo, - MaxEncodedLen, - RuntimeDebugNoBound, + CloneNoBound, EqNoBound, PartialEqNoBound, Encode, Decode, TypeInfo, MaxEncodedLen, Debug, )] #[scale_info(skip_type_params(A, Fx, Rx, D))] #[codec(mel_bound())] diff --git a/substrate/frame/support/src/traits/tokens/fungibles/imbalance.rs b/substrate/frame/support/src/traits/tokens/fungibles/imbalance.rs index bb0d83721a48..12496b3f60fd 100644 --- a/substrate/frame/support/src/traits/tokens/fungibles/imbalance.rs +++ b/substrate/frame/support/src/traits/tokens/fungibles/imbalance.rs @@ -42,7 +42,7 @@ pub trait HandleImbalanceDrop { /// /// Importantly, it has a special `Drop` impl, and cannot be created outside of this module. #[must_use] -#[derive(EqNoBound, PartialEqNoBound, RuntimeDebugNoBound)] +#[derive(EqNoBound, PartialEqNoBound, Debug)] pub struct Imbalance< A: AssetId, B: Balance, diff --git a/substrate/frame/support/test/tests/derive_no_bound.rs b/substrate/frame/support/test/tests/derive_no_bound.rs index b19147078051..16e3b3e7ac0d 100644 --- a/substrate/frame/support/test/tests/derive_no_bound.rs +++ b/substrate/frame/support/test/tests/derive_no_bound.rs @@ -23,7 +23,7 @@ use frame_support::{ PartialOrdNoBound, RuntimeDebugNoBound, }; -#[derive(RuntimeDebugNoBound)] +#[derive(Debug)] #[allow(dead_code)] struct Unnamed(u64); diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 30df4dcfd43e..86ff3559f450 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -1069,7 +1069,7 @@ impl Default for Phase { } /// Record of an event happening. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, PartialEq, Eq, Clone))] pub struct EventRecord { /// The phase of the block it happened in. @@ -1098,7 +1098,7 @@ type EventIndex = u32; pub type RefCount = u32; /// Information of an account. -#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Eq, PartialEq, Default, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct AccountInfo { /// The number of transactions this account has sent. pub nonce: Nonce, diff --git a/substrate/frame/system/src/limits.rs b/substrate/frame/system/src/limits.rs index ab5a98a6b974..cc08eecff065 100644 --- a/substrate/frame/system/src/limits.rs +++ b/substrate/frame/system/src/limits.rs @@ -33,7 +33,7 @@ use scale_info::TypeInfo; use sp_runtime::{traits::Bounded, Perbill, RuntimeDebug}; /// Block length limit configuration. -#[derive(RuntimeDebug, Clone, codec::Encode, codec::Decode, TypeInfo)] +#[derive(Debug, Clone, codec::Encode, codec::Decode, TypeInfo)] pub struct BlockLength { /// Maximal total length in bytes for each extrinsic class. /// @@ -69,7 +69,7 @@ impl BlockLength { } } -#[derive(Default, RuntimeDebug)] +#[derive(Default, Debug)] pub struct ValidationErrors { pub has_errors: bool, #[cfg(feature = "std")] @@ -95,7 +95,7 @@ pub type ValidationResult = Result; const DEFAULT_NORMAL_RATIO: Perbill = Perbill::from_percent(75); /// `DispatchClass`-specific weight configuration. -#[derive(RuntimeDebug, Clone, codec::Encode, codec::Decode, TypeInfo)] +#[derive(Debug, Clone, codec::Encode, codec::Decode, TypeInfo)] pub struct WeightsPerClass { /// Base weight of single extrinsic of given class. pub base_extrinsic: Weight, @@ -195,7 +195,7 @@ pub struct WeightsPerClass { /// /// As a consequence of `reserved` space, total consumed block weight might exceed `max_block` /// value, so this parameter should rather be thought of as "target block weight" than a hard limit. -#[derive(RuntimeDebug, Clone, codec::Encode, codec::Decode, TypeInfo)] +#[derive(Debug, Clone, codec::Encode, codec::Decode, TypeInfo)] pub struct BlockWeights { /// Base weight of block execution. pub base_block: Weight, diff --git a/substrate/frame/system/src/migrations/mod.rs b/substrate/frame/system/src/migrations/mod.rs index 945bbc539552..a32aa0441366 100644 --- a/substrate/frame/system/src/migrations/mod.rs +++ b/substrate/frame/system/src/migrations/mod.rs @@ -30,7 +30,7 @@ use sp_std::prelude::*; type RefCount = u32; /// Information of an account. -#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Default, Debug, Encode, Decode)] struct AccountInfo { nonce: Nonce, consumers: RefCount, diff --git a/substrate/frame/system/src/offchain.rs b/substrate/frame/system/src/offchain.rs index a64b32619640..1ff71460f7e3 100644 --- a/substrate/frame/system/src/offchain.rs +++ b/substrate/frame/system/src/offchain.rs @@ -112,7 +112,7 @@ where /// The signer is then able to: /// - Submit a unsigned transaction with a signed payload /// - Submit a signed transaction -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct Signer, X = ForAny> { accounts: Option>, _phantom: sp_std::marker::PhantomData<(X, C)>, @@ -336,7 +336,7 @@ impl< } /// Details of an account for which a private key is contained in the keystore. -#[derive(RuntimeDebug, PartialEq)] +#[derive(Debug, PartialEq)] pub struct Account { /// Index on the provided list of accounts or list of all accounts. pub index: usize, diff --git a/substrate/frame/tips/src/lib.rs b/substrate/frame/tips/src/lib.rs index 8c360fb57d72..6069a5528ba6 100644 --- a/substrate/frame/tips/src/lib.rs +++ b/substrate/frame/tips/src/lib.rs @@ -91,7 +91,7 @@ type AccountIdLookupOf = <::Lookup as StaticLookup /// An open tipping "motion". Retains all details of a tip including information on the finder /// and the members who have voted. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, scale_info::TypeInfo)] pub struct OpenTip< AccountId: Parameter, Balance: Parameter, diff --git a/substrate/frame/treasury/src/lib.rs b/substrate/frame/treasury/src/lib.rs index 1ccd84566432..2576421d4912 100644 --- a/substrate/frame/treasury/src/lib.rs +++ b/substrate/frame/treasury/src/lib.rs @@ -142,7 +142,7 @@ pub type ProposalIndex = u32; /// A spending proposal. #[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 struct Proposal { /// The account proposing it. proposer: AccountId, @@ -168,7 +168,7 @@ pub enum PaymentState { /// Info regarding an approved treasury spend. #[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 struct SpendStatus { // The kind of asset to be spent. asset_kind: AssetKind, diff --git a/substrate/frame/uniques/src/types.rs b/substrate/frame/uniques/src/types.rs index a2e804f245f7..60defe809f04 100644 --- a/substrate/frame/uniques/src/types.rs +++ b/substrate/frame/uniques/src/types.rs @@ -37,7 +37,7 @@ pub(super) type ItemDetailsFor = pub(super) type ItemPrice = <>::Currency as Currency<::AccountId>>::Balance; -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct CollectionDetails { /// Can change `owner`, `issuer`, `freezer` and `admin` accounts. pub(super) owner: AccountId, @@ -63,7 +63,7 @@ pub struct CollectionDetails { } /// Witness data for the destroy transactions. -#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] pub struct DestroyWitness { /// The total number of outstanding items of this collection. #[codec(compact)] @@ -87,7 +87,7 @@ impl CollectionDetails { } /// Information concerning the ownership of a single unique item. -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] pub struct ItemDetails { /// The owner of this item. pub(super) owner: AccountId, @@ -100,7 +100,7 @@ pub struct ItemDetails { pub(super) deposit: DepositBalance, } -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(StringLimit))] #[codec(mel_bound(DepositBalance: MaxEncodedLen))] pub struct CollectionMetadata> { @@ -116,7 +116,7 @@ pub struct CollectionMetadata> { pub(super) is_frozen: bool, } -#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, Default, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(StringLimit))] #[codec(mel_bound(DepositBalance: MaxEncodedLen))] pub struct ItemMetadata> { diff --git a/substrate/frame/vesting/src/vesting_info.rs b/substrate/frame/vesting/src/vesting_info.rs index 5d5ae31fc324..340272d27292 100644 --- a/substrate/frame/vesting/src/vesting_info.rs +++ b/substrate/frame/vesting/src/vesting_info.rs @@ -20,7 +20,7 @@ use super::*; /// Struct to encode the vesting schedule of an individual account. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, Debug, MaxEncodedLen, TypeInfo)] pub struct VestingInfo { /// Locked amount at genesis. locked: Balance, diff --git a/substrate/primitives/consensus/babe/src/digests.rs b/substrate/primitives/consensus/babe/src/digests.rs index e7af8c5763a0..8d44fd7f7627 100644 --- a/substrate/primitives/consensus/babe/src/digests.rs +++ b/substrate/primitives/consensus/babe/src/digests.rs @@ -31,7 +31,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; /// Raw BABE primary slot assignment pre-digest. -#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct PrimaryPreDigest { /// Authority index pub authority_index: super::AuthorityIndex, @@ -42,7 +42,7 @@ pub struct PrimaryPreDigest { } /// BABE secondary slot assignment pre-digest. -#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct SecondaryPlainPreDigest { /// Authority index /// @@ -56,7 +56,7 @@ pub struct SecondaryPlainPreDigest { } /// BABE secondary deterministic slot assignment with VRF outputs. -#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct SecondaryVRFPreDigest { /// Authority index pub authority_index: super::AuthorityIndex, @@ -127,7 +127,7 @@ impl PreDigest { /// Information about the next epoch. This is broadcast in the first block /// of the epoch. -#[derive(Decode, Encode, PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(Decode, Encode, PartialEq, Eq, Clone, Debug)] pub struct NextEpochDescriptor { /// The authorities. pub authorities: Vec<(AuthorityId, BabeAuthorityWeight)>, diff --git a/substrate/primitives/consensus/babe/src/lib.rs b/substrate/primitives/consensus/babe/src/lib.rs index ee07da6829f5..62d17a699b94 100644 --- a/substrate/primitives/consensus/babe/src/lib.rs +++ b/substrate/primitives/consensus/babe/src/lib.rs @@ -134,7 +134,7 @@ pub enum ConsensusLog { } /// Configuration data used by the BABE consensus engine. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug)] pub struct BabeConfigurationV1 { /// The slot duration in milliseconds for BABE. Currently, only /// the value provided by this type at genesis will be used. @@ -182,7 +182,7 @@ impl From for BabeConfiguration { } /// Configuration data used by the BABE consensus engine. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct BabeConfiguration { /// The slot duration in milliseconds for BABE. Currently, only /// the value provided by this type at genesis will be used. @@ -243,7 +243,7 @@ impl AllowedSlots { } /// Configuration data used by the BABE consensus engine that may change with epochs. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, MaxEncodedLen, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, MaxEncodedLen, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct BabeEpochConfiguration { /// A constant value that is used in the threshold calculation formula. diff --git a/substrate/primitives/consensus/grandpa/src/lib.rs b/substrate/primitives/consensus/grandpa/src/lib.rs index 75ed81894c25..7c91c3398cef 100644 --- a/substrate/primitives/consensus/grandpa/src/lib.rs +++ b/substrate/primitives/consensus/grandpa/src/lib.rs @@ -135,7 +135,7 @@ pub struct GrandpaJustification { } /// A scheduled change of authority set. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize))] pub struct ScheduledChange { /// The new authorities after the change, along with their respective weights. diff --git a/substrate/primitives/consensus/sassafras/src/digests.rs b/substrate/primitives/consensus/sassafras/src/digests.rs index 64190a41ce1c..b49674cecbe6 100644 --- a/substrate/primitives/consensus/sassafras/src/digests.rs +++ b/substrate/primitives/consensus/sassafras/src/digests.rs @@ -32,7 +32,7 @@ use sp_runtime::{DigestItem, RuntimeDebug}; /// Epoch slot claim digest entry. /// /// This is mandatory for each block. -#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Clone, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct SlotClaim { /// Authority index that claimed the slot. pub authority_idx: AuthorityIndex, @@ -47,7 +47,7 @@ pub struct SlotClaim { /// Information about the next epoch. /// /// This is mandatory in the first block of each epoch. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug)] pub struct NextEpochDescriptor { /// Randomness value. pub randomness: Randomness, diff --git a/substrate/primitives/consensus/sassafras/src/lib.rs b/substrate/primitives/consensus/sassafras/src/lib.rs index c1fea74d0452..f0a746a292c8 100644 --- a/substrate/primitives/consensus/sassafras/src/lib.rs +++ b/substrate/primitives/consensus/sassafras/src/lib.rs @@ -85,9 +85,7 @@ pub type Randomness = [u8; RANDOMNESS_LENGTH]; /// Protocol configuration that can be modified on epoch change. /// /// Mostly tweaks to the ticketing system parameters. -#[derive( - Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, MaxEncodedLen, TypeInfo, Default, -)] +#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, Debug, MaxEncodedLen, TypeInfo, Default)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct EpochConfiguration { /// Tickets redundancy factor. diff --git a/substrate/primitives/core/src/lib.rs b/substrate/primitives/core/src/lib.rs index 098bd135bfeb..f7725a7ec6eb 100644 --- a/substrate/primitives/core/src/lib.rs +++ b/substrate/primitives/core/src/lib.rs @@ -107,7 +107,7 @@ pub use sp_storage as storage; pub use sp_std; /// Hex-serialized shim for `Vec`. -#[derive(PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize, Hash, PartialOrd, Ord))] pub struct Bytes(#[cfg_attr(feature = "serde", serde(with = "bytes"))] pub Vec); @@ -166,17 +166,7 @@ impl sp_std::ops::Deref for OpaqueMetadata { /// Simple blob to hold a `PeerId` without committing to its format. #[derive( - Default, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - PassByInner, - TypeInfo, + Default, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, PassByInner, TypeInfo, )] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct OpaquePeerId(pub Vec); diff --git a/substrate/primitives/core/src/offchain/mod.rs b/substrate/primitives/core/src/offchain/mod.rs index cef495dfaacd..ac61da50ea75 100644 --- a/substrate/primitives/core/src/offchain/mod.rs +++ b/substrate/primitives/core/src/offchain/mod.rs @@ -94,9 +94,7 @@ impl From for u32 { } /// Opaque type for offchain http requests. -#[derive( - Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, Encode, Decode, PassByInner, -)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Encode, Decode, PassByInner)] #[cfg_attr(feature = "std", derive(Hash))] pub struct HttpRequestId(pub u16); @@ -184,7 +182,7 @@ impl TryFrom for HttpRequestStatus { /// A blob to hold information about the local node's network state /// without committing to its format. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, PassByCodec, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, PassByCodec, TypeInfo)] #[cfg_attr(feature = "std", derive(Default))] pub struct OpaqueNetworkState { /// PeerId of the local node in SCALE encoded. @@ -194,7 +192,7 @@ pub struct OpaqueNetworkState { } /// Simple blob to hold a `Multiaddr` without committing to its format. -#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, PassByInner, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, PassByInner, TypeInfo)] pub struct OpaqueMultiaddr(pub Vec); impl OpaqueMultiaddr { @@ -206,14 +204,14 @@ impl OpaqueMultiaddr { /// Opaque timestamp type #[derive( - Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default, RuntimeDebug, PassByInner, Encode, Decode, + Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default, Debug, PassByInner, Encode, Decode, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Timestamp(u64); /// Duration type #[derive( - Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default, RuntimeDebug, PassByInner, Encode, Decode, + Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default, Debug, PassByInner, Encode, Decode, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Duration(u64); diff --git a/substrate/primitives/debug-derive/tests/tests.rs b/substrate/primitives/debug-derive/tests/tests.rs index da521068e0dc..c4217413a620 100644 --- a/substrate/primitives/debug-derive/tests/tests.rs +++ b/substrate/primitives/debug-derive/tests/tests.rs @@ -17,10 +17,10 @@ use sp_debug_derive::RuntimeDebug; -#[derive(RuntimeDebug)] +#[derive(Debug)] struct Unnamed(u64, String); -#[derive(RuntimeDebug)] +#[derive(Debug)] struct Named { a: u64, b: String, diff --git a/substrate/primitives/merkle-mountain-range/src/lib.rs b/substrate/primitives/merkle-mountain-range/src/lib.rs index c76d66bb08ea..ef0f4665f034 100644 --- a/substrate/primitives/merkle-mountain-range/src/lib.rs +++ b/substrate/primitives/merkle-mountain-range/src/lib.rs @@ -104,7 +104,7 @@ impl FullLeaf /// it would have to be SCALE-compatible with the concrete leaf type, but due to SCALE limitations /// it's not possible to know how many bytes the encoding of concrete leaf type uses. #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[derive(RuntimeDebug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq)] pub struct OpaqueLeaf( /// Raw bytes of the leaf type encoded in its compact form. /// @@ -144,7 +144,7 @@ impl FullLeaf for OpaqueLeaf { /// /// It is different from [`OpaqueLeaf`], because it does implement `Codec` /// and the encoding has to match raw `Vec` encoding. -#[derive(codec::Encode, codec::Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] +#[derive(codec::Encode, codec::Decode, Debug, PartialEq, Eq, TypeInfo)] pub struct EncodableOpaqueLeaf(pub Vec); impl EncodableOpaqueLeaf { @@ -246,7 +246,7 @@ impl DataOrHash { /// into [DataOrHash] and each tuple element is hashed first before constructing /// the final hash of the entire tuple. This allows you to replace tuple elements /// you don't care about with their hashes. -#[derive(RuntimeDebug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq)] pub struct Compact { /// Internal tuple representation. pub tuple: T, @@ -351,7 +351,7 @@ impl_leaf_data_for_tuple!(A:0, B:1, C:2, D:3); impl_leaf_data_for_tuple!(A:0, B:1, C:2, D:3, E:4); /// An MMR proof data for a group of leaves. -#[derive(codec::Encode, codec::Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)] +#[derive(codec::Encode, codec::Decode, Debug, Clone, PartialEq, Eq, TypeInfo)] pub struct Proof { /// The indices of the leaves the proof is for. pub leaf_indices: Vec, diff --git a/substrate/primitives/npos-elections/src/assignments.rs b/substrate/primitives/npos-elections/src/assignments.rs index 0686fdda643b..1cc8aa294f3b 100644 --- a/substrate/primitives/npos-elections/src/assignments.rs +++ b/substrate/primitives/npos-elections/src/assignments.rs @@ -28,7 +28,7 @@ use sp_arithmetic::{ use sp_core::RuntimeDebug; /// A voter's stake assignment among a set of targets, represented as ratios. -#[derive(RuntimeDebug, Clone, Default)] +#[derive(Debug, Clone, Default)] #[cfg_attr(feature = "serde", derive(PartialEq, Eq, Encode, Decode))] pub struct Assignment { /// Voter's identifier. @@ -96,7 +96,7 @@ impl Assignment { /// A voter's stake assignment among a set of targets, represented as absolute values in the scale /// of [`ExtendedBalance`]. -#[derive(RuntimeDebug, Clone, Default)] +#[derive(Debug, Clone, Default)] #[cfg_attr(feature = "serde", derive(PartialEq, Eq, Encode, Decode))] pub struct StakedAssignment { /// Voter's identifier diff --git a/substrate/primitives/npos-elections/src/lib.rs b/substrate/primitives/npos-elections/src/lib.rs index 82ac40fe2737..1b35bce56a33 100644 --- a/substrate/primitives/npos-elections/src/lib.rs +++ b/substrate/primitives/npos-elections/src/lib.rs @@ -228,7 +228,7 @@ pub struct BalancingConfig { pub type CandidatePtr = Rc>>; /// A candidate entity for the election. -#[derive(RuntimeDebug, Clone, Default)] +#[derive(Debug, Clone, Default)] pub struct Candidate { /// Identifier. who: AccountId, @@ -412,7 +412,7 @@ impl Voter { } /// Final result of the election. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct ElectionResult { /// Just winners zipped with their approval stake. Note that the approval stake is merely the /// sub of their received stake and could be used for very basic sorting and approval voting. @@ -429,7 +429,7 @@ pub struct ElectionResult { /// /// This, at the current version, resembles the `Exposure` defined in the Staking pallet, yet they /// do not necessarily have to be the same. -#[derive(RuntimeDebug, Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] +#[derive(Debug, Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Support { /// Total support. diff --git a/substrate/primitives/runtime/src/generic/block.rs b/substrate/primitives/runtime/src/generic/block.rs index 05146e880cb1..93d1cd003531 100644 --- a/substrate/primitives/runtime/src/generic/block.rs +++ b/substrate/primitives/runtime/src/generic/block.rs @@ -78,7 +78,7 @@ impl fmt::Display for BlockId { } /// Abstraction over a substrate block. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, scale_info::TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr(feature = "serde", serde(deny_unknown_fields))] @@ -123,7 +123,7 @@ where } /// Abstraction over a substrate block and justification. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr(feature = "serde", serde(deny_unknown_fields))] diff --git a/substrate/primitives/runtime/src/generic/digest.rs b/substrate/primitives/runtime/src/generic/digest.rs index d7db0f91a482..d5d0e3f82732 100644 --- a/substrate/primitives/runtime/src/generic/digest.rs +++ b/substrate/primitives/runtime/src/generic/digest.rs @@ -35,7 +35,7 @@ use crate::{ use sp_core::RuntimeDebug; /// Generic header digest. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, TypeInfo, Default)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Digest { /// A list of logs in the digest. diff --git a/substrate/primitives/runtime/src/lib.rs b/substrate/primitives/runtime/src/lib.rs index 44bf3c969e54..339f4160fca3 100644 --- a/substrate/primitives/runtime/src/lib.rs +++ b/substrate/primitives/runtime/src/lib.rs @@ -466,7 +466,7 @@ impl Verify for MultiSignature { } /// Signature verify that can work with any known signature types.. -#[derive(Eq, PartialEq, Clone, Default, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Eq, PartialEq, Clone, Default, Encode, Decode, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct AnySignature(H512); @@ -599,7 +599,7 @@ pub enum DispatchError { /// Result of a `Dispatchable` which contains the `DispatchResult` and additional information about /// the `Dispatchable` that is only known post dispatch. -#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, Debug, TypeInfo)] pub struct DispatchErrorWithPostInfo where Info: Eq + PartialEq + Clone + Copy + Encode + Decode + traits::Printable, diff --git a/substrate/primitives/runtime/src/offchain/http.rs b/substrate/primitives/runtime/src/offchain/http.rs index bacc0073825b..2843163fb724 100644 --- a/substrate/primitives/runtime/src/offchain/http.rs +++ b/substrate/primitives/runtime/src/offchain/http.rs @@ -123,7 +123,7 @@ mod header { } /// An HTTP request builder. -#[derive(Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Request<'a, T = Vec<&'static [u8]>> { /// Request method pub method: Method, @@ -244,7 +244,7 @@ pub enum Error { } /// A struct representing an uncompleted http request. -#[derive(PartialEq, Eq, RuntimeDebug)] +#[derive(PartialEq, Eq, Debug)] pub struct PendingRequest { /// Request ID pub id: RequestId, @@ -311,7 +311,7 @@ impl PendingRequest { } /// A HTTP response. -#[derive(RuntimeDebug)] +#[derive(Debug)] pub struct Response { /// Request id pub id: RequestId, @@ -435,7 +435,7 @@ impl Iterator for ResponseBody { } /// A collection of Headers in the response. -#[derive(Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Headers { /// Raw headers pub raw: Vec<(Vec, Vec)>, @@ -465,7 +465,7 @@ impl Headers { } /// A custom iterator traversing all the headers. -#[derive(Clone, RuntimeDebug)] +#[derive(Clone, Debug)] pub struct HeadersIterator<'a> { collection: &'a [(Vec, Vec)], index: Option, diff --git a/substrate/primitives/runtime/src/traits.rs b/substrate/primitives/runtime/src/traits.rs index d023aa045dbe..5c6ef1824728 100644 --- a/substrate/primitives/runtime/src/traits.rs +++ b/substrate/primitives/runtime/src/traits.rs @@ -176,7 +176,7 @@ where } /// An error type that indicates that the origin is invalid. -#[derive(Encode, Decode, RuntimeDebug)] +#[derive(Encode, Decode, Debug)] pub struct BadOrigin; impl From for &'static str { @@ -186,7 +186,7 @@ impl From for &'static str { } /// An error that indicates that a lookup failed. -#[derive(Encode, Decode, RuntimeDebug)] +#[derive(Encode, Decode, Debug)] pub struct LookupError; impl From for &'static str { @@ -1023,7 +1023,7 @@ impl HashOutput for T where } /// Blake2-256 Hash implementation. -#[derive(PartialEq, Eq, Clone, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct BlakeTwo256; @@ -1050,7 +1050,7 @@ impl Hash for BlakeTwo256 { } /// Keccak-256 Hash implementation. -#[derive(PartialEq, Eq, Clone, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, Clone, Debug, TypeInfo)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Keccak256; diff --git a/substrate/primitives/runtime/src/transaction_validity.rs b/substrate/primitives/runtime/src/transaction_validity.rs index 836948493823..e98ffd60513e 100644 --- a/substrate/primitives/runtime/src/transaction_validity.rs +++ b/substrate/primitives/runtime/src/transaction_validity.rs @@ -251,7 +251,7 @@ pub enum TransactionSource { } /// Information concerning a valid transaction. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct ValidTransaction { /// Priority of the transaction. /// @@ -329,7 +329,7 @@ impl ValidTransaction { /// /// Allows to easily construct `ValidTransaction` and most importantly takes care of /// prefixing `requires` and `provides` tags to avoid conflicts. -#[derive(Default, Clone, RuntimeDebug)] +#[derive(Default, Clone, Debug)] pub struct ValidTransactionBuilder { prefix: Option<&'static str>, validity: ValidTransaction, diff --git a/substrate/primitives/session/src/lib.rs b/substrate/primitives/session/src/lib.rs index fe7a38047338..837db02787c9 100644 --- a/substrate/primitives/session/src/lib.rs +++ b/substrate/primitives/session/src/lib.rs @@ -39,7 +39,7 @@ pub use runtime_api::*; pub type ValidatorCount = u32; /// Proof of membership of a specific key in a given session. -#[derive(Encode, Decode, Clone, Eq, PartialEq, Default, RuntimeDebug, scale_info::TypeInfo)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, Default, Debug, scale_info::TypeInfo)] pub struct MembershipProof { /// The session index on which the specific key is a member. pub session: SessionIndex, diff --git a/substrate/primitives/staking/src/lib.rs b/substrate/primitives/staking/src/lib.rs index ad6cc6e2f4ff..9df3b6db7f63 100644 --- a/substrate/primitives/staking/src/lib.rs +++ b/substrate/primitives/staking/src/lib.rs @@ -75,7 +75,7 @@ pub enum StakerStatus { /// A struct that reflects stake that an account has in the staking system. Provides a set of /// methods to operate on it's properties. Aimed at making `StakingInterface` more concise. -#[derive(RuntimeDebug, Clone, Copy, Eq, PartialEq, Default)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)] pub struct Stake { /// The total stake that `stash` has in the staking system. This includes the /// `active` stake, and any funds currently in the process of unbonding via @@ -339,7 +339,7 @@ pub trait StakingUnchecked: StakingInterface { } /// The amount of exposure for an era that an individual nominator has (susceptible to slashing). -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Debug, TypeInfo)] pub struct IndividualExposure { /// The stash account of the nominator in question. pub who: AccountId, @@ -349,7 +349,7 @@ pub struct IndividualExposure { } /// A snapshot of the stake backing a single validator in the system. -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Debug, TypeInfo)] pub struct Exposure { /// The total balance backing this validator. #[codec(compact)] @@ -410,7 +410,7 @@ impl< } /// A snapshot of the stake backing a single validator in the system. -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Debug, TypeInfo)] pub struct ExposurePage { /// The total balance of this chunk/page. #[codec(compact)] @@ -431,17 +431,7 @@ impl Default for ExposurePage { /// `Exposure` set of a validator. This is useful for cases where we want to query full set of /// `Exposure` as one page (for backward compatibility). #[derive( - PartialEq, - Eq, - PartialOrd, - Ord, - Clone, - Encode, - Decode, - RuntimeDebug, - TypeInfo, - Default, - MaxEncodedLen, + PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Debug, TypeInfo, Default, MaxEncodedLen, )] pub struct PagedExposureMetadata { /// The total balance backing this validator. diff --git a/substrate/primitives/statement-store/src/runtime_api.rs b/substrate/primitives/statement-store/src/runtime_api.rs index 4d25576c801f..37ca1da8918f 100644 --- a/substrate/primitives/statement-store/src/runtime_api.rs +++ b/substrate/primitives/statement-store/src/runtime_api.rs @@ -28,7 +28,7 @@ use sp_runtime_interface::{pass_by::PassByEnum, runtime_interface}; use sp_externalities::ExternalitiesExt; /// Information concerning a valid statement. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct ValidStatement { /// Max statement count for this account, as calculated by the runtime. pub max_count: u32, diff --git a/substrate/primitives/storage/src/lib.rs b/substrate/primitives/storage/src/lib.rs index 197994f57471..cb828b7f4715 100644 --- a/substrate/primitives/storage/src/lib.rs +++ b/substrate/primitives/storage/src/lib.rs @@ -34,7 +34,7 @@ use core::{ use ref_cast::RefCast; /// Storage key. -#[derive(PartialEq, Eq, RuntimeDebug)] +#[derive(PartialEq, Eq, Debug)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize, Hash, PartialOrd, Ord, Clone, Encode, Decode) @@ -50,7 +50,7 @@ impl AsRef<[u8]> for StorageKey { } /// Storage key with read/write tracking information. -#[derive(PartialEq, Eq, Ord, PartialOrd, core::hash::Hash, RuntimeDebug, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Ord, PartialOrd, core::hash::Hash, Debug, Clone, Encode, Decode)] pub struct TrackedStorageKey { pub key: Vec, pub reads: u32, @@ -98,7 +98,7 @@ impl From> for TrackedStorageKey { } /// Storage key of a child trie, it contains the prefix to the key. -#[derive(PartialEq, Eq, RuntimeDebug)] +#[derive(PartialEq, Eq, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize, Hash, PartialOrd, Ord, Clone))] #[repr(transparent)] #[derive(RefCast)] @@ -139,7 +139,7 @@ impl PrefixedStorageKey { } /// Storage data associated to a [`StorageKey`]. -#[derive(PartialEq, Eq, RuntimeDebug)] +#[derive(PartialEq, Eq, Debug)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize, Hash, PartialOrd, Ord, Clone, Encode, Decode, Default) @@ -176,7 +176,7 @@ pub struct Storage { } /// Storage change set -#[derive(RuntimeDebug)] +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize, PartialEq, Eq, Clone))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] pub struct StorageChangeSet { diff --git a/substrate/primitives/weights/src/lib.rs b/substrate/primitives/weights/src/lib.rs index b2c956266e2c..07babc584129 100644 --- a/substrate/primitives/weights/src/lib.rs +++ b/substrate/primitives/weights/src/lib.rs @@ -53,7 +53,7 @@ pub mod constants { /// /// NOTE: This is currently only measured in computational time, and will probably /// be updated all together once proof size is accounted for. -#[derive(Clone, Copy, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode, TypeInfo)] +#[derive(Clone, Copy, Eq, PartialEq, Default, Debug, Encode, Decode, TypeInfo)] pub struct RuntimeDbWeight { pub read: u64, pub write: u64, diff --git a/substrate/test-utils/runtime/src/lib.rs b/substrate/test-utils/runtime/src/lib.rs index 370aa0034fcd..463ae4734a7c 100644 --- a/substrate/test-utils/runtime/src/lib.rs +++ b/substrate/test-utils/runtime/src/lib.rs @@ -134,7 +134,7 @@ pub fn native_version() -> NativeVersion { } /// Transfer data extracted from Extrinsic containing `Balances::transfer_allow_death`. -#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct TransferData { pub from: AccountId, pub to: AccountId, @@ -239,7 +239,7 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; -#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, Debug, TypeInfo)] pub struct CheckSubstrateCall; impl sp_runtime::traits::Printable for CheckSubstrateCall { From 39b0d19b2b303f727835c60f0b2481101fb0e7ac Mon Sep 17 00:00:00 2001 From: Falco Hirschenberger Date: Mon, 29 Apr 2024 16:25:05 +0200 Subject: [PATCH 2/2] Also change derive attributes of enums --- .../extensions/refund_relayer_extension.rs | 4 ++-- .../runtime-common/src/messages_call_ext.rs | 2 +- bridges/modules/messages/src/outbound_lane.rs | 2 +- .../header-chain/src/justification/mod.rs | 2 +- .../src/justification/verification/mod.rs | 4 ++-- bridges/primitives/messages/src/lib.rs | 6 +++--- bridges/primitives/runtime/src/lib.rs | 4 ++-- bridges/snowbridge/pallets/system/src/lib.rs | 2 +- .../snowbridge/primitives/beacon/src/bls.rs | 2 +- .../snowbridge/primitives/beacon/src/types.rs | 4 ++-- .../snowbridge/primitives/core/src/inbound.rs | 4 ++-- .../primitives/core/src/operating_mode.rs | 2 +- .../primitives/core/src/outbound.rs | 4 ++-- .../primitives/router/src/inbound/mod.rs | 8 ++++---- .../src/unincluded_segment.rs | 2 +- cumulus/pallets/xcmp-queue/src/lib.rs | 2 +- .../assets/asset-hub-rococo/src/lib.rs | 2 +- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../runtimes/assets/common/src/runtime_api.rs | 2 +- .../bridge-hubs/common/src/digest_item.rs | 2 +- .../collectives-westend/src/lib.rs | 2 +- .../people/people-rococo/src/people.rs | 2 +- .../people/people-westend/src/people.rs | 2 +- cumulus/primitives/core/src/lib.rs | 6 +++--- polkadot/parachain/src/primitives.rs | 2 +- polkadot/primitives/src/v7/mod.rs | 20 +++++++++---------- .../runtime/common/src/assigned_slots/mod.rs | 2 +- polkadot/runtime/common/src/claims.rs | 4 +--- polkadot/runtime/common/src/crowdloan/mod.rs | 2 +- polkadot/runtime/common/src/impls.rs | 4 +--- polkadot/runtime/common/src/purchase.rs | 2 +- .../parachains/src/assigner_on_demand/mod.rs | 2 +- polkadot/runtime/parachains/src/disputes.rs | 8 ++++---- .../runtime/parachains/src/inclusion/mod.rs | 4 ++-- polkadot/runtime/parachains/src/paras/mod.rs | 6 +++--- .../parachains/src/scheduler/common.rs | 2 +- polkadot/runtime/rococo/src/lib.rs | 12 +---------- polkadot/runtime/westend/src/lib.rs | 12 +---------- substrate/bin/node/runtime/src/lib.rs | 2 +- substrate/frame/alliance/src/lib.rs | 4 ++-- substrate/frame/alliance/src/types.rs | 12 +---------- substrate/frame/assets/src/types.rs | 8 ++++---- substrate/frame/balances/src/tests/mod.rs | 12 +---------- substrate/frame/balances/src/types.rs | 4 ++-- substrate/frame/bounties/src/lib.rs | 2 +- .../frame/broker/src/coretime_interface.rs | 4 +--- substrate/frame/broker/src/types.rs | 4 ++-- substrate/frame/child-bounties/src/lib.rs | 2 +- substrate/frame/collective/src/lib.rs | 2 +- substrate/frame/contracts/src/lib.rs | 6 +++--- substrate/frame/contracts/src/primitives.rs | 8 +++----- .../frame/contracts/src/storage/meter.rs | 6 +++--- substrate/frame/contracts/src/wasm/mod.rs | 2 +- substrate/frame/contracts/src/wasm/runtime.rs | 2 +- .../frame/conviction-voting/src/conviction.rs | 12 +---------- substrate/frame/conviction-voting/src/vote.rs | 4 ++-- substrate/frame/core-fellowship/src/lib.rs | 2 +- substrate/frame/democracy/src/conviction.rs | 12 +---------- substrate/frame/democracy/src/types.rs | 4 ++-- substrate/frame/democracy/src/vote.rs | 4 ++-- substrate/frame/elections-phragmen/src/lib.rs | 2 +- substrate/frame/identity/src/legacy.rs | 2 +- substrate/frame/identity/src/types.rs | 4 ++-- substrate/frame/nfts/src/types.rs | 18 ++++++++--------- substrate/frame/nomination-pools/src/lib.rs | 6 +++--- substrate/frame/preimage/src/lib.rs | 4 ++-- substrate/frame/proxy/src/tests.rs | 2 +- substrate/frame/ranked-collective/src/lib.rs | 2 +- substrate/frame/referenda/src/types.rs | 2 +- substrate/frame/safe-mode/src/mock.rs | 2 +- substrate/frame/salary/src/lib.rs | 2 +- substrate/frame/society/src/lib.rs | 6 +++--- substrate/frame/staking/src/lib.rs | 4 ++-- substrate/frame/staking/src/migrations.rs | 2 +- substrate/frame/support/src/dispatch.rs | 6 +++--- .../frame/support/src/traits/messages.rs | 4 ++-- .../frame/support/src/traits/preimages.rs | 2 +- .../frame/support/src/traits/schedule.rs | 6 +++--- .../src/traits/tokens/fungible/union_of.rs | 2 +- .../frame/support/src/traits/tokens/misc.rs | 18 ++++++++--------- .../frame/support/src/traits/tokens/pay.rs | 2 +- substrate/frame/system/src/lib.rs | 8 ++++---- .../frame/transaction-payment/src/lib.rs | 2 +- substrate/frame/treasury/src/lib.rs | 2 +- substrate/frame/tx-pause/src/mock.rs | 2 +- substrate/frame/vesting/src/lib.rs | 2 +- .../primitives/consensus/babe/src/digests.rs | 6 ++---- .../primitives/consensus/babe/src/lib.rs | 2 +- .../primitives/consensus/grandpa/src/lib.rs | 2 +- substrate/primitives/core/src/lib.rs | 2 +- substrate/primitives/core/src/offchain/mod.rs | 6 +++--- .../primitives/debug-derive/tests/tests.rs | 2 +- .../merkle-mountain-range/src/lib.rs | 4 ++-- .../primitives/npos-elections/src/lib.rs | 2 +- .../primitives/runtime/src/generic/block.rs | 2 +- .../primitives/runtime/src/generic/digest.rs | 4 ++-- substrate/primitives/runtime/src/lib.rs | 4 ++-- .../primitives/runtime/src/offchain/http.rs | 4 ++-- .../primitives/runtime/src/runtime_string.rs | 2 +- .../runtime/src/transaction_validity.rs | 8 ++++---- substrate/primitives/staking/src/lib.rs | 2 +- .../statement-store/src/runtime_api.rs | 4 ++-- .../primitives/test-primitives/src/lib.rs | 2 +- 103 files changed, 187 insertions(+), 259 deletions(-) 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>),