diff --git a/documentation/specifications/transactions/onchain/README.md b/documentation/specifications/transactions/onchain/README.md index 44cb62eb06348..248108d91bd39 100644 --- a/documentation/specifications/transactions/onchain/README.md +++ b/documentation/specifications/transactions/onchain/README.md @@ -4,18 +4,7 @@ Diem transactions mutate and create state (or resources) within the set of [on-c ## Peer to Peer Payments and Transaction Metadata -Most transactions will use the [peer_to_peer_with_metadata script function](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/script_documentation/script_documentation.md#0x1_PaymentScripts_peer_to_peer_with_metadata). This single transaction represents all current transfers between two participants and distinguishes the types of transfers via the embedded metadata. - -The metadata is represented by the following `Rust` enum encoded in [Binary Canonical Serialization (BCS)](https://github.com/diem/bcs): - -``` -enum Metadata { - Undefined, - UnstructuredByteMetadata(Option>), -} -``` - -Note: This is the canonical list and should be referred to in future DIPs so that authors need not reproduce the list in future DIPs. +Most transactions will use the [peer_to_peer_with_metadata script function](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/script_documentation/script_documentation.md#0x1_PaymentScripts_peer_to_peer_with_metadata). This single transaction represents all current transfers between two participants. ## Dual Attestation Credentials diff --git a/testsuite/generate-format/src/aptos.rs b/testsuite/generate-format/src/aptos.rs index 3934f773f94c2..6868849ec51d4 100644 --- a/testsuite/generate-format/src/aptos.rs +++ b/testsuite/generate-format/src/aptos.rs @@ -55,7 +55,6 @@ pub fn get_registry() -> Result { // 2. Trace the main entry point(s) + every enum separately. tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; - tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; diff --git a/testsuite/generate-format/tests/staged/aptos.yaml b/testsuite/generate-format/tests/staged/aptos.yaml index 623f827fc53c1..62d2a1928bb17 100644 --- a/testsuite/generate-format/tests/staged/aptos.yaml +++ b/testsuite/generate-format/tests/staged/aptos.yaml @@ -69,14 +69,6 @@ HashValue: NEWTYPESTRUCT: BYTES Identifier: NEWTYPESTRUCT: STR -Metadata: - ENUM: - 0: - Undefined: UNIT - 1: - UnstructuredBytesMetadata: - NEWTYPE: - TYPENAME: UnstructuredBytesMetadata Module: STRUCT: - code: BYTES @@ -249,10 +241,6 @@ TypeTag: Struct: NEWTYPE: TYPENAME: StructTag -UnstructuredBytesMetadata: - STRUCT: - - metadata: - OPTION: BYTES VecBytes: NEWTYPESTRUCT: SEQ: BYTES diff --git a/types/src/transaction/metadata.rs b/types/src/transaction/metadata.rs deleted file mode 100644 index fc37072c26065..0000000000000 --- a/types/src/transaction/metadata.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// SPDX-License-Identifier: Apache-2.0 - -//! This file implements Diem transaction metadata types to allow -//! easy parsing and introspection into metadata, whether the transaction -//! is using regular subaddressing, is subject to travel rule or corresponds -//! to an on-chain payment refund. - -use serde::{Deserialize, Serialize}; - -/// List of all supported metadata types -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -pub enum Metadata { - Undefined, - UnstructuredBytesMetadata(UnstructuredBytesMetadata), -} - -/// Opaque binary transaction metadata -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -pub struct UnstructuredBytesMetadata { - /// Unstructured byte vector metadata - #[serde(with = "serde_bytes")] - pub metadata: Option>, -} diff --git a/types/src/transaction/mod.rs b/types/src/transaction/mod.rs index 55c03726bf646..433d8bbdd9633 100644 --- a/types/src/transaction/mod.rs +++ b/types/src/transaction/mod.rs @@ -40,7 +40,6 @@ use std::{ pub mod authenticator; mod change_set; pub mod helpers; -pub mod metadata; mod module; mod script; mod transaction_argument; diff --git a/types/src/unit_tests/transaction_test.rs b/types/src/unit_tests/transaction_test.rs index 6b5b1b8e4a02d..26a0eb0a8e546 100644 --- a/types/src/unit_tests/transaction_test.rs +++ b/types/src/unit_tests/transaction_test.rs @@ -6,9 +6,8 @@ use crate::{ account_config::XUS_NAME, chain_id::ChainId, transaction::{ - metadata, AccountTransactionsWithProof, RawTransaction, Script, SignedTransaction, - Transaction, TransactionInfo, TransactionListWithProof, TransactionPayload, - TransactionWithProof, + AccountTransactionsWithProof, RawTransaction, Script, SignedTransaction, Transaction, + TransactionInfo, TransactionListWithProof, TransactionPayload, TransactionWithProof, }, }; use aptos_crypto::{