diff --git a/tips/TIP-0053/tip-0053.md b/tips/TIP-0053/tip-0053.md new file mode 100644 index 000000000..b541169bf --- /dev/null +++ b/tips/TIP-0053/tip-0053.md @@ -0,0 +1,82 @@ +--- +tip: 53 +title: Tagged Data Payload +description: Block payload for arbitrary data +author: Philipp Gackstatter (@PhilippGackstatter) +discussions-to: https://github.com/iotaledger/tips/pull/156 +status: Draft +type: Standards +layer: Core +created: 2023-11-02 +replaces: 23 +--- + +# Summary + +This TIP is a slightly revised version of TIP-23 with updates to IOTA 2.0, like the type prefix of the _Tagged Data_ +Payload type and its syntactic validation. The payload concept offers a very flexible way to combine and encapsulate +information in the IOTA protocol. This document proposes a basic payload type that allows the addition of arbitrary +data. + +# Motivation + +The most flexible way to extend an existing object is by the addition of arbitrary data. This payload provides a way to +do just that. An optional tag can be used to categorize the data. + +# Specification + +## Tagged Data + +The following table describes the serialization of a _Tagged Data Payload_ following the notation from +[TIP-21](../TIP-0021/tip-0021.md): + +
+ Tagged Data +
Optional Data with an optional Tag.
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Name + + Type + + Description +
Payload Typeuint8Set to value 0 to denote a Tagged Data Payload.
Tag(uint8)ByteArrayThe tag of the data.
Data(uint32)ByteArrayBinary data.
+ +It is important to note that `Tag` is not considered by the protocol, it just serves as a marker for second layer +applications. + +## Syntactic Validation + +- The length `Len` of the `Tag` field must satisfy: `0 <= Len <= 64`. +- The length `Len` of the `Data` field must satisfy: `0 <= Len <= 8192`. + +# Rationale + +As the tag is not considered by the protocol, it could also be removed completely. However, Legacy IOTA and Chrysalis +supported sending of arbitrary data indexed with a tag. Thus, in order to simplify the migration of second layer +applications using these protocols, the optional `Tag` has been added which can be used in a similar manner. + +# Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).