From a267c60930b3a33568ec96f8f508fe0f2b4d1134 Mon Sep 17 00:00:00 2001 From: georgepisaltu Date: Fri, 24 Nov 2023 19:42:45 +0200 Subject: [PATCH] Revert metadata renames Signed-off-by: georgepisaltu --- .../src/construct_runtime/expand/metadata.rs | 2 +- .../frame/support/test/tests/construct_runtime.rs | 2 +- substrate/primitives/metadata-ir/src/types.rs | 12 ++++++------ substrate/primitives/metadata-ir/src/v14.rs | 2 +- substrate/primitives/metadata-ir/src/v15.rs | 2 +- substrate/primitives/runtime/src/traits/mod.rs | 2 +- .../runtime/src/traits/transaction_extension/mod.rs | 5 +++-- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/substrate/frame/support/procedural/src/construct_runtime/expand/metadata.rs b/substrate/frame/support/procedural/src/construct_runtime/expand/metadata.rs index c20aee92033e..f55ca677d89c 100644 --- a/substrate/frame/support/procedural/src/construct_runtime/expand/metadata.rs +++ b/substrate/frame/support/procedural/src/construct_runtime/expand/metadata.rs @@ -128,7 +128,7 @@ pub fn expand_runtime_metadata( .map(|meta| #scrate::__private::metadata_ir::TransactionExtensionMetadataIR { identifier: meta.identifier, ty: meta.ty, - implicit: meta.implicit, + additional_signed: meta.additional_signed, }) .collect(), }, diff --git a/substrate/frame/support/test/tests/construct_runtime.rs b/substrate/frame/support/test/tests/construct_runtime.rs index b8341b25cb09..c0cd98def8d2 100644 --- a/substrate/frame/support/test/tests/construct_runtime.rs +++ b/substrate/frame/support/test/tests/construct_runtime.rs @@ -815,7 +815,7 @@ fn test_metadata() { ty: meta_type::(), version: 4, signed_extensions: vec![SignedExtensionMetadata { - identifier: "UnitSignedExtension", + identifier: "UnitTransactionExtension", ty: meta_type::<()>(), additional_signed: meta_type::<()>(), }], diff --git a/substrate/primitives/metadata-ir/src/types.rs b/substrate/primitives/metadata-ir/src/types.rs index 7e9ae6efe186..e60881ed6b8d 100644 --- a/substrate/primitives/metadata-ir/src/types.rs +++ b/substrate/primitives/metadata-ir/src/types.rs @@ -189,15 +189,15 @@ impl IntoPortable for ExtrinsicMetadataIR { } } -/// Metadata of an extrinsic's transaction extension. +/// Metadata of an extrinsic's signed extension. #[derive(Clone, PartialEq, Eq, Encode, Debug)] pub struct TransactionExtensionMetadataIR { - /// The unique transaction extension identifier, which may be different from the type name. + /// The unique signed extension identifier, which may be different from the type name. pub identifier: T::String, - /// The type of the transaction extension, with the data to be included in the extrinsic. + /// The type of the signed extension, with the data to be included in the extrinsic. pub ty: T::Type, - /// The type of the implicit data, with the data to be included in the signed payload. - pub implicit: T::Type, + /// The type of the additional signed data, with the data to be included in the signed payload. + pub additional_signed: T::Type, } impl IntoPortable for TransactionExtensionMetadataIR { @@ -207,7 +207,7 @@ impl IntoPortable for TransactionExtensionMetadataIR { TransactionExtensionMetadataIR { identifier: self.identifier.into_portable(registry), ty: registry.register_type(&self.ty), - implicit: registry.register_type(&self.implicit), + additional_signed: registry.register_type(&self.additional_signed), } } } diff --git a/substrate/primitives/metadata-ir/src/v14.rs b/substrate/primitives/metadata-ir/src/v14.rs index 70e84532add9..ec08de347862 100644 --- a/substrate/primitives/metadata-ir/src/v14.rs +++ b/substrate/primitives/metadata-ir/src/v14.rs @@ -142,7 +142,7 @@ impl From for SignedExtensionMetadata { SignedExtensionMetadata { identifier: ir.identifier, ty: ir.ty, - additional_signed: ir.implicit, + additional_signed: ir.additional_signed, } } } diff --git a/substrate/primitives/metadata-ir/src/v15.rs b/substrate/primitives/metadata-ir/src/v15.rs index 4b3b6106d27f..dc5ce1c88fdf 100644 --- a/substrate/primitives/metadata-ir/src/v15.rs +++ b/substrate/primitives/metadata-ir/src/v15.rs @@ -92,7 +92,7 @@ impl From for SignedExtensionMetadata { SignedExtensionMetadata { identifier: ir.identifier, ty: ir.ty, - additional_signed: ir.implicit, + additional_signed: ir.additional_signed, } } } diff --git a/substrate/primitives/runtime/src/traits/mod.rs b/substrate/primitives/runtime/src/traits/mod.rs index 6d5329df253a..2d3e203b0d64 100644 --- a/substrate/primitives/runtime/src/traits/mod.rs +++ b/substrate/primitives/runtime/src/traits/mod.rs @@ -1602,7 +1602,7 @@ pub trait SignedExtension: sp_std::vec![TransactionExtensionMetadata { identifier: Self::IDENTIFIER, ty: scale_info::meta_type::(), - implicit: scale_info::meta_type::() + additional_signed: scale_info::meta_type::() }] } diff --git a/substrate/primitives/runtime/src/traits/transaction_extension/mod.rs b/substrate/primitives/runtime/src/traits/transaction_extension/mod.rs index 54171cee2080..e99b2d730e60 100644 --- a/substrate/primitives/runtime/src/traits/transaction_extension/mod.rs +++ b/substrate/primitives/runtime/src/traits/transaction_extension/mod.rs @@ -92,7 +92,7 @@ pub trait TransactionExtensionBase: TransactionExtensionInterior { identifier: Self::IDENTIFIER, ty: scale_info::meta_type::(), // TODO: Metadata-v16: Rename to "implicit" - implicit: scale_info::meta_type::() + additional_signed: scale_info::meta_type::() }] } } @@ -361,7 +361,8 @@ pub struct TransactionExtensionMetadata { /// The type of the [`TransactionExtension`]. pub ty: MetaType, /// The type of the [`TransactionExtension`] additional signed data for the payload. - pub implicit: MetaType, + // TODO: Rename "implicit" + pub additional_signed: MetaType, } #[impl_for_tuples(1, 12)]