Skip to content

Commit

Permalink
delete Transaction Metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
CapCap authored and aptos-bot committed Mar 13, 2022
1 parent e2b018b commit 8dda1fc
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 53 deletions.
13 changes: 1 addition & 12 deletions documentation/specifications/transactions/onchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>>),
}
```

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

Expand Down
1 change: 0 additions & 1 deletion testsuite/generate-format/src/aptos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ pub fn get_registry() -> Result<Registry> {
// 2. Trace the main entry point(s) + every enum separately.
tracer.trace_type::<contract_event::ContractEvent>(&samples)?;
tracer.trace_type::<language_storage::TypeTag>(&samples)?;
tracer.trace_type::<transaction::metadata::Metadata>(&samples)?;
tracer.trace_type::<transaction::Transaction>(&samples)?;
tracer.trace_type::<transaction::TransactionArgument>(&samples)?;
tracer.trace_type::<transaction::VecBytes>(&samples)?;
Expand Down
12 changes: 0 additions & 12 deletions testsuite/generate-format/tests/staged/aptos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ HashValue:
NEWTYPESTRUCT: BYTES
Identifier:
NEWTYPESTRUCT: STR
Metadata:
ENUM:
0:
Undefined: UNIT
1:
UnstructuredBytesMetadata:
NEWTYPE:
TYPENAME: UnstructuredBytesMetadata
Module:
STRUCT:
- code: BYTES
Expand Down Expand Up @@ -249,10 +241,6 @@ TypeTag:
Struct:
NEWTYPE:
TYPENAME: StructTag
UnstructuredBytesMetadata:
STRUCT:
- metadata:
OPTION: BYTES
VecBytes:
NEWTYPESTRUCT:
SEQ: BYTES
Expand Down
24 changes: 0 additions & 24 deletions types/src/transaction/metadata.rs

This file was deleted.

1 change: 0 additions & 1 deletion types/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions types/src/unit_tests/transaction_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down

0 comments on commit 8dda1fc

Please sign in to comment.