From 6351cf10ce8cc63a90ec6862ad37c83a9cb49c78 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Tue, 28 Jul 2020 14:43:01 +0200 Subject: [PATCH 01/35] adds signed transaction payload RFC --- .../0000-signed-transaction-payload.md | 862 ++++++++++++++++++ 1 file changed, 862 insertions(+) create mode 100644 text/0000-signed-transaction-payload/0000-signed-transaction-payload.md diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md new file mode 100644 index 000000000..9bd667e5e --- /dev/null +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -0,0 +1,862 @@ +--- +tags: RFC, draft +--- +# Draft RFC: Signed Transaction Payload + ++ Feature name: signed_transaction_payload ++ Start date: 2020-07-10 ++ RFC PR: [iotaledger/protocol-rfcs#18](https://github.com/iotaledger/protocol-rfcs/pull/18) + +# Summary + +This RFC defines a new transaction structure for Chrysalis Phase 2, which replaces the current notion of bundles. Specifically, this RFC describes the transaction payload to be embedded into a [message](https://github.com/iotaledger/protocol-rfcs/pull/17). + +# Motivation + +The current IOTA protocol uses so-called **transactions** (which are vertices in the Tangle), where each transaction defines either an input or output. A grouping of those input/output transaction vertices make up a so-called **bundle** which transfers the given values as an atomic unit (the entire bundle is applied or none of it). The input transactions define the funds to consume to create the deposits onto the output transactions target addresses. Additionally, to accommodate the rather big WOTS signatures, additional transaction vertices might be part of the bundle in order to carry parts of the signature which don't fit into one transaction vertex. + +The bundle concept has proven to be tedious, spawning a plethora of problems: +* Since the data making up the bundle is split across multiple vertices, it complicates the validation of the entire transfer. Instead of being able to immediately tell whether a bundle is valid or not, a node implementation must first collect all parts of the bundle before any actual validation can happen. This increases the complexity of the node implementation immensely. +* Reattaching the tail transaction of a bundle causes the entire transfer to be reapplied. +* Due to the split across multiple transaction vertices and having to do PoW for each of them, a created bundle might already be lazy in terms of where it attaches, reducing its chances to get confirmed. + +To fix the problems mentioned above and creating a more flexible transaction structure, we want to achieve a self-contained transaction structure defining the data of the entire transfer as a payload to be embedded into a message. + +The new transaction structure should fulfill following criteria: +* Support for Ed25519 (and thus reusable addresses) and WOTS signatures. +* Support for adding new types of signature schemes, addresses, inputs and outputs as part of protocol upgrades. +* Self-contained as in being able to validate the transaction immediately after receiving it. +* Enable unspent transaction outputs (UTXO) as inputs instead of an account based model. (UTXO enables easier double-spend detection) + +# Detailed design + +## UTXO + +The *unspent transaction output* (UTXO) model defines a ledger state where balances are not directly associated to addresses but to the outputs of transactions. In this model, transactions specify the outputs of previous transactions as inputs, which are consumed in order to create new outputs. A transaction must consume the entirety of the specified inputs. + +Using an UTXO based model provides several benefits: +* Parallel validation of transactions. +* Easier double-spend detection, since conflicting transactions would reference the same UTXO. +* Replay-protection which is especially important when having reusable addresses. Replaying the same transaction would manifest itself as already being applied or existent and thus not have any impact. +* Technically seen, balances are no longer associated to addresses which raises the level of abstraction and thus enables other types of outputs. Consider for example a type of output which specifies the balance to be unlocked by a transaction using this output which must fulfill a very hard Proof-of-Work difficulty or supply some other unlock criteria etc. + +Within a transaction using UTXOs, inputs and outputs make up the to be signed data of the transaction. The section unlocking the inputs is called *unlock block*. An unlock block may contain a signature proving ownership of a given input's address and/or other unlock criteria. + +The following image depicts the flow of funds using UTXO: + +![UTXO flow](https://i.imgur.com/h3uxf6N.png) + +The way UTXOs are referenced is further described in the Structure section of this RFC. + +## Structure + +### Serialized Layout + +A Signed Transaction payload is made up of two parts: +1. The Unsigned Transaction part which contains the inputs, outputs and an optional embedded payload. +2. The Unlock Blocks which unlock the Unsigned Transaction's inputs. In case the unlock block contains a signature, it signs the entire Unsigned Transaction part. + +All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. + +Following table structure describes the entirety of a Signed Transaction payload's serialized form: +
+ Data Types + + + + + + + + + + + + + + + + + + + + + + + + + + +
NotationSizeDescription
byte1 byteAn unsigned 8-bit integer.
varintvariable + A numerical value using N amount of bytes needed to represent its value. See docs on the Protocol Buffers site. +
ByteArray1 varint (length) + L * bytesA variable sized array of bytes where the leading varint L denotes the size of the array.
ByteArray[N]N * bytesA fixed sized array of bytes (without a leading varint N denoting the size of the array).
i.e. ByteArray[32]: A byte array with 32 bytes.
+
+ +
+ Subschema Notation + + + + + + + + + + + + + + + + + +
NameDescription
oneOfOne of the listed subschemas.
optOneOfOptionally one of the listed subschemas.
anyOfAny (one or more) of the listed subschemas.
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Payload Typevarint + Set to value 0 to denote a Signed Transaction payload. +
Transaction oneOf +
+ Unsigned Transaction +
+ Describes the essence data making up a transaction by defining its inputs and outputs and an optional payload. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Transaction Typebyte/varint + Set to value 0 to denote an Unsigned Transaction. +
Inputs Countbyte/varintThe amount of inputs proceeding.
Inputs anyOf +
+ UTXO Input +
+ Describes an input which references an unspent transaction output to consume. +
+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Input Typebyte/varint + Set to value 0 to denote an UTXO Input. +
Transaction IDByteArray[32]The BLAKE2b-256 hash of the transaction from which the UTXO comes from.
Transaction Output Indexbyte/varintThe index of the output on the referenced transaction to consume.
+
+
Outputs Countbyte/varintThe amount of outputs proceeding.
Outputs anyOf +
+ SigLockedSingleDeposit +
+ Describes a deposit to a single address which is unlocked via a signature. +
+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Output Typebyte/varint + Set to value 0 to denote a SigLockedSingleDeposit. +
Address oneOf +
+ Ed25519 Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typebyte/varint + Set to value 0 to denote an Ed25519 Address. +
AddressByteArray[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
+
+
+ WOTS Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typebyte/varint + Set to value 1 to denote a WOTS Address. +
AddressByteArray[49]The T5B1 encoded WOTS address.
+
+
Amountuint64The amount of tokens to deposit with this SigLockedSingleDeposit output.
+
+
Payload Lengthbyte/varintThe length in bytes of the optional payload.
Payload optOneOf +
+ Unsigned Data Payload +
+ Describes a payload containing data without any specification what the data means. +
+ + + + + + + + + + + + + + + + +
NameTypeDescription
Payload Typebyte/varint + Set to value 2 to denote an Unsigned Data payload. +
DataByteArrayThe data of the Unsigned Data payload.
+
+
+ Signed Data Payload +
+ Describes a payload containing signed data (and its corresponding Ed25519 public key and signature) without + any specification what the data means. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Payload Typebyte/varint + Set to value 3 to denote an Signed Data payload. +
DataByteArrayThe data of the Signed Data payload.
Public KeyByteArray[32]The Ed25519 public key used to verify the signature.
SignatureByteArray[64]The signature signing the data.
+
+
+ Indexation Payload +
+ Describes a payload which is used to instruct the node to index the Message + of which it is part of. +
+ + + + + + + + + + + + + + + + +
NameTypeDescription
Payload Typebyte/varint + Set to value 4 to denote an Indexation payload. +
TagByteArray[16]The tag which is used to index the Signed Transaction's hash.
+
+
+
+
Unlock Blocks Countbyte/varintThe count of unlock blocks proceeding. Must match count of inputs specified.
Unlock Blocks anyOf +
+ Signature Unlock Block +
+ Defines an unlock block containing signature(s) unlocking input(s). +
+ + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typebyte/varint + Set to value 0 to denote a Signature Unlock Block. +
Signature oneOf +
+ Ed25519 Signature + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Signature Typebyte/varint + Set to value 0 to denote an Ed25519 Signature. +
Public keyByteArray[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureByteArray[64]The signature signing the serialized Unsigned Transaction.
+
+
+ WOTS Signature + + + + + + + + + + + + + + + + +
NameTypeDescription
Signature Typebyte/varint + Set to value 1 to denote a WOTS Signature. +
SignatureByteArrayThe signature signing the serialized Unsigned Transaction.
+
+
+
+
+ Reference Unlock Block +
+ References a previous unlock block in order to substitute the duplication of the same unlock block data for inputs which unlock through the same data. +
+ + + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typebyte/varint + Set to value 1 to denote a Reference Unlock Block. +
ReferencevarintRepresents the index of a previous unlock block.
+
+
+ +### Transaction Parts + +In general, all parts of a Signed Transaction begin with a byte describing the type of the given part in order to keep the flexibility to introduce new types/versions of the given part in the future. + +#### Unsigned Transaction / Essence Data + +As described, the Unsigned Transaction of a Signed Transaction carries the inputs, outputs and an optional payload. The Unsigned Transaction is an explicit type of transaction and therefore starts with its own Transaction Type byte which is of value 0. + +An Unsigned Transaction must contain at least one input and output. + +##### Inputs + +The Inputs part holds the inputs to consume, respectively to fund the outputs of the Unsigned Transaction. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. + +Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Signed Transaction. If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the previous Unlock Block. This ensures that no duplicate data needs to occur in the same transaction. + +###### UTXO Input + +
+ Format + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Input Typebyte/varint + Set to value 0 to denote a UTXO Input. +
Transaction IDByteArray[64]The transaction reference from which the UTXO comes from.
Transaction Output Indexbyte/varintThe index of the output on the referenced transaction to consume.
+
+

+ +An UTXO Input is an input which references an output of a previous transaction by using the given transaction's BLAKE2b-256 hash + the index of the output on that transaction. An UTXO Input must be accompanied by an Unlock Block for the corresponding type of output the UTXO Input is referencing. + +Example: If the output the input references outputs to an Ed25519 address, then the corresponding unlock block must be of type Signature Unlock Block holding an Ed25519 signature. + +##### Outputs + +The Outputs part holds the outputs to create with this Unsigned Transaction. There is only one type of output as of now, the SigLockedSingleDeposit. + +###### SigLockedSingleDeposit + +
+ Format + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Output Typebyte/varint + Set to value 0 to denote a SigLockedSingleDeposit. +
Address (oneOf) +
+ Ed25519 Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typebyte/varint + Set to value 0 to denote an Ed25519 Address. +
AddressByteArray[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
+
+
+ WOTS Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typebyte/varint + Set to value 1 to denote a WOTS Address. +
AddressByteArray[49]The T5B1 encoded WOTS address.
+
+
Amountuint64The amount of tokens to deposit with this SigLockedSingleDeposit output.
+
+ +

+ +The SigLockedSingleDeposit defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. Such output can hold addresses of different types. + +##### Payload + +The payload part of an Unsigned Transaction can hold an optional payload. This payload does not affect the validity of the Unsigned Transaction. If the transaction is not valid, then the payload must also be discarded. + +Supported payload types to be embedded into an Unsigned Transaction: + +| Name | Type Value | +| --------------------- | ---------- | +| Unsigned Data Payload | 2 | +| Signed Data Payload | 3 | +| Indexation Payload | 4 | + +#### Unlock Blocks + +The Unlock Blocks part holds the unlock blocks unlocking inputs within an Unsigned Transaction. + +There are different types of Unlock Blocks: + + + + + + + + + + + + + + + + +
NameValueDescription
Signature Unlock Block0An unlock block holding one or more signatures unlocking one or more inputs.
Reference Unlock Block1An unlock block which must reference a previous unlock block which unlocks also the input at the same index as this Reference Unlock Block.
+ +##### Signature Unlock Block + +
+ Format + + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typebyte/varint + Set to value 0 to denote a Signature Unlock Block. +
Signature oneOf +
+ Ed25519 Signature + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Signature Typebyte/varint + Set to value 0 to denote an Ed25519 Signature. +
Public keyByteArray[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureByteArray[64]The signature signing the serialized Unsigned Transaction.
+
+
+ WOTS Signature + + + + + + + + + + + + + + + + +
NameTypeDescription
Signature Typebyte/varint + Set to value 1 to denote a WOTS Signature. +
SignatureByteArrayThe signature signing the serialized Unsigned Transaction.
+
+
+
+ +A Signature Unlock Block defines an Unlock Block which holds one or more signatures unlocking one or more inputs. Such block signs the entire Unsigned Transaction part of a Signed Transaction including the optional payload. + +##### Reference Unlock block + +
+ Format + + + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typebyte/varint + Set to value 1 to denote a Reference Unlock Block. +
ReferencevarintRepresents the index of a previous unlock block.
+
+ +A Reference Unlock Block defines an Unlock Block which references a previous Unlock Block (which must not be another Reference Unlock Block). It must be used if multiple inputs can be unlocked through the same origin Unlock Block. + +Example: +Consider an Unsigned Transaction containing UTXO Inputs A, B and C, where A and C are both spending the UTXOs originating from the same Ed25519 address. The Unlock Block part must thereby have following structure: + +| Index | Must Contain | +| ----- | ---------------------------------------------------------------------------------------------------------------- | +| 0 | A Signature Unlock Block holding the corresponding Ed25519 signature to unlock A and C. | +| 1 | A Signature Unlock Block which unlocks B. | +| 2 | A Reference Unlock Block which references index 0, since C also gets unlocked by the same signature as A. | + +## Validation + +A Signed Transaction payload has different validation stages, since some validation steps can only be executed if certain information becomes present, respectively should have become present. We therefore distinguish between syntactical- and semantic validation. + +### Syntactical Validation + +This validation can commence as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be further broadcasted and can be discarded right away. + +Following criteria defines whether the transaction passes the syntactical validation: +* `Transaction Type` value must be 0, denoting an `Unsigned Transaction`. +* Inputs: + * `Inputs Count` must be 0 < x < 127. + * At least one input must be specified. + * `Input Type` value must be 0, denoting an `UTXO Input`. + * `UTXO Input`: + * `Transaction Output Index` must be 0 ≤ x < 127. + * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. + * Inputs must be in lexicographical order of their serialized form.1 +* Outputs: + * `Outputs Count` must be 0 < x < 127. + * At least one output must be specified. + * `Output Type` must be 0, denoting a `SigLockedSingleDeposit`. + * `SigLockedSingleDeposit`: + * `Address Type` must either be 0 or 1, denoting an `Ed25519`- or `WOTS address`. + * If `Address` is of type `WOTS address`, its bytes must be valid `T5B1` bytes. + * The `Address` must be unique in the set of `SigLockedSingleDeposits`. + * `Amount` must be > 0. + * Outputs must be in lexicographical order by their serialized form.1 + * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. +* `Payload Length` must be 0 (to indicate that there's no payload) or be valid for the specified payload type. +* `Payload Type` must be one of the supported payload types if `Payload Length` is not 0. +* `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x ≤ 127. +* `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. +* `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature` and be unique. +* `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. +* Given the type and length information, the Signed Transaction must consume the entire byte array the `Payload Length` field in the Message defines. + +1 ensures that serialization of the transaction becomes deterministic, meaning that libraries always produce the same bytes given the logical transaction. + +### Semantic Validation + +Semantic validation starts when a message which is part of a confirmation cone of a milestone, is processed in the [White-Flag ordering](https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering which can be understood by all the nodes (i.e. milestone cones), no matter in which order transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. + + +Processing transactions in the White-Flag ordering enables users to spend UTXOs which are in the same milestone confirmation cone, if their transaction comes after the funding transaction in the mentioned White-Flag ordering. It is recommended that users spending unconfirmed UTXOs attach their message directly onto the message containing the source transaction. + +Following criteria defines whether the transaction passes the semantic validation: +1. The UTXOs the transaction references must be known (booked) and unspent. +1. The transaction is spending the entirety of the funds of the referenced UTXOs to the ouputs. +1. The address type of the referenced UTXO must match the signature type contained in the corresponding Signature Unlock Block. +1. The Signature Unlock Blocks are valid, i.e. the signatures prove ownership over the addresses of the referenced UTXOs. +1. Signature Unlock Blocks unlocking multiple inputs must only appear once (be unique) at same index of the first input it unlocks. All other inputs unlocked by the same Signature Unlock Block must have a companion Reference Unlock Block at the same index as the corresponding input which points to the origin Signature Unlock Block. + +If a transaction passes the semantic validation, its referenced UTXOs must be marked as spent and the corresponding new outputs must be booked/specified in the ledger. The booked transaction then also becomes part of the White-Flag Merkle tree inclusion set. + +Transactions which do not pass semantic validation are ignored. Their UTXOs are not marked as spent and neither are their outputs booked into the ledger. + +## Miscellaneous + +### Absent transaction timestamp + +A transaction timestamp whether signed or not, does not actually tell when the transaction was issued. Therefore the timestamp has been left out from the transaction structure. The correct way to determine the issuance time is to use a combination of the solidification and confirmation timestamps of the message embedding the transaction. + +### How to compute the balance + +Since the ledger no longer is account based, meaning that balances are directly mapped to addresses, computing the balance involves iterating over all UTXOs of which their destination address is the address in question and then accumulating their amounts. + +### Reusing the same address with Ed25519 + +While creating multiple signatures with Ed25519 does not reduce security, reusing the same address over and over again not only drastically reduces the privacy of yourself but also all other people in the UTXO chain of the moved funds. Applications and services are therefore instructed to create new addresses per deposit, in order to circumvent the privacy issues stemming from address reuse. In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) why the same should be applied to donation addresses. + +# Drawbacks + +The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it including client libraries, blueprints, PoC and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade in order to further participate in the network. + +Local snapshots can also no longer be simply represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices and then the destination addresses plus the balances. + +# Rationale and alternatives + +Introducing this new transaction structure allows for further extensions in the future, in order to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case funds appear to be deposited onto a previous generated address. Due to the switch to a complete binary transaction, size is further reduced, saving network bandwidth and processing time. The new structure is backwards compatible with "Kerl" WOTS addresses and therefore allows both current methods of signing transactions to co-exist. + +Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would have not been safe against replay attacks, deeming reusing the old transaction structure for example for Ed25519 addresses/signatures as infeasible. + +Not switching to the new transaction structure described in this RFC leads to people being open to loss of funds because of WOTS address re-use and not being able to properly extend the protocol further down the line. + +# Unresolved questions + +- What parts of the design do you expect to resolve through the RFC process + before this gets merged? +- What parts of the design do you expect to resolve through the implementation + of this feature before stabilization? +- What related issues do you consider out of scope for this RFC that could be + addressed in the future independently of the solution that comes out of this + RFC? \ No newline at end of file From 846bf74558f10e385b1a78877dacd14028a39d42 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Tue, 28 Jul 2020 14:45:12 +0200 Subject: [PATCH 02/35] removes hackmd headers --- .../0000-signed-transaction-payload.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 9bd667e5e..952043015 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -1,8 +1,3 @@ ---- -tags: RFC, draft ---- -# Draft RFC: Signed Transaction Payload - + Feature name: signed_transaction_payload + Start date: 2020-07-10 + RFC PR: [iotaledger/protocol-rfcs#18](https://github.com/iotaledger/protocol-rfcs/pull/18) From 4584870ae658db3a3b5aa34f1863ca86ff9aef77 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Tue, 28 Jul 2020 20:16:16 +0200 Subject: [PATCH 03/35] normalizes RFC --- .../0000-signed-transaction-payload.md | 152 +++++++----------- 1 file changed, 60 insertions(+), 92 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 952043015..6eed6e61a 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -33,7 +33,7 @@ Using an UTXO based model provides several benefits: * Parallel validation of transactions. * Easier double-spend detection, since conflicting transactions would reference the same UTXO. * Replay-protection which is especially important when having reusable addresses. Replaying the same transaction would manifest itself as already being applied or existent and thus not have any impact. -* Technically seen, balances are no longer associated to addresses which raises the level of abstraction and thus enables other types of outputs. Consider for example a type of output which specifies the balance to be unlocked by a transaction using this output which must fulfill a very hard Proof-of-Work difficulty or supply some other unlock criteria etc. +* Technically seen, balances may no longer be associated to addresses which raises the level of abstraction and thus enables other types of outputs. Consider for example a type of output which specifies the balance to be unlocked by a transaction which must fulfill a very hard Proof-of-Work difficulty or supply some other unlock criteria etc. Within a transaction using UTXOs, inputs and outputs make up the to be signed data of the transaction. The section unlocking the inputs is called *unlock block*. An unlock block may contain a signature proving ownership of a given input's address and/or other unlock criteria. @@ -54,40 +54,8 @@ A Signed Transaction payload is made up of two parts: All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. Following table structure describes the entirety of a Signed Transaction payload's serialized form: -
- Data Types - - - - - - - - - - - - - - - - - - - - - - - - - - -
NotationSizeDescription
byte1 byteAn unsigned 8-bit integer.
varintvariable - A numerical value using N amount of bytes needed to represent its value. See docs on the Protocol Buffers site. -
ByteArray1 varint (length) + L * bytesA variable sized array of bytes where the leading varint L denotes the size of the array.
ByteArray[N]N * bytesA fixed sized array of bytes (without a leading varint N denoting the size of the array).
i.e. ByteArray[32]: A byte array with 32 bytes.
-
- -
+* [Data Type Notation](https://github.com/GalRogozinski/protocol-rfcs/blob/message/text/0017-message/0017-message.md#data-types) +*
Subschema Notation @@ -114,7 +82,7 @@ Following table structure describes the entirety of a Signed Transaction
- + @@ -134,7 +102,7 @@ Following table structure describes the entirety of a Signed Transaction
NameTypeType Description
- + @@ -160,7 +128,7 @@ Following table structure describes the entirety of a Signed Transaction
NameName Type Description
- + @@ -200,7 +168,7 @@ Following table structure describes the entirety of a Signed Transaction
NameName Type Description
- + @@ -215,10 +183,10 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -534,7 +534,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa - + @@ -556,7 +556,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa - + @@ -629,7 +629,7 @@ There are different types of Unlock Blocks: - + @@ -647,7 +647,7 @@ There are different types of Unlock Blocks: - + @@ -669,7 +669,7 @@ There are different types of Unlock Blocks: - + @@ -705,7 +705,7 @@ A Signature Unlock Block defines an Unlock Block which holds one o - + From c4597ac5238ad9fbc6432f46104b9626e17248c8 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Thu, 30 Jul 2020 19:19:33 +0200 Subject: [PATCH 05/35] fixes address type ordering --- .../0000-signed-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 0d03d338e..6a6e756e6 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -752,7 +752,7 @@ Following criteria defines whether the transaction passes the syntactical valida * At least one output must be specified. * `Output Type` must be 0, denoting a `SigLockedSingleDeposit`. * `SigLockedSingleDeposit`: - * `Address Type` must either be 0 or 1, denoting an `Ed25519`- or `WOTS address`. + * `Address Type` must either be 0 or 1, denoting a `WOTS`- or `Ed25519` address . * If `Address` is of type `WOTS address`, its bytes must be valid `T5B1` bytes. * The `Address` must be unique in the set of `SigLockedSingleDeposits`. * `Amount` must be > 0. From 15739aa0938ea668522608ac4e0180a823298007 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Fri, 31 Jul 2020 12:10:31 +0200 Subject: [PATCH 06/35] replaces sentence with bad grammer with Charlie's suggestion --- .../0000-signed-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 6a6e756e6..3a6b56e14 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -731,7 +731,7 @@ Consider an Unsigned Transaction containing UTXO Inputs A, B and C ## Validation -A Signed Transaction payload has different validation stages, since some validation steps can only be executed if certain information becomes present, respectively should have become present. We therefore distinguish between syntactical- and semantic validation. +A Signed Transaction payload has different validation stages, since some validation steps can only be executed at the point when certain information has (or has not) been received. We therefore distinguish between syntactical- and semantic validation. ### Syntactical Validation From 2ee7b0fe36f263a4317886194081a701efd3f697 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Mon, 17 Aug 2020 08:09:52 +0200 Subject: [PATCH 07/35] fixes wrong denotation value --- .../0000-signed-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 3a6b56e14..4922aba68 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -216,7 +216,7 @@ Following table structure describes the entirety of a Signed Transaction From 3d4e7cebd650fe47cbce50f0b61cb29a2b4868b5 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Fri, 4 Sep 2020 15:56:45 +0200 Subject: [PATCH 08/35] use fixed size integers --- .../0000-signed-transaction-payload.md | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 4922aba68..4d5c3276a 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -87,7 +87,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -108,14 +108,14 @@ Following table structure describes the entirety of a Signed Transaction - + - + @@ -134,7 +134,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -146,7 +146,7 @@ Following table structure describes the entirety of a Signed Transaction - +
NameName Type Description
Address oneOf
- Ed25519 Address + WOTS Address - + @@ -226,21 +194,21 @@ Following table structure describes the entirety of a Signed Transaction - - + +
NameName Type Description
Address Type byte/varint - Set to value 0 to denote an Ed25519 Address. + Set to value 0 to denote a WOTS Address.
AddressByteArray[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.ByteArray[49]The T5B1 encoded WOTS address.
- WOTS Address + Ed25519 Address - + @@ -248,13 +216,13 @@ Following table structure describes the entirety of a Signed Transaction - - + +
NameName Type Description
Address Type byte/varint - Set to value 1 to denote a WOTS Address. + Set to value 0 to denote an Ed25519 Address.
AddressByteArray[49]The T5B1 encoded WOTS address.ByteArray[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
@@ -399,8 +367,8 @@ Following table structure describes the entirety of a Signed Transaction
Signature oneOf -
- Ed25519 Signature +
+ WOTS Signature @@ -411,23 +379,18 @@ Following table structure describes the entirety of a Signed Transaction - - - - - - +
Name Signature Type byte/varint - Set to value 0 to denote an Ed25519 Signature. + Set to value 0 to denote a WOTS Signature.
Public keyByteArray[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureByteArray[64]ByteArray The signature signing the serialized Unsigned Transaction.
-
- WOTS Signature +
+ Ed25519 Signature @@ -438,12 +401,17 @@ Following table structure describes the entirety of a Signed Transaction + + + + + - +
Name Signature Type byte/varint - Set to value 1 to denote a WOTS Signature. + Set to value 1 to denote an Ed25519 Signature.
Public keyByteArray[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureByteArrayByteArray[64] The signature signing the serialized Unsigned Transaction.
@@ -503,7 +471,7 @@ Each defined input must be accompanied by a corresponding Unlock Block at Format - + @@ -542,7 +510,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa Format
NameName Type Description
- + @@ -557,10 +525,10 @@ The Outputs part holds the outputs to create with this Unsigned Transa - + @@ -174,7 +174,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -192,7 +192,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -214,7 +214,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -239,7 +239,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -258,7 +258,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -284,7 +284,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -320,7 +320,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -340,7 +340,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -359,7 +359,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -377,7 +377,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -399,7 +399,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -433,7 +433,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -477,7 +477,7 @@ Each defined input must be accompanied by a corresponding Unlock Block at - + @@ -489,7 +489,7 @@ Each defined input must be accompanied by a corresponding Unlock Block at - +
NameName Type Description
Address (oneOf)
- Ed25519 Address + WOTS Address - + @@ -568,21 +536,21 @@ The Outputs part holds the outputs to create with this Unsigned Transa - - + +
NameName Type Description
Address Type byte/varint - Set to value 0 to denote an Ed25519 Address. + Set to value 0 to denote a WOTS Address.
AddressByteArray[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.ByteArray[49]The T5B1 encoded WOTS address.
- WOTS Address + Ed25519 Address - + @@ -590,13 +558,13 @@ The Outputs part holds the outputs to create with this Unsigned Transa - - + +
NameName Type Description
Address Type byte/varint - Set to value 1 to denote a WOTS Address. + Set to value 1 to denote an Ed25519 Address.
AddressByteArray[49]The T5B1 encoded WOTS address.ByteArray[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
@@ -633,7 +601,7 @@ The Unlock Blocks part holds the unlock blocks unlocking inputs within an There are different types of Unlock Blocks: - + @@ -669,8 +637,8 @@ There are different types of Unlock Blocks: - + - + @@ -134,7 +134,7 @@ Following table structure describes the entirety of a Signed Transaction - + @@ -146,7 +146,7 @@ Following table structure describes the entirety of a Signed Transaction - +
NameName Value Description
Signature oneOf -
- Ed25519 Signature +
+ WOTS Signature @@ -681,23 +649,18 @@ There are different types of Unlock Blocks: - - - - - - +
NameSignature Type byte/varint - Set to value 0 to denote an Ed25519 Signature. + Set to value 0 to denote a WOTS Signature.
Public keyByteArray[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureByteArray[64]ByteArray The signature signing the serialized Unsigned Transaction.
-
- WOTS Signature +
+ Ed25519 Signature @@ -708,12 +671,17 @@ There are different types of Unlock Blocks: + + + + + - +
NameSignature Type byte/varint - Set to value 1 to denote a WOTS Signature. + Set to value 1 to denote an Ed25519 Signature.
Public keyByteArray[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureByteArrayByteArray[64] The signature signing the serialized Unsigned Transaction.
@@ -792,9 +760,10 @@ Following criteria defines whether the transaction passes the syntactical valida * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. * `Payload Length` must be 0 (to indicate that there's no payload) or be valid for the specified payload type. * `Payload Type` must be one of the supported payload types if `Payload Length` is not 0. -* `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x ≤ 127. +* `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x < 127. * `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. -* `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature` and be unique. +* `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature`. +* A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. * Given the type and length information, the Signed Transaction must consume the entire byte array the `Payload Length` field in the Message defines. @@ -809,10 +778,9 @@ Processing transactions in the White-Flag ordering enables users to spend UTXOs Following criteria defines whether the transaction passes the semantic validation: 1. The UTXOs the transaction references must be known (booked) and unspent. -1. The transaction is spending the entirety of the funds of the referenced UTXOs to the ouputs. +1. The transaction is spending the entirety of the funds of the referenced UTXOs to the outputs. 1. The address type of the referenced UTXO must match the signature type contained in the corresponding Signature Unlock Block. 1. The Signature Unlock Blocks are valid, i.e. the signatures prove ownership over the addresses of the referenced UTXOs. -1. Signature Unlock Blocks unlocking multiple inputs must only appear once (be unique) at same index of the first input it unlocks. All other inputs unlocked by the same Signature Unlock Block must have a companion Reference Unlock Block at the same index as the corresponding input which points to the origin Signature Unlock Block. If a transaction passes the semantic validation, its referenced UTXOs must be marked as spent and the corresponding new outputs must be booked/specified in the ledger. The booked transaction then also becomes part of the White-Flag Merkle tree inclusion set. From ad14f75f6de7ef3680fed01645875852f5786147 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Tue, 28 Jul 2020 20:23:00 +0200 Subject: [PATCH 04/35] normalize to varint --- .../0000-signed-transaction-payload.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 6eed6e61a..0d03d338e 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -108,14 +108,14 @@ Following table structure describes the entirety of a Signed Transaction
Transaction Typebyte/varintvarint Set to value 0 to denote an Unsigned Transaction.
Inputs Countbyte/varintvarint The amount of inputs proceeding.
Input Typebyte/varintvarint Set to value 0 to denote an UTXO Input.
Transaction Output Indexbyte/varintvarint The index of the output on the referenced transaction to consume.
@@ -155,7 +155,7 @@ Following table structure describes the entirety of a Signed Transaction
Outputs Countbyte/varintvarint The amount of outputs proceeding.
Output Typebyte/varintvarint Set to value 0 to denote a SigLockedSingleDeposit.
Address Typebyte/varintvarint Set to value 0 to denote a WOTS Address.
Address Typebyte/varintvarint Set to value 0 to denote an Ed25519 Address.
Payload Lengthbyte/varintvarint The length in bytes of the optional payload.
Payload Typebyte/varintvarint Set to value 2 to denote an Unsigned Data payload.
Payload Typebyte/varintvarint Set to value 3 to denote an Signed Data payload.
Payload Typebyte/varintvarint Set to value 4 to denote an Indexation payload.
Unlock Blocks Countbyte/varintvarint The count of unlock blocks proceeding. Must match count of inputs specified.
Unlock Typebyte/varintvarint Set to value 0 to denote a Signature Unlock Block.
Signature Typebyte/varintvarint Set to value 0 to denote a WOTS Signature.
Signature Typebyte/varintvarint Set to value 1 to denote an Ed25519 Signature.
Unlock Typebyte/varintvarint Set to value 1 to denote a Reference Unlock Block.
Input Typebyte/varintvarint Set to value 0 to denote a UTXO Input.
Transaction Output Indexbyte/varintvarint The index of the output on the referenced transaction to consume.
@@ -516,7 +516,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa
Output Typebyte/varintvarint Set to value 0 to denote a SigLockedSingleDeposit.
Address Typebyte/varintvarint Set to value 0 to denote a WOTS Address.
Address Typebyte/varintvarint Set to value 1 to denote an Ed25519 Address.
Unlock Typebyte/varintvarint Set to value 0 to denote a Signature Unlock Block.
Signature Typebyte/varintvarint Set to value 0 to denote a WOTS Signature.
Signature Typebyte/varintvarint Set to value 1 to denote an Ed25519 Signature.
Unlock Typebyte/varintvarint Set to value 1 to denote a Reference Unlock Block. Address Type varint - Set to value 0 to denote an Ed25519 Address. + Set to value 1 to denote an Ed25519 Address.
Payload Typevarintuint16 Set to value 0 to denote a Signed Transaction payload.
Transaction Typevarintuint8 Set to value 0 to denote an Unsigned Transaction.
Inputs Countvarintuint16 The amount of inputs proceeding.
Input Typevarintuint8 Set to value 0 to denote an UTXO Input.
Transaction Output Indexvarintuint16 The index of the output on the referenced transaction to consume.
@@ -155,7 +155,7 @@ Following table structure describes the entirety of a Signed Transaction Outputs Count - varint + uint16 The amount of outputs proceeding. @@ -174,7 +174,7 @@ Following table structure describes the entirety of a Signed Transaction Output Type - varint + uint8 Set to value 0 to denote a SigLockedSingleDeposit. @@ -192,7 +192,7 @@ Following table structure describes the entirety of a Signed Transaction Address Type - varint + uint8 Set to value 0 to denote a WOTS Address. @@ -214,7 +214,7 @@ Following table structure describes the entirety of a Signed Transaction Address Type - varint + uint8 Set to value 1 to denote an Ed25519 Address. @@ -239,7 +239,7 @@ Following table structure describes the entirety of a Signed Transaction Payload Length - varint + uint32 The length in bytes of the optional payload. @@ -258,7 +258,7 @@ Following table structure describes the entirety of a Signed Transaction Payload Type - varint + uint16 Set to value 2 to denote an Unsigned Data payload. @@ -284,7 +284,7 @@ Following table structure describes the entirety of a Signed Transaction Payload Type - varint + uint16 Set to value 3 to denote an Signed Data payload. @@ -320,7 +320,7 @@ Following table structure describes the entirety of a Signed Transaction Payload Type - varint + uint16 Set to value 4 to denote an Indexation payload. @@ -340,7 +340,7 @@ Following table structure describes the entirety of a Signed Transaction Unlock Blocks Count - varint + uint16 The count of unlock blocks proceeding. Must match count of inputs specified. @@ -359,7 +359,7 @@ Following table structure describes the entirety of a Signed Transaction Unlock Type - varint + uint8 Set to value 0 to denote a Signature Unlock Block. @@ -377,7 +377,7 @@ Following table structure describes the entirety of a Signed Transaction Signature Type - varint + uint8 Set to value 0 to denote a WOTS Signature. @@ -399,7 +399,7 @@ Following table structure describes the entirety of a Signed Transaction Signature Type - varint + uint8 Set to value 1 to denote an Ed25519 Signature. @@ -433,14 +433,14 @@ Following table structure describes the entirety of a Signed Transaction Unlock Type - varint + uint8 Set to value 1 to denote a Reference Unlock Block. Reference - varint + uint16 Represents the index of a previous unlock block. @@ -468,7 +468,7 @@ Each defined input must be accompanied by a corresponding Unlock Block at ###### UTXO Input
- Format + UTXO Input @@ -477,19 +477,19 @@ Each defined input must be accompanied by a corresponding Unlock Block at - + - - + + - +
Name
Input Typevarintuint8 - Set to value 0 to denote a UTXO Input. + Set to value 0 to denote an UTXO Input.
Transaction IDByteArray[64]The transaction reference from which the UTXO comes from.ByteArray[32]The BLAKE2b-256 hash of the transaction from which the UTXO comes from.
Transaction Output Indexvarintuint16 The index of the output on the referenced transaction to consume.
@@ -506,8 +506,11 @@ The Outputs part holds the outputs to create with this Unsigned Transa ###### SigLockedSingleDeposit -
- Format +
+ SigLockedSingleDeposit +
+ Describes a deposit to a single address which is unlocked via a signature. +
@@ -516,13 +519,13 @@ The Outputs part holds the outputs to create with this Unsigned Transa - + - + - + @@ -556,7 +559,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa - + @@ -629,7 +632,7 @@ There are different types of Unlock Blocks: - + @@ -647,7 +650,7 @@ There are different types of Unlock Blocks: - + @@ -669,7 +672,7 @@ There are different types of Unlock Blocks: - + @@ -705,14 +708,14 @@ A Signature Unlock Block defines an Unlock Block which holds one o - + - +
Name
Output Typevarintuint8 Set to value 0 to denote a SigLockedSingleDeposit.
Address (oneOf)Address oneOf
WOTS Address @@ -534,7 +537,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa
Address Typevarintuint8 Set to value 0 to denote a WOTS Address.
Address Typevarintuint8 Set to value 1 to denote an Ed25519 Address.
Unlock Typevarintuint8 Set to value 0 to denote a Signature Unlock Block.
Signature Typevarintuint8 Set to value 0 to denote a WOTS Signature.
Signature Typevarintuint8 Set to value 1 to denote an Ed25519 Signature.
Unlock Typevarintuint8 Set to value 1 to denote a Reference Unlock Block.
Referencevarintuint16 Represents the index of a previous unlock block.
From b84920b839b06486cd58460c0b3fba1e2ff6a574 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Mon, 7 Sep 2020 11:20:48 +0200 Subject: [PATCH 09/35] remove non-existing payload types --- .../0000-signed-transaction-payload.md | 76 +++---------------- 1 file changed, 9 insertions(+), 67 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 4d5c3276a..0edd49d8e 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -87,7 +87,7 @@ Following table structure describes the entirety of a Signed Transaction Payload Type - uint16 + uint32 Set to value 0 to denote a Signed Transaction payload. @@ -245,67 +245,6 @@ Following table structure describes the entirety of a Signed Transaction Payload optOneOf -
- Unsigned Data Payload -
- Describes a payload containing data without any specification what the data means. -
- - - - - - - - - - - - - - - - -
NameTypeDescription
Payload Typeuint16 - Set to value 2 to denote an Unsigned Data payload. -
DataByteArrayThe data of the Unsigned Data payload.
-
-
- Signed Data Payload -
- Describes a payload containing signed data (and its corresponding Ed25519 public key and signature) without - any specification what the data means. -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Payload Typeuint16 - Set to value 3 to denote an Signed Data payload. -
DataByteArrayThe data of the Signed Data payload.
Public KeyByteArray[32]The Ed25519 public key used to verify the signature.
SignatureByteArray[64]The signature signing the data.
-
Indexation Payload
@@ -320,11 +259,16 @@ Following table structure describes the entirety of a Signed Transaction Payload Type - uint16 + uint32 - Set to value 4 to denote an Indexation payload. + Set to value 2 to denote an Indexation payload. + + Index + ByteArray[uint16] + The tag which is used to index the message containing this transaction. + Tag ByteArray[16] @@ -593,9 +537,7 @@ Supported payload types to be embedded into an Unsigned Transaction: | Name | Type Value | | --------------------- | ---------- | -| Unsigned Data Payload | 2 | -| Signed Data Payload | 3 | -| Indexation Payload | 4 | +| Indexation Payload | 2 | #### Unlock Blocks From 30d5d5a446a0ee6e52a9a52a0b18176deccc8f01 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Mon, 7 Sep 2020 11:53:45 +0200 Subject: [PATCH 10/35] reduce embedded payload table --- .../0000-signed-transaction-payload.md | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 0edd49d8e..dbdff0291 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -247,34 +247,6 @@ Following table structure describes the entirety of a Signed Transaction
Indexation Payload -
- Describes a payload which is used to instruct the node to index the Message - of which it is part of. -
- - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Payload Typeuint32 - Set to value 2 to denote an Indexation payload. -
IndexByteArray[uint16]The tag which is used to index the message containing this transaction.
TagByteArray[16]The tag which is used to index the Signed Transaction's hash.
From e33bc0aac0c1371611b657b369081b38c4af18db Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Wed, 7 Oct 2020 09:29:59 +0200 Subject: [PATCH 11/35] normalize array types, renames signed transaction payload to transaction payload and unsigned transaction to transaction essence --- .../0000-signed-transaction-payload.md | 88 ++++++++++--------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index dbdff0291..580db27ce 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -1,4 +1,4 @@ -+ Feature name: signed_transaction_payload ++ Feature name: transaction_payload + Start date: 2020-07-10 + RFC PR: [iotaledger/protocol-rfcs#18](https://github.com/iotaledger/protocol-rfcs/pull/18) @@ -47,13 +47,13 @@ The way UTXOs are referenced is further described in the Structure sectio ### Serialized Layout -A Signed Transaction payload is made up of two parts: -1. The Unsigned Transaction part which contains the inputs, outputs and an optional embedded payload. -2. The Unlock Blocks which unlock the Unsigned Transaction's inputs. In case the unlock block contains a signature, it signs the entire Unsigned Transaction part. +A Transaction Payload payload is made up of two parts: +1. The The Transaction Essence part which contains the inputs, outputs and an optional embedded payload. +2. The Unlock Blocks which unlock the Transaction Essence's inputs. In case the unlock block contains a signature, it signs the entire Transaction Essence part. All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. -Following table structure describes the entirety of a Signed Transaction payload's serialized form: +Following table structure describes the entirety of a Transaction Payload's serialized form: * [Data Type Notation](https://github.com/GalRogozinski/protocol-rfcs/blob/message/text/0017-message/0017-message.md#data-types) *
Subschema Notation @@ -89,14 +89,14 @@ Following table structure describes the entirety of a Signed Transaction Payload Type uint32 - Set to value 0 to denote a Signed Transaction payload. + Set to value 0 to denote a Transaction Payload. Transaction oneOf
- Unsigned Transaction + Transaction Essence
Describes the essence data making up a transaction by defining its inputs and outputs and an optional payload.
@@ -110,7 +110,7 @@ Following table structure describes the entirety of a Signed Transaction Transaction Type uint8 - Set to value 0 to denote an Unsigned Transaction. + Set to value 0 to denote a Transaction Essence. @@ -141,7 +141,7 @@ Following table structure describes the entirety of a Signed Transaction Transaction ID - ByteArray[32] + Array<byte>[32] The BLAKE2b-256 hash of the transaction from which the UTXO comes from. @@ -199,7 +199,7 @@ Following table structure describes the entirety of a Signed Transaction Address - ByteArray[49] + Array<byte>[49] The T5B1 encoded WOTS address. @@ -221,7 +221,7 @@ Following table structure describes the entirety of a Signed Transaction Address - ByteArray[32] + Array<byte>[32] The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key. @@ -300,8 +300,8 @@ Following table structure describes the entirety of a Signed Transaction Signature - ByteArray - The signature signing the serialized Unsigned Transaction. + Array<byte> + The signature signing the serialized Transaction Essence.
@@ -322,13 +322,13 @@ Following table structure describes the entirety of a Signed Transaction Public key - ByteArray[32] + Array<byte>[32] The public key of the Ed25519 keypair which is used to verify the signature. Signature - ByteArray[64] - The signature signing the serialized Unsigned Transaction. + Array<byte>[64] + The signature signing the serialized Transaction Essence.
@@ -367,19 +367,22 @@ Following table structure describes the entirety of a Signed Transaction ### Transaction Parts -In general, all parts of a Signed Transaction begin with a byte describing the type of the given part in order to keep the flexibility to introduce new types/versions of the given part in the future. +In general, all parts of a Transaction Payload begin with a byte describing the type of the given part in order to keep the flexibility to introduce new types/versions of the given part in the future. -#### Unsigned Transaction / Essence Data +#### Transaction Essence Data -As described, the Unsigned Transaction of a Signed Transaction carries the inputs, outputs and an optional payload. The Unsigned Transaction is an explicit type of transaction and therefore starts with its own Transaction Type byte which is of value 0. +As described, the Transaction Essence of a Transaction Payload carries the inputs, outputs and an optional payload. The Transaction Essence is an explicit type and therefore starts with its own Transaction Essence Type byte which is of value 0. -An Unsigned Transaction must contain at least one input and output. +A Transaction Essence must contain at least one input and output. ##### Inputs -The Inputs part holds the inputs to consume, respectively to fund the outputs of the Unsigned Transaction. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. +The Inputs part holds the inputs to consume, respectively to fund the outputs of the Transaction Essence. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. -Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Signed Transaction. If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the previous Unlock Block. This ensures that no duplicate data needs to occur in the same transaction. +Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. +If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. +Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the previous Unlock Block. +This ensures that no duplicate data needs to occur in the same transaction. ###### UTXO Input @@ -400,7 +403,7 @@ Each defined input must be accompanied by a corresponding Unlock Block at Transaction ID - ByteArray[32] + Array<byte>[32] The BLAKE2b-256 hash of the transaction from which the UTXO comes from. @@ -418,7 +421,7 @@ Example: If the output the input references outputs to an Ed25519 address, then ##### Outputs -The Outputs part holds the outputs to create with this Unsigned Transaction. There is only one type of output as of now, the SigLockedSingleDeposit. +The Outputs part holds the outputs to create with this Transaction Payload. There is only one type of output as of now, the SigLockedSingleDeposit. ###### SigLockedSingleDeposit @@ -460,7 +463,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa Address - ByteArray[49] + Array<byte>[49] The T5B1 encoded WOTS address. @@ -482,7 +485,7 @@ The Outputs part holds the outputs to create with this Unsigned Transa Address - ByteArray[32] + Array<byte>[32] The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key. @@ -503,9 +506,9 @@ The SigLockedSingleDeposit defines an output (with a certain amount) to a ##### Payload -The payload part of an Unsigned Transaction can hold an optional payload. This payload does not affect the validity of the Unsigned Transaction. If the transaction is not valid, then the payload must also be discarded. +The payload part of a Transaction Essence can hold an optional payload. This payload does not affect the validity of the Transaction Essence. If the transaction is not valid, then the payload must also be discarded. -Supported payload types to be embedded into an Unsigned Transaction: +Supported payload types to be embedded into a Transaction Essence: | Name | Type Value | | --------------------- | ---------- | @@ -513,7 +516,7 @@ Supported payload types to be embedded into an Unsigned Transaction: #### Unlock Blocks -The Unlock Blocks part holds the unlock blocks unlocking inputs within an Unsigned Transaction. +The Unlock Blocks part holds the unlock blocks unlocking inputs within an Transaction Essence. There are different types of Unlock Blocks: @@ -571,8 +574,8 @@ There are different types of Unlock Blocks: - - + +
SignatureByteArrayThe signature signing the serialized Unsigned Transaction.Array<byte>The signature signing the serialized Transaction Essence.
@@ -593,13 +596,13 @@ There are different types of Unlock Blocks: Public key - ByteArray[32] + Array<byte>[32] The public key of the Ed25519 keypair which is used to verify the signature. Signature - ByteArray[64] - The signature signing the serialized Unsigned Transaction. + Array<byte>[64] + The signature signing the serialized Transaction Essence.
@@ -608,7 +611,8 @@ There are different types of Unlock Blocks:
-A Signature Unlock Block defines an Unlock Block which holds one or more signatures unlocking one or more inputs. Such block signs the entire Unsigned Transaction part of a Signed Transaction including the optional payload. +A Signature Unlock Block defines an Unlock Block which holds one or more signatures unlocking one or more inputs. +Such block signs the entire Transaction Essence part of a Transaction Payload including the optional payload. ##### Reference Unlock block @@ -638,7 +642,7 @@ A Signature Unlock Block defines an Unlock Block which holds one o A Reference Unlock Block defines an Unlock Block which references a previous Unlock Block (which must not be another Reference Unlock Block). It must be used if multiple inputs can be unlocked through the same origin Unlock Block. Example: -Consider an Unsigned Transaction containing UTXO Inputs A, B and C, where A and C are both spending the UTXOs originating from the same Ed25519 address. The Unlock Block part must thereby have following structure: +Consider an Transaction Essence containing UTXO Inputs A, B and C, where A and C are both spending the UTXOs originating from the same Ed25519 address. The Unlock Block part must thereby have following structure: | Index | Must Contain | | ----- | ---------------------------------------------------------------------------------------------------------------- | @@ -648,14 +652,14 @@ Consider an Unsigned Transaction containing UTXO Inputs A, B and C ## Validation -A Signed Transaction payload has different validation stages, since some validation steps can only be executed at the point when certain information has (or has not) been received. We therefore distinguish between syntactical- and semantic validation. +A Transaction Payload payload has different validation stages, since some validation steps can only be executed at the point when certain information has (or has not) been received. We therefore distinguish between syntactical- and semantic validation. ### Syntactical Validation This validation can commence as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be further broadcasted and can be discarded right away. Following criteria defines whether the transaction passes the syntactical validation: -* `Transaction Type` value must be 0, denoting an `Unsigned Transaction`. +* `Transaction Essence Type` value must be 0, denoting an `Transaction Essence`. * Inputs: * `Inputs Count` must be 0 < x < 127. * At least one input must be specified. @@ -682,7 +686,7 @@ Following criteria defines whether the transaction passes the syntactical valida * `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature`. * A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. -* Given the type and length information, the Signed Transaction must consume the entire byte array the `Payload Length` field in the Message defines. +* Given the type and length information, the Transaction Payload must consume the entire byte array the `Payload Length` field in the Message defines. 1 ensures that serialization of the transaction becomes deterministic, meaning that libraries always produce the same bytes given the logical transaction. @@ -715,11 +719,13 @@ Since the ledger no longer is account based, meaning that balances are directly ### Reusing the same address with Ed25519 -While creating multiple signatures with Ed25519 does not reduce security, reusing the same address over and over again not only drastically reduces the privacy of yourself but also all other people in the UTXO chain of the moved funds. Applications and services are therefore instructed to create new addresses per deposit, in order to circumvent the privacy issues stemming from address reuse. In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) why the same should be applied to donation addresses. +While creating multiple signatures with Ed25519 does not reduce security, reusing the same address over and over again not only drastically reduces the privacy of yourself but also all other people in the UTXO chain of the moved funds. Applications and services are therefore instructed to create new addresses per deposit, in order to circumvent the privacy issues stemming from address reuse. +In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. +Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) why the same should be applied to donation addresses. # Drawbacks -The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it including client libraries, blueprints, PoC and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade in order to further participate in the network. +The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it, including client libraries, blueprints, PoC and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade in order to further participate in the network. Local snapshots can also no longer be simply represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices and then the destination addresses plus the balances. From 28c0cdca9cd150e40c68624bb91dc643bef7c786 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Wed, 7 Oct 2020 09:32:44 +0200 Subject: [PATCH 12/35] renames SigLockedSingleDeposit to SigLockedSingleOutput --- .../0000-signed-transaction-payload.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md index 580db27ce..756ca020f 100644 --- a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md +++ b/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md @@ -162,7 +162,7 @@ Following table structure describes the entirety of a Transaction Payload Outputs anyOf
- SigLockedSingleDeposit + SigLockedSingleOutput
Describes a deposit to a single address which is unlocked via a signature.
@@ -176,7 +176,7 @@ Following table structure describes the entirety of a Transaction Payload Output Type uint8 - Set to value 0 to denote a SigLockedSingleDeposit. + Set to value 0 to denote a SigLockedSingleOutput. @@ -231,7 +231,7 @@ Following table structure describes the entirety of a Transaction Payload Amount uint64 - The amount of tokens to deposit with this SigLockedSingleDeposit output. + The amount of tokens to deposit with this SigLockedSingleOutput output.
@@ -421,12 +421,12 @@ Example: If the output the input references outputs to an Ed25519 address, then ##### Outputs -The Outputs part holds the outputs to create with this Transaction Payload. There is only one type of output as of now, the SigLockedSingleDeposit. +The Outputs part holds the outputs to create with this Transaction Payload. There is only one type of output as of now, the SigLockedSingleOutput. -###### SigLockedSingleDeposit +###### SigLockedSingleOutput
- SigLockedSingleDeposit + SigLockedSingleOutput
Describes a deposit to a single address which is unlocked via a signature.
@@ -440,7 +440,7 @@ The Outputs part holds the outputs to create with this Transaction Pay Output Type uint8 - Set to value 0 to denote a SigLockedSingleDeposit. + Set to value 0 to denote a SigLockedSingleOutput. @@ -495,14 +495,14 @@ The Outputs part holds the outputs to create with this Transaction Pay Amount uint64 - The amount of tokens to deposit with this SigLockedSingleDeposit output. + The amount of tokens to deposit with this SigLockedSingleOutput output.

-The SigLockedSingleDeposit defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. Such output can hold addresses of different types. +The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. Such output can hold addresses of different types. ##### Payload @@ -671,11 +671,11 @@ Following criteria defines whether the transaction passes the syntactical valida * Outputs: * `Outputs Count` must be 0 < x < 127. * At least one output must be specified. - * `Output Type` must be 0, denoting a `SigLockedSingleDeposit`. - * `SigLockedSingleDeposit`: + * `Output Type` must be 0, denoting a `SigLockedSingleOutput`. + * `SigLockedSingleOutput`: * `Address Type` must either be 0 or 1, denoting a `WOTS`- or `Ed25519` address . * If `Address` is of type `WOTS address`, its bytes must be valid `T5B1` bytes. - * The `Address` must be unique in the set of `SigLockedSingleDeposits`. + * The `Address` must be unique in the set of `SigLockedSingleOutputs`. * `Amount` must be > 0. * Outputs must be in lexicographical order by their serialized form.1 * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. From 0631dfe3f42432a7338624dbd8445eac927c7cb4 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Wed, 7 Oct 2020 09:33:23 +0200 Subject: [PATCH 13/35] renames folder and file --- .../0000-transaction-payload.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename text/{0000-signed-transaction-payload/0000-signed-transaction-payload.md => 0000-transaction-payload/0000-transaction-payload.md} (100%) diff --git a/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md similarity index 100% rename from text/0000-signed-transaction-payload/0000-signed-transaction-payload.md rename to text/0000-transaction-payload/0000-transaction-payload.md From faa8857719264f7b028bcf6712c021f5fb0fc6c7 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Wed, 7 Oct 2020 10:45:54 +0200 Subject: [PATCH 14/35] renames the Transaction field to Essence --- text/0000-transaction-payload/0000-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 756ca020f..386a8fe05 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -93,7 +93,7 @@ Following table structure describes the entirety of a Transaction Payload - Transaction oneOf + Essence oneOf
Transaction Essence From 32b0781a04648f4282ffb0ddd23aa73a08441f49 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Thu, 19 Nov 2020 10:48:37 +0100 Subject: [PATCH 15/35] apply suggestions from technical writer Co-authored-by: charlesthompson3 <74603461+charlesthompson3@users.noreply.github.com> --- .../0000-transaction-payload.md | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 386a8fe05..8bab115b4 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -8,34 +8,34 @@ This RFC defines a new transaction structure for Chrysalis Phase 2, which replac # Motivation -The current IOTA protocol uses so-called **transactions** (which are vertices in the Tangle), where each transaction defines either an input or output. A grouping of those input/output transaction vertices make up a so-called **bundle** which transfers the given values as an atomic unit (the entire bundle is applied or none of it). The input transactions define the funds to consume to create the deposits onto the output transactions target addresses. Additionally, to accommodate the rather big WOTS signatures, additional transaction vertices might be part of the bundle in order to carry parts of the signature which don't fit into one transaction vertex. +The current IOTA protocol uses **transactions** (which are vertices in the Tangle), where each transaction defines either an input or output. A grouping of those input/output transaction vertices make up a **bundle** which transfers the given values as an atomic unit (the entire bundle is applied or none of it). The input transactions define the funds to consume and create the deposits onto the output transactions target addresses. Additionally, to accommodate the larger WOTS signatures, additional transaction vertices might be part of the bundle to carry parts of the signature which do not fit into one transaction vertex. -The bundle concept has proven to be tedious, spawning a plethora of problems: -* Since the data making up the bundle is split across multiple vertices, it complicates the validation of the entire transfer. Instead of being able to immediately tell whether a bundle is valid or not, a node implementation must first collect all parts of the bundle before any actual validation can happen. This increases the complexity of the node implementation immensely. +The bundle concept has proven to be time consuming, with several issues as well: +* Since the data making up the bundle is split across multiple vertices, it complicates the validation of the entire transfer. Instead of being able to immediately tell whether a bundle is valid or not, a node implementation must first collect all parts of the bundle before any actual validation can happen. This increases the complexity of the node implementation. * Reattaching the tail transaction of a bundle causes the entire transfer to be reapplied. -* Due to the split across multiple transaction vertices and having to do PoW for each of them, a created bundle might already be lazy in terms of where it attaches, reducing its chances to get confirmed. +* Due to the split across multiple transaction vertices and having to do PoW for each of them, a bundle might already be lazy in terms of where it attaches, reducing its chances to be confirmed. -To fix the problems mentioned above and creating a more flexible transaction structure, we want to achieve a self-contained transaction structure defining the data of the entire transfer as a payload to be embedded into a message. +To fix the problems mentioned above and to create a more flexible transaction structure, the goal is to achieve a self-contained transaction structure defining the data of the entire transfer as a payload to be embedded into a message. -The new transaction structure should fulfill following criteria: +The new transaction structure should fulfil the following criteria: * Support for Ed25519 (and thus reusable addresses) and WOTS signatures. -* Support for adding new types of signature schemes, addresses, inputs and outputs as part of protocol upgrades. -* Self-contained as in being able to validate the transaction immediately after receiving it. -* Enable unspent transaction outputs (UTXO) as inputs instead of an account based model. (UTXO enables easier double-spend detection) +* Support for adding new types of signature schemes, addresses, inputs, and outputs as part of protocol upgrades. +* Self-contained, as in being able to validate the transaction immediately after receiving it. +* Enable unspent transaction outputs (UTXO) as inputs instead of an account based model (UTXO enables easier double-spend detection). # Detailed design ## UTXO -The *unspent transaction output* (UTXO) model defines a ledger state where balances are not directly associated to addresses but to the outputs of transactions. In this model, transactions specify the outputs of previous transactions as inputs, which are consumed in order to create new outputs. A transaction must consume the entirety of the specified inputs. +The *unspent transaction output* (UTXO) model defines a ledger state where balances are not directly associated to addresses but to the outputs of transactions. In this model, transactions specify the outputs of previous transactions as inputs, which are consumed to create new outputs. A transaction must consume the entirety of the specified inputs. Using an UTXO based model provides several benefits: * Parallel validation of transactions. * Easier double-spend detection, since conflicting transactions would reference the same UTXO. -* Replay-protection which is especially important when having reusable addresses. Replaying the same transaction would manifest itself as already being applied or existent and thus not have any impact. -* Technically seen, balances may no longer be associated to addresses which raises the level of abstraction and thus enables other types of outputs. Consider for example a type of output which specifies the balance to be unlocked by a transaction which must fulfill a very hard Proof-of-Work difficulty or supply some other unlock criteria etc. +* Replay-protection which is important when having reusable addresses. Replaying the same transaction would manifest itself as already being applied or existent and thus not have any impact. +* Technically seen, balances may no longer be associated to addresses which raises the level of abstraction and thus enables other types of outputs. Consider, for example, a type of output which specifies the balance to be unlocked by a transaction which must fulfil a Proof-of-Work difficulty or supply some other unlock criteria, etc. -Within a transaction using UTXOs, inputs and outputs make up the to be signed data of the transaction. The section unlocking the inputs is called *unlock block*. An unlock block may contain a signature proving ownership of a given input's address and/or other unlock criteria. +Within a transaction using UTXOs, inputs and outputs make up the to-be-signed data of the transaction. The section unlocking the inputs is called *unlock block*. An unlock block may contain a signature proving ownership of a given input's address and/or other unlock criteria. The following image depicts the flow of funds using UTXO: @@ -367,17 +367,17 @@ Following table structure describes the entirety of a Transaction Payload ### Transaction Parts -In general, all parts of a Transaction Payload begin with a byte describing the type of the given part in order to keep the flexibility to introduce new types/versions of the given part in the future. +In general, all parts of a Transaction Payload begin with a byte describing the type of the given part to keep the flexibility to introduce new types/versions of the given part in the future. #### Transaction Essence Data -As described, the Transaction Essence of a Transaction Payload carries the inputs, outputs and an optional payload. The Transaction Essence is an explicit type and therefore starts with its own Transaction Essence Type byte which is of value 0. +As described, the Transaction Essence of a Transaction Payload carries the inputs, outputs, and an optional payload. The Transaction Essence is an explicit type and therefore starts with its own Transaction Essence Type byte which is of value 0. A Transaction Essence must contain at least one input and output. ##### Inputs -The Inputs part holds the inputs to consume, respectively to fund the outputs of the Transaction Essence. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. +The Inputs part holds the inputs to consume, respectively, to fund the outputs of the Transaction Essence. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. @@ -502,7 +502,7 @@ The Outputs part holds the outputs to create with this Transaction Pay

-The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. Such output can hold addresses of different types. +The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. This output can hold addresses of different types. ##### Payload @@ -612,7 +612,7 @@ There are different types of Unlock Blocks:
A Signature Unlock Block defines an Unlock Block which holds one or more signatures unlocking one or more inputs. -Such block signs the entire Transaction Essence part of a Transaction Payload including the optional payload. +This block signs the entire Transaction Essence part of a Transaction Payload including the optional payload. ##### Reference Unlock block @@ -656,9 +656,9 @@ A Transaction Payload payload has different validation stages, since some ### Syntactical Validation -This validation can commence as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be further broadcasted and can be discarded right away. +This validation can commence as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be broadcasted further and can be discarded right away. -Following criteria defines whether the transaction passes the syntactical validation: +The following criteria defines whether the transaction passes the syntactical validation: * `Transaction Essence Type` value must be 0, denoting an `Transaction Essence`. * Inputs: * `Inputs Count` must be 0 < x < 127. @@ -673,7 +673,7 @@ Following criteria defines whether the transaction passes the syntactical valida * At least one output must be specified. * `Output Type` must be 0, denoting a `SigLockedSingleOutput`. * `SigLockedSingleOutput`: - * `Address Type` must either be 0 or 1, denoting a `WOTS`- or `Ed25519` address . + * `Address Type` must either be 0 or 1, denoting a `WOTS`- or `Ed25519` address. * If `Address` is of type `WOTS address`, its bytes must be valid `T5B1` bytes. * The `Address` must be unique in the set of `SigLockedSingleOutputs`. * `Amount` must be > 0. @@ -684,20 +684,20 @@ Following criteria defines whether the transaction passes the syntactical valida * `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x < 127. * `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. * `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature`. -* A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. +* A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. -* Given the type and length information, the Transaction Payload must consume the entire byte array the `Payload Length` field in the Message defines. +* Given the type and length of the information, the Transaction Payload must consume the entire byte array for the `Payload Length` field in the Message it defines. 1 ensures that serialization of the transaction becomes deterministic, meaning that libraries always produce the same bytes given the logical transaction. ### Semantic Validation -Semantic validation starts when a message which is part of a confirmation cone of a milestone, is processed in the [White-Flag ordering](https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering which can be understood by all the nodes (i.e. milestone cones), no matter in which order transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. +Semantic validation starts when a message that is part of a confirmation cone of a milestone is processed in the [White-Flag ordering](https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering that can be understood by all the nodes (i.e. milestone cones), no matter the order the transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. Processing transactions in the White-Flag ordering enables users to spend UTXOs which are in the same milestone confirmation cone, if their transaction comes after the funding transaction in the mentioned White-Flag ordering. It is recommended that users spending unconfirmed UTXOs attach their message directly onto the message containing the source transaction. -Following criteria defines whether the transaction passes the semantic validation: +The following criteria defines whether the transaction passes the semantic validation: 1. The UTXOs the transaction references must be known (booked) and unspent. 1. The transaction is spending the entirety of the funds of the referenced UTXOs to the outputs. 1. The address type of the referenced UTXO must match the signature type contained in the corresponding Signature Unlock Block. @@ -711,29 +711,29 @@ Transactions which do not pass semantic validation are ignored. Their UTXOs are ### Absent transaction timestamp -A transaction timestamp whether signed or not, does not actually tell when the transaction was issued. Therefore the timestamp has been left out from the transaction structure. The correct way to determine the issuance time is to use a combination of the solidification and confirmation timestamps of the message embedding the transaction. +A transaction timestamp whether signed or not, does not actually tell when the transaction was issued. Therefore, the timestamp has been left out from the transaction structure. The correct way to determine the issuance time is to use a combination of the solidification and confirmation timestamps of the message embedding the transaction. ### How to compute the balance -Since the ledger no longer is account based, meaning that balances are directly mapped to addresses, computing the balance involves iterating over all UTXOs of which their destination address is the address in question and then accumulating their amounts. +Since the ledger is no longer account based, meaning that balances are directly mapped to addresses, computing the balance involves iterating over all UTXOs where their destination address is the address in question and then accumulating their amounts. ### Reusing the same address with Ed25519 -While creating multiple signatures with Ed25519 does not reduce security, reusing the same address over and over again not only drastically reduces the privacy of yourself but also all other people in the UTXO chain of the moved funds. Applications and services are therefore instructed to create new addresses per deposit, in order to circumvent the privacy issues stemming from address reuse. +While creating multiple signatures with Ed25519 does not reduce security, repeatedly reusing the same address not only drastically reduces the privacy of users but also all other people in the UTXO chain of the moved funds. Applications and services are then instructed to create new addresses per deposit, to circumvent the privacy issues stemming from address reuse. In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. -Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) why the same should be applied to donation addresses. +Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) on why the same should be applied to donation addresses. # Drawbacks -The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it, including client libraries, blueprints, PoC and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade in order to further participate in the network. +The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it, including client libraries, blueprints, PoC, and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade to further participate in the network. -Local snapshots can also no longer be simply represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices and then the destination addresses plus the balances. +Additionally, local snapshots can no longer be represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore, local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices, and then the destination addresses including the balances. # Rationale and alternatives -Introducing this new transaction structure allows for further extensions in the future, in order to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case funds appear to be deposited onto a previous generated address. Due to the switch to a complete binary transaction, size is further reduced, saving network bandwidth and processing time. The new structure is backwards compatible with "Kerl" WOTS addresses and therefore allows both current methods of signing transactions to co-exist. +Introducing this new transaction structure allows for further extensions in the future, to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case funds appear to be deposited onto a previous generated address. Due to the switch to a complete binary transaction, size is further reduced, saving network bandwidth and processing time. The new structure is backwards compatible with "Kerl" WOTS addresses and so allows both current methods of signing transactions to co-exist. -Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would have not been safe against replay attacks, deeming reusing the old transaction structure for example for Ed25519 addresses/signatures as infeasible. +Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would not have been safe against replay attacks, which deems reusing the old transaction structure, for example for Ed25519 addresses/signatures, as infeasible. Not switching to the new transaction structure described in this RFC leads to people being open to loss of funds because of WOTS address re-use and not being able to properly extend the protocol further down the line. @@ -745,4 +745,4 @@ Not switching to the new transaction structure described in this RFC leads to pe of this feature before stabilization? - What related issues do you consider out of scope for this RFC that could be addressed in the future independently of the solution that comes out of this - RFC? \ No newline at end of file + RFC? From e0bb10822e60efb90e35ddd73afb7d3841f1be6b Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Mon, 11 Jan 2021 20:48:48 +0100 Subject: [PATCH 16/35] Apply suggestions from code review Co-authored-by: Andrea V --- text/0000-transaction-payload/0000-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 8bab115b4..6cf95d8b2 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -381,7 +381,7 @@ The Inputs part holds the inputs to consume, respectively, to fund the ou Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. -Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the previous Unlock Block. +Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the index of a previous Unlock Block. This ensures that no duplicate data needs to occur in the same transaction. ###### UTXO Input From c1b96bb4d74789867cb55a4ae78f14dc8565b418 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Mon, 11 Jan 2021 20:58:22 +0100 Subject: [PATCH 17/35] fixes inputs/outputs/unlock blocks bounds --- text/0000-transaction-payload/0000-transaction-payload.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 6cf95d8b2..097d3a702 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -661,7 +661,7 @@ This validation can commence as soon as the transaction data has been received i The following criteria defines whether the transaction passes the syntactical validation: * `Transaction Essence Type` value must be 0, denoting an `Transaction Essence`. * Inputs: - * `Inputs Count` must be 0 < x < 127. + * `Inputs Count` must be 0 < x ≤ 127. * At least one input must be specified. * `Input Type` value must be 0, denoting an `UTXO Input`. * `UTXO Input`: @@ -669,7 +669,7 @@ The following criteria defines whether the transaction passes the syntactical va * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. * Inputs must be in lexicographical order of their serialized form.1 * Outputs: - * `Outputs Count` must be 0 < x < 127. + * `Outputs Count` must be 0 < x ≤ 127. * At least one output must be specified. * `Output Type` must be 0, denoting a `SigLockedSingleOutput`. * `SigLockedSingleOutput`: @@ -681,7 +681,7 @@ The following criteria defines whether the transaction passes the syntactical va * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. * `Payload Length` must be 0 (to indicate that there's no payload) or be valid for the specified payload type. * `Payload Type` must be one of the supported payload types if `Payload Length` is not 0. -* `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x < 127. +* `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x ≤ 127. * `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. * `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature`. * A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. From ecb287b8892f8fa8a8f30ea058243cf784dc650e Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Tue, 12 Jan 2021 13:52:06 +0100 Subject: [PATCH 18/35] clarify from which data a tx ID is built from --- text/0000-transaction-payload/0000-transaction-payload.md | 1 + 1 file changed, 1 insertion(+) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 097d3a702..ef202feb6 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -52,6 +52,7 @@ A Transaction Payload payload is made up of two parts: 2. The Unlock Blocks which unlock the Transaction Essence's inputs. In case the unlock block contains a signature, it signs the entire Transaction Essence part. All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. +A `Blake2b-256` hash of the entire serialized data makes up Transaction Payload's ID. Following table structure describes the entirety of a Transaction Payload's serialized form: * [Data Type Notation](https://github.com/GalRogozinski/protocol-rfcs/blob/message/text/0017-message/0017-message.md#data-types) From e2faf6940b4f3b40b72f234350bbd5ba69899177 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Fri, 29 Jan 2021 15:44:36 +0100 Subject: [PATCH 19/35] make it clear that the opt. payload within a tx is persisted as long as the tx is syntactically valid --- text/0000-transaction-payload/0000-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index ef202feb6..5a6ffa928 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -507,7 +507,7 @@ The SigLockedSingleOutput defines an output (with a certain amount) to a ##### Payload -The payload part of a Transaction Essence can hold an optional payload. This payload does not affect the validity of the Transaction Essence. If the transaction is not valid, then the payload must also be discarded. +The payload part of a Transaction Essence can hold an optional payload. This payload does not affect the validity of the Transaction Essence. If the transaction is not syntactically valid, then the payload must also be discarded. Supported payload types to be embedded into a Transaction Essence: From 5553079b5f6c195f77a460ee3a8c21e4d94c3cc3 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Thu, 18 Feb 2021 15:33:08 +0100 Subject: [PATCH 20/35] remove WOTS --- .../0000-transaction-payload.md | 105 ++---------------- 1 file changed, 8 insertions(+), 97 deletions(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 5a6ffa928..5aab0795f 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -18,7 +18,7 @@ The bundle concept has proven to be time consuming, with several issues as well: To fix the problems mentioned above and to create a more flexible transaction structure, the goal is to achieve a self-contained transaction structure defining the data of the entire transfer as a payload to be embedded into a message. The new transaction structure should fulfil the following criteria: -* Support for Ed25519 (and thus reusable addresses) and WOTS signatures. +* Support for Ed25519 (and thus reusable addresses). * Support for adding new types of signature schemes, addresses, inputs, and outputs as part of protocol upgrades. * Self-contained, as in being able to validate the transaction immediately after receiving it. * Enable unspent transaction outputs (UTXO) as inputs instead of an account based model (UTXO enables easier double-spend detection). @@ -183,28 +183,6 @@ Following table structure describes the entirety of a Transaction Payload Address oneOf -
- WOTS Address - - - - - - - - - - - - - - - - -
NameTypeDescription
Address Typeuint8 - Set to value 0 to denote a WOTS Address. -
AddressArray<byte>[49]The T5B1 encoded WOTS address.
-
Ed25519 Address @@ -217,7 +195,7 @@ Following table structure describes the entirety of a Transaction Payload @@ -284,28 +262,6 @@ Following table structure describes the entirety of a Transaction Payload
Address Type uint8 - Set to value 1 to denote an Ed25519 Address. + Set to value 0 to denote an Ed25519 Address.
Signature oneOf -
- WOTS Signature - - - - - - - - - - - - - - - - -
NameTypeDescription
Signature Typeuint8 - Set to value 0 to denote a WOTS Signature. -
SignatureArray<byte>The signature signing the serialized Transaction Essence.
-
Ed25519 Signature @@ -318,7 +274,7 @@ Following table structure describes the entirety of a Transaction Payload @@ -447,28 +403,6 @@ The Outputs part holds the outputs to create with this Transaction Pay @@ -100,7 +100,7 @@ Following table structure describes the entirety of a Transaction Payload
Transaction Essence
- Describes the essence data making up a transaction by defining its inputs and outputs and an optional payload. + Describes the essence data making up a transaction by defining its inputs and outputs and an optional payload.
Signature Type uint8 - Set to value 1 to denote an Ed25519 Signature. + Set to value 0 to denote an Ed25519 Signature.
Address oneOf -
- WOTS Address - - - - - - - - - - - - - - - - -
NameTypeDescription
Address Typeuint8 - Set to value 0 to denote a WOTS Address. -
AddressArray<byte>[49]The T5B1 encoded WOTS address.
-
Ed25519 Address @@ -481,7 +415,7 @@ The Outputs part holds the outputs to create with this Transaction Pay @@ -558,28 +492,6 @@ There are different types of Unlock Blocks: - +
Address Type uint8 - Set to value 1 to denote an Ed25519 Address. + Set to value 0 to denote an Ed25519 Address.
Signature oneOf -
- WOTS Signature - - - - - - - - - - - - - - - - -
NameTypeDescription
Signature Typeuint8 - Set to value 0 to denote a WOTS Signature. -
SignatureArray<byte>The signature signing the serialized Transaction Essence.
-
Ed25519 Signature @@ -592,7 +504,7 @@ There are different types of Unlock Blocks: @@ -674,8 +586,7 @@ The following criteria defines whether the transaction passes the syntactical va * At least one output must be specified. * `Output Type` must be 0, denoting a `SigLockedSingleOutput`. * `SigLockedSingleOutput`: - * `Address Type` must either be 0 or 1, denoting a `WOTS`- or `Ed25519` address. - * If `Address` is of type `WOTS address`, its bytes must be valid `T5B1` bytes. + * `Address Type` must be 0, denoting an `Ed25519` address. * The `Address` must be unique in the set of `SigLockedSingleOutputs`. * `Amount` must be > 0. * Outputs must be in lexicographical order by their serialized form.1 @@ -684,7 +595,7 @@ The following criteria defines whether the transaction passes the syntactical va * `Payload Type` must be one of the supported payload types if `Payload Length` is not 0. * `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x ≤ 127. * `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. -* `Signature Unlock Blocks` must define either an `Ed25519`- or `WOTS Signature`. +* `Signature Unlock Blocks` must define either a `Ed25519 Signature`. * A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. * Given the type and length of the information, the Transaction Payload must consume the entire byte array for the `Payload Length` field in the Message it defines. @@ -732,7 +643,7 @@ Additionally, local snapshots can no longer be represented by a list of addresse # Rationale and alternatives -Introducing this new transaction structure allows for further extensions in the future, to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case funds appear to be deposited onto a previous generated address. Due to the switch to a complete binary transaction, size is further reduced, saving network bandwidth and processing time. The new structure is backwards compatible with "Kerl" WOTS addresses and so allows both current methods of signing transactions to co-exist. +Introducing this new transaction structure allows for further extensions in the future, to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case funds appear to be deposited onto a previous generated address. Due to the switch to a complete binary transaction, size is further reduced, saving network bandwidth and processing time. Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would not have been safe against replay attacks, which deems reusing the old transaction structure, for example for Ed25519 addresses/signatures, as infeasible. From 27da30c54b3013fa02ee774a4590698cddd9d499 Mon Sep 17 00:00:00 2001 From: Luca Moser Date: Tue, 23 Feb 2021 12:05:37 +0100 Subject: [PATCH 21/35] adds dust allowance output and clarifies signing of blake-hash instead of raw essence bytes --- .../0000-transaction-payload.md | 274 ++++++------------ 1 file changed, 88 insertions(+), 186 deletions(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 5aab0795f..ec7e967c3 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -52,6 +52,7 @@ A Transaction Payload payload is made up of two parts: 2. The Unlock Blocks which unlock the Transaction Essence's inputs. In case the unlock block contains a signature, it signs the entire Transaction Essence part. All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. + A `Blake2b-256` hash of the entire serialized data makes up Transaction Payload's ID. Following table structure describes the entirety of a Transaction Payload's serialized form: @@ -210,7 +211,59 @@ Following table structure describes the entirety of a Transaction Payload - + + +
Signature Type uint8 - Set to value 1 to denote an Ed25519 Signature. + Set to value 0 to denote an Ed25519 Signature.
Amount uint64The amount of tokens to deposit with this SigLockedSingleOutput output.The amount of tokens to deposit.
+
+
+ SigLockedDustAllowanceOutput +
+ Describes a deposit which as a special property also alters the dust allowance of the target address. +
+ + + + + + + + + + + + + + + + + + +
NameTypeDescription
Output Typeuint8 + Set to value 1 to denote a SigLockedDustAllowanceOutput. +
Address oneOf +
+ Ed25519 Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typeuint8 + Set to value 0 to denote an Ed25519 Address. +
AddressArray<byte>[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
+
+
Amountuint64The amount of tokens to deposit.
@@ -285,7 +338,7 @@ Following table structure describes the entirety of a Transaction Payload
Signature Array<byte>[64]The signature signing the serialized Transaction Essence.The signature signing the Blake2b-256 hash of the serialized Transaction Essence.
@@ -336,112 +389,35 @@ A Transaction Essence must contain at least one input and output. The Inputs part holds the inputs to consume, respectively, to fund the outputs of the Transaction Essence. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. -Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. -If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. -Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the index of a previous Unlock Block. +Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. + +If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. + +Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the index of a previous Unlock Block. This ensures that no duplicate data needs to occur in the same transaction. ###### UTXO Input -
- UTXO Input - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Input Typeuint8 - Set to value 0 to denote an UTXO Input. -
Transaction IDArray<byte>[32]The BLAKE2b-256 hash of the transaction from which the UTXO comes from.
Transaction Output Indexuint16The index of the output on the referenced transaction to consume.
-
-

- An UTXO Input is an input which references an output of a previous transaction by using the given transaction's BLAKE2b-256 hash + the index of the output on that transaction. An UTXO Input must be accompanied by an Unlock Block for the corresponding type of output the UTXO Input is referencing. Example: If the output the input references outputs to an Ed25519 address, then the corresponding unlock block must be of type Signature Unlock Block holding an Ed25519 signature. ##### Outputs -The Outputs part holds the outputs to create with this Transaction Payload. There is only one type of output as of now, the SigLockedSingleOutput. +The Outputs part holds the outputs to create with this Transaction Payload. ###### SigLockedSingleOutput -
- SigLockedSingleOutput -
- Describes a deposit to a single address which is unlocked via a signature. -
- - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Output Typeuint8 - Set to value 0 to denote a SigLockedSingleOutput. -
Address oneOf -
- Ed25519 Address - - - - - - - - - - - - - - - - -
NameTypeDescription
Address Typeuint8 - Set to value 0 to denote an Ed25519 Address. -
AddressArray<byte>[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
-
-
Amountuint64The amount of tokens to deposit with this SigLockedSingleOutput output.
-
+The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. This output can hold addresses of different types. -

+###### SigLockedDustAllowanceOutput + +The SigLockedDustAllowanceOutput works the same as a SigLockedSingleOutput but additionally controls the dust allowance on the target address. See [Dust Protection RFC](https://github.com/iotaledger/protocol-rfcs/pull/32) for further information. -The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. This output can hold addresses of different types. ##### Payload -The payload part of a Transaction Essence can hold an optional payload. This payload does not affect the validity of the Transaction Essence. If the transaction is not syntactically valid, then the payload must also be discarded. +The payload part of a Transaction Essence can hold an optional payload. This payload does not affect the validity of the Transaction Essence. If the transaction is not syntactically valid, then the payload must also be discarded. Supported payload types to be embedded into a Transaction Essence: @@ -474,84 +450,10 @@ There are different types of Unlock Blocks: ##### Signature Unlock Block -
- Format - - - - - - - - - - - - - - - -
NameTypeDescription
Unlock Typeuint8 - Set to value 0 to denote a Signature Unlock Block. -
Signature oneOf -
- Ed25519 Signature - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Signature Typeuint8 - Set to value 0 to denote an Ed25519 Signature. -
Public keyArray<byte>[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureArray<byte>[64]The signature signing the serialized Transaction Essence.
-
-
-
- -A Signature Unlock Block defines an Unlock Block which holds one or more signatures unlocking one or more inputs. -This block signs the entire Transaction Essence part of a Transaction Payload including the optional payload. +A Signature Unlock Block defines an Unlock Block which holds one or more signatures signing the Blake2b-256 hash of the Transaction Essence (including the optional payload). ##### Reference Unlock block -
- Format - - - - - - - - - - - - - - - - -
NameTypeDescription
Unlock Typeuint8 - Set to value 1 to denote a Reference Unlock Block. -
Referenceuint16Represents the index of a previous unlock block.
-
- A Reference Unlock Block defines an Unlock Block which references a previous Unlock Block (which must not be another Reference Unlock Block). It must be used if multiple inputs can be unlocked through the same origin Unlock Block. Example: @@ -574,28 +476,28 @@ This validation can commence as soon as the transaction data has been received i The following criteria defines whether the transaction passes the syntactical validation: * `Transaction Essence Type` value must be 0, denoting an `Transaction Essence`. * Inputs: - * `Inputs Count` must be 0 < x ≤ 127. - * At least one input must be specified. - * `Input Type` value must be 0, denoting an `UTXO Input`. - * `UTXO Input`: - * `Transaction Output Index` must be 0 ≤ x < 127. - * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. - * Inputs must be in lexicographical order of their serialized form.1 + * `Inputs Count` must be 0 < x ≤ 127. + * At least one input must be specified. + * `Input Type` value must be 0, denoting an `UTXO Input`. + * `UTXO Input`: + * `Transaction Output Index` must be 0 ≤ x < 127. + * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. + * Inputs must be in lexicographical order of their serialized form.1 * Outputs: - * `Outputs Count` must be 0 < x ≤ 127. - * At least one output must be specified. - * `Output Type` must be 0, denoting a `SigLockedSingleOutput`. - * `SigLockedSingleOutput`: - * `Address Type` must be 0, denoting an `Ed25519` address. - * The `Address` must be unique in the set of `SigLockedSingleOutputs`. - * `Amount` must be > 0. - * Outputs must be in lexicographical order by their serialized form.1 - * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. + * `Outputs Count` must be 0 < x ≤ 127. + * At least one output must be specified. + * `Output Type` must denote a `SigLockedSingleOutput` or `SigLockedDustAllowanceOutput`. + * `SigLockedSingleOutput`/`SigLockedDustAllowanceOutput`: + * `Address Type` must be 0, denoting an `Ed25519` address. + * The `Address` must be unique in the set of `SigLockedSingleOutputs`/`SigLockedDustAllowanceOutputs` (two separate sets). + * `Amount` must be > 0. + * Outputs must be in lexicographical order by their serialized form.1 + * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. * `Payload Length` must be 0 (to indicate that there's no payload) or be valid for the specified payload type. * `Payload Type` must be one of the supported payload types if `Payload Length` is not 0. * `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x ≤ 127. * `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. -* `Signature Unlock Blocks` must define either a `Ed25519 Signature`. +* `Signature Unlock Blocks` must define a `Ed25519 Signature`. * A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. * Given the type and length of the information, the Transaction Payload must consume the entire byte array for the `Payload Length` field in the Message it defines. @@ -604,7 +506,7 @@ The following criteria defines whether the transaction passes the syntactical va ### Semantic Validation -Semantic validation starts when a message that is part of a confirmation cone of a milestone is processed in the [White-Flag ordering](https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering that can be understood by all the nodes (i.e. milestone cones), no matter the order the transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. +Semantic validation starts when a message that is part of a confirmation cone of a milestone is processed in the [White-Flag ordering](https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering that can be understood by all the nodes (i.e. milestone cones), no matter the order the transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. Processing transactions in the White-Flag ordering enables users to spend UTXOs which are in the same milestone confirmation cone, if their transaction comes after the funding transaction in the mentioned White-Flag ordering. It is recommended that users spending unconfirmed UTXOs attach their message directly onto the message containing the source transaction. @@ -631,15 +533,15 @@ Since the ledger is no longer account based, meaning that balances are directly ### Reusing the same address with Ed25519 -While creating multiple signatures with Ed25519 does not reduce security, repeatedly reusing the same address not only drastically reduces the privacy of users but also all other people in the UTXO chain of the moved funds. Applications and services are then instructed to create new addresses per deposit, to circumvent the privacy issues stemming from address reuse. -In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. +While creating multiple signatures with Ed25519 does not reduce security, repeatedly reusing the same address not only drastically reduces the privacy of users but also all other people in the UTXO chain of the moved funds. Applications and services are then instructed to create new addresses per deposit, to circumvent the privacy issues stemming from address reuse. +In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) on why the same should be applied to donation addresses. # Drawbacks The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it, including client libraries, blueprints, PoC, and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade to further participate in the network. -Additionally, local snapshots can no longer be represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore, local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices, and then the destination addresses including the balances. +Additionally, local snapshots can no longer be represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore, local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices, and then the destination addresses including the balances. # Rationale and alternatives From b886adedf62d8a4cc12a4e61e5fde3d2c683c399 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 11:35:53 +0100 Subject: [PATCH 22/35] make payload validation consistent with other RFCs --- .../0000-transaction-payload.md | 154 ++++++++++-------- 1 file changed, 88 insertions(+), 66 deletions(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index ec7e967c3..7fcda7bb9 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -91,7 +91,7 @@ Following table structure describes the entirety of a Transaction Payload
Payload Type uint32 - Set to value 0 to denote a Transaction Payload. + Set to value 0 to denote a Transaction Payload.
@@ -112,21 +112,21 @@ Following table structure describes the entirety of a Transaction Payload - + - +
Transaction Type uint8 - Set to value 0 to denote a Transaction Essence. + Set to value 0 to denote a Transaction Essence.
Inputs Count uint16 The amount of inputs proceeding.
Inputs anyOf
UTXO Input
- Describes an input which references an unspent transaction output to consume. + Describes an input which references an unspent transaction output to consume.
@@ -155,18 +155,18 @@ Following table structure describes the entirety of a Transaction Payload - + - + @@ -297,7 +318,7 @@ Following table structure describes the entirety of a Transaction Payload
Signature Unlock Block
- Defines an unlock block containing signature(s) unlocking input(s). + Defines an unlock block containing signature(s) unlocking input(s).
Outputs Count uint16 The amount of outputs proceeding.
Outputs anyOf
SigLockedSingleOutput
- Describes a deposit to a single address which is unlocked via a signature. + Describes a deposit to a single address which is unlocked via a signature.
@@ -218,7 +218,7 @@ Following table structure describes the entirety of a Transaction Payload
SigLockedDustAllowanceOutput
- Describes a deposit which as a special property also alters the dust allowance of the target address. + Describes a deposit which as a special property also alters the dust allowance of the target address.
@@ -274,14 +274,35 @@ Following table structure describes the entirety of a Transaction Payload - + - +
uint32 The length in bytes of the optional payload.
Payload optOneOf
- Indexation Payload + Generic Payload +
+ An outline of a generic payload +
+ + + + + + + + + + + + + + + + +
NameTypeDescription
Payload Typeuint32 + The type of the payload. It will instruct the node how to parse the fields that follow. +
Data FieldsANYA sequence of fields, where the structure depends on Payload Type.
-
@@ -315,7 +336,7 @@ Following table structure describes the entirety of a Transaction Payload
Signature oneOf -
+
Ed25519 Signature @@ -349,7 +370,7 @@ Following table structure describes the entirety of a Transaction Payload
Reference Unlock Block
- References a previous unlock block in order to substitute the duplication of the same unlock block data for inputs which unlock through the same data. + References a previous unlock block in order to substitute the duplication of the same unlock block data for inputs which unlock through the same data.
@@ -417,36 +438,25 @@ The SigLockedDustAllowanceOutput works the same as a SigLockedSingleOu ##### Payload -The payload part of a Transaction Essence can hold an optional payload. This payload does not affect the validity of the Transaction Essence. If the transaction is not syntactically valid, then the payload must also be discarded. +The _Transaction Essence_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). This payload does not affect the semantic validity of the Transaction Essence. If the transaction is not syntactically valid, then the payload must also be discarded. -Supported payload types to be embedded into a Transaction Essence: +The following table lists all the payloads types that can be nested inside a _Transaction Essence_ as well as links to the corresponding specification: -| Name | Type Value | -| --------------------- | ---------- | -| Indexation Payload | 2 | +| Name | Type Value | RFC | +| ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- | +| Indexation | 2 | [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html#indexation-payload) | #### Unlock Blocks The Unlock Blocks part holds the unlock blocks unlocking inputs within an Transaction Essence. There are different types of Unlock Blocks: -
- - - - - - - - - - - - - - - -
NameValueDescription
Signature Unlock Block0An unlock block holding one or more signatures unlocking one or more inputs.
Reference Unlock Block1An unlock block which must reference a previous unlock block which unlocks also the input at the same index as this Reference Unlock Block.
+ +| Name | Value | Description | +| ---------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| Signature Unlock Block | 0 | An unlock block holding one or more signatures unlocking one or more inputs. | +| Reference Unlock Block | 1 | An unlock block which must reference a previous unlock block which unlocks also the input at the same index as this Reference Unlock Block. | + ##### Signature Unlock Block @@ -474,33 +484,37 @@ A Transaction Payload payload has different validation stages, since some This validation can commence as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be broadcasted further and can be discarded right away. The following criteria defines whether the transaction passes the syntactical validation: -* `Transaction Essence Type` value must be 0, denoting an `Transaction Essence`. -* Inputs: - * `Inputs Count` must be 0 < x ≤ 127. - * At least one input must be specified. - * `Input Type` value must be 0, denoting an `UTXO Input`. - * `UTXO Input`: - * `Transaction Output Index` must be 0 ≤ x < 127. - * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. - * Inputs must be in lexicographical order of their serialized form.1 -* Outputs: - * `Outputs Count` must be 0 < x ≤ 127. - * At least one output must be specified. - * `Output Type` must denote a `SigLockedSingleOutput` or `SigLockedDustAllowanceOutput`. - * `SigLockedSingleOutput`/`SigLockedDustAllowanceOutput`: - * `Address Type` must be 0, denoting an `Ed25519` address. - * The `Address` must be unique in the set of `SigLockedSingleOutputs`/`SigLockedDustAllowanceOutputs` (two separate sets). - * `Amount` must be > 0. - * Outputs must be in lexicographical order by their serialized form.1 - * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. -* `Payload Length` must be 0 (to indicate that there's no payload) or be valid for the specified payload type. -* `Payload Type` must be one of the supported payload types if `Payload Length` is not 0. -* `Unlock Blocks Count` must match the amount of inputs. Must be 0 < x ≤ 127. -* `Unlock Block Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. -* `Signature Unlock Blocks` must define a `Ed25519 Signature`. -* A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. -* `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. -* Given the type and length of the information, the Transaction Payload must consume the entire byte array for the `Payload Length` field in the Message it defines. +* Essence: + * `Transaction Type` value must be 0, denoting an `Transaction Essence`. + * Inputs: + * `Inputs Count` must be 0 < x ≤ 127. + * At least one input must be specified. + * `Input Type` value must be 0, denoting an `UTXO Input`. + * `UTXO Input`: + * `Transaction Output Index` must be 0 ≤ x < 127. + * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. + * Inputs must be sorted in lexicographical order of their serialized form.1 + * Outputs: + * `Outputs Count` must be 0 < x ≤ 127. + * At least one output must be specified. + * `Output Type` must denote a `SigLockedSingleOutput` or `SigLockedDustAllowanceOutput`. + * `SigLockedSingleOutput`/`SigLockedDustAllowanceOutput`: + * `Address Type` must be 0, denoting an `Ed25519` address. + * The `Address` must be unique in the set of `SigLockedSingleOutputs`/`SigLockedDustAllowanceOutputs` (two separate sets). + * `Amount` must be larger than zero. + * Outputs must be sorted in lexicographical order by their serialized form.1 + * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. + * Payload (if present): + * `Payload Type` must match one of the values described under [Payload](#payload). + * `Data fields` must be correctly parsable in the context of the `Payload Type`. + * The payload itself must pass syntactic validation. +* Unlock Blocks: + * `Unlock Blocks Count` must match `Inputs Count` of the _Transaction Essence_. + * `Unlock Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. + * `Signature Unlock Blocks` must define a `Ed25519 Signature`. + * A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. + * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. +* Given the type and length information, the _Transaction Payload_ must consume the entire byte array of the `Payload` field of the encapsulating object. 1 ensures that serialization of the transaction becomes deterministic, meaning that libraries always produce the same bytes given the logical transaction. @@ -521,6 +535,14 @@ If a transaction passes the semantic validation, its referenced UTXOs must be ma Transactions which do not pass semantic validation are ignored. Their UTXOs are not marked as spent and neither are their outputs booked into the ledger. +### Payloads + +The _Transaction Payload_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). The following table lists all the payloads types that can be nested inside a _Transaction Payload_ as well as links to the corresponding specification: + +| Payload Name | Type Value | RFC | +| ------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------- | +| Indexation | 2 | [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html#indexation-payload) | + ## Miscellaneous ### Absent transaction timestamp From 9d85237d0b4545a5ef610953bf65dd2c4ae15a77 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 12:01:26 +0100 Subject: [PATCH 23/35] Update links --- text/0000-transaction-payload/0000-transaction-payload.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0000-transaction-payload/0000-transaction-payload.md index 7fcda7bb9..c6f4bc902 100644 --- a/text/0000-transaction-payload/0000-transaction-payload.md +++ b/text/0000-transaction-payload/0000-transaction-payload.md @@ -4,7 +4,7 @@ # Summary -This RFC defines a new transaction structure for Chrysalis Phase 2, which replaces the current notion of bundles. Specifically, this RFC describes the transaction payload to be embedded into a [message](https://github.com/iotaledger/protocol-rfcs/pull/17). +This RFC defines a new transaction structure for Chrysalis Phase 2, which replaces the current notion of bundles. Specifically, this RFC proposes a transaction payload for the messages described in the IOTA protocol [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). # Motivation @@ -433,8 +433,7 @@ The SigLockedSingleOutput defines an output (with a certain amount) to a ###### SigLockedDustAllowanceOutput -The SigLockedDustAllowanceOutput works the same as a SigLockedSingleOutput but additionally controls the dust allowance on the target address. See [Dust Protection RFC](https://github.com/iotaledger/protocol-rfcs/pull/32) for further information. - +The SigLockedDustAllowanceOutput works the same as a SigLockedSingleOutput but additionally controls the dust allowance on the target address. See [Dust Protection RFC-0032 (draft)](https://github.com/iotaledger/protocol-rfcs/pull/32) for further information. ##### Payload From b0469494f976761035c6a7fbbcbaf5bdd0fac859 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 12:08:18 +0100 Subject: [PATCH 24/35] fix filename --- .../0018-transaction-payload.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename text/{0000-transaction-payload/0000-transaction-payload.md => 0018-transaction-payload/0018-transaction-payload.md} (100%) diff --git a/text/0000-transaction-payload/0000-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md similarity index 100% rename from text/0000-transaction-payload/0000-transaction-payload.md rename to text/0018-transaction-payload/0018-transaction-payload.md From 2a15eb999a42758d909f6ba937908ea273023917 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 12:10:41 +0100 Subject: [PATCH 25/35] add image to git --- text/0018-transaction-payload/img/utxo.png | Bin 0 -> 52729 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 text/0018-transaction-payload/img/utxo.png diff --git a/text/0018-transaction-payload/img/utxo.png b/text/0018-transaction-payload/img/utxo.png new file mode 100644 index 0000000000000000000000000000000000000000..b6f9f198869b3485acf8c67b7a98331a41a9f18a GIT binary patch literal 52729 zcmbTe1yoes`!7zZlqjW?LkUvSDMJf`q;!|0q%=dL5>f*=bn4J4-C+?!OGzUzfTRrF z|HJ!&-|t=j-@WUu>zd^{OV2rb?`J>p`8?0F&%5U;klXlF_!t-%x1Y&BRmZ@oO4G}DJ^hv!xz+*xGZ(XPaxPjHu z`7(5$=U^t;b!JC&x#9>V_We$id?1c*bX!}nffN31+(XyBfvh^a;P1WR;o*z~1mRyJ z6vN;65rrgDt#2)7(o!sDQqC=B8b21EvrsYqHEK6j+Fa{9Osnd{`cPXD>!IY;j|lHD z_6}Z5;MQG=7Sj{q3)2fJ%=2?KA)#=5#~<9hpY&hReUW~xCdQ8|6@=M>{k8k?V-^l+ z4@XQFG}`%b>)pKm-23P7v;-4%^*C)^%{sTifsCCd8it}rm?U)n{(^XMSYR}FAI@Rp zggl-WFZ}e$OJ&TX7oEZ%mJcEaEn$}kT9I;DF3s)M?-r+@1mNM}645lWe3-;CuX(HX z9s@7tpI=f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)nb#3E zepLg#@m?rM93w=OIs~#J?RWygm8xWlIa+lgt*z&v9rIw>l<0R~$mp ztsL5a6!Z64_)Xg}KXMvbZ+%Aed!-hvQEbO4D9I^r?~QxZ*GfP=-E=FPnvgtcIkue4 zH#g{yb%M>H4>8KA<}6JMTHL6DniZ=wHg!^^7xHR8b=f;KZ5Dt@kpBSy}b zf`@DEn_)Ha)c*Pf^I4HS^t{$7y^XgmcoK;66ew#I3(KFY{g2b)&4VkY?MX*Z{b(gn z+T{ouRCZ&Hf`o(=|JBBA()(uS=C5&CK3F#GRCLvrA3j%cS7Xj))z8i^eOdKf`||N% z2yQ~3s-}*0Uw^Eq)l1h=aZw7!M^0OOt}c>)&(@x}ZvWIf8{`VF_sB*hly~lMC|gua z2;_1PnU(uG*$Bpzz4e;3C_#6Z0JgF6GS! lijjX`%s;&_yU$Hm$oImi4*R}p Date: Wed, 3 Nov 2021 12:14:24 +0100 Subject: [PATCH 26/35] Use image from local folder --- text/0018-transaction-payload/0018-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index c6f4bc902..33e8e55af 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -39,7 +39,7 @@ Within a transaction using UTXOs, inputs and outputs make up the to-be-signed da The following image depicts the flow of funds using UTXO: -![UTXO flow](https://i.imgur.com/h3uxf6N.png) +![UTXO flow](img/utxo.png) The way UTXOs are referenced is further described in the Structure section of this RFC. From 9ec69b5b6d720374dd54e6c2ac72f3ecb83f8c22 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 12:14:54 +0100 Subject: [PATCH 27/35] Remove unresolved questions --- .../0018-transaction-payload.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index 33e8e55af..d342b5e64 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -571,13 +571,3 @@ Introducing this new transaction structure allows for further extensions in the Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would not have been safe against replay attacks, which deems reusing the old transaction structure, for example for Ed25519 addresses/signatures, as infeasible. Not switching to the new transaction structure described in this RFC leads to people being open to loss of funds because of WOTS address re-use and not being able to properly extend the protocol further down the line. - -# Unresolved questions - -- What parts of the design do you expect to resolve through the RFC process - before this gets merged? -- What parts of the design do you expect to resolve through the implementation - of this feature before stabilization? -- What related issues do you consider out of scope for this RFC that could be - addressed in the future independently of the solution that comes out of this - RFC? From 10ba8b33c5277608734fb55febe2bf88526dd601 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 12:19:26 +0100 Subject: [PATCH 28/35] Always use the mdbook links --- text/0018-transaction-payload/0018-transaction-payload.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index d342b5e64..3d2c7df0d 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -56,7 +56,7 @@ All values are serialized in little-endian encoding. The serialized form of the A `Blake2b-256` hash of the entire serialized data makes up Transaction Payload's ID. Following table structure describes the entirety of a Transaction Payload's serialized form: -* [Data Type Notation](https://github.com/GalRogozinski/protocol-rfcs/blob/message/text/0017-message/0017-message.md#data-types) +* Data Type Notation, see [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html#data-types) *

Subschema Notation @@ -519,7 +519,7 @@ The following criteria defines whether the transaction passes the syntactical va ### Semantic Validation -Semantic validation starts when a message that is part of a confirmation cone of a milestone is processed in the [White-Flag ordering](https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering that can be understood by all the nodes (i.e. milestone cones), no matter the order the transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. +Semantic validation starts when a message that is part of a confirmation cone of a milestone is processed in the [White-Flag ordering](https://iotaledger.github.io/protocol-rfcs/0005-white-flag/0005-white-flag.html#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering that can be understood by all the nodes (i.e. milestone cones), no matter the order the transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. Processing transactions in the White-Flag ordering enables users to spend UTXOs which are in the same milestone confirmation cone, if their transaction comes after the funding transaction in the mentioned White-Flag ordering. It is recommended that users spending unconfirmed UTXOs attach their message directly onto the message containing the source transaction. From 55fb8bef574d05c49eddaabf5a071a0294859ac6 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 12:23:53 +0100 Subject: [PATCH 29/35] Remove duplicate payload section --- text/0018-transaction-payload/0018-transaction-payload.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index 3d2c7df0d..c295c29d7 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -534,14 +534,6 @@ If a transaction passes the semantic validation, its referenced UTXOs must be ma Transactions which do not pass semantic validation are ignored. Their UTXOs are not marked as spent and neither are their outputs booked into the ledger. -### Payloads - -The _Transaction Payload_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). The following table lists all the payloads types that can be nested inside a _Transaction Payload_ as well as links to the corresponding specification: - -| Payload Name | Type Value | RFC | -| ------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------- | -| Indexation | 2 | [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html#indexation-payload) | - ## Miscellaneous ### Absent transaction timestamp From 50ff0f76f00f1b72543ec2ac31464138db3fd735 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 13:28:33 +0100 Subject: [PATCH 30/35] update links in other RFCs --- text/0017-tangle-message/0017-tangle-message.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/text/0017-tangle-message/0017-tangle-message.md b/text/0017-tangle-message/0017-tangle-message.md index 6a048792f..44dfd8b74 100644 --- a/text/0017-tangle-message/0017-tangle-message.md +++ b/text/0017-tangle-message/0017-tangle-message.md @@ -141,11 +141,11 @@ The following criteria defines whether the message passes the syntactical valida While messages without a payload, i.e. `Payload Length` set to zero, are valid, such messages do not contain any information. As such, messages usually contain a payload. The detailed specification of each payload type is out of scope of this RFC. The following table lists all currently specified payloads that can be part of a message and links to their specification. The _indexation payload_ will be specified here as an example: -| Payload Name | Type Value | RFC | -| ------------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Transaction | 0 | [RFC-0018 (draft)](https://github.com/luca-moser/protocol-rfcs/blob/signed-tx-payload/text/0000-signed-transaction-payload/0000-signed-transaction-payload.md) | -| Milestone | 1 | [RFC-0019](https://iotaledger.github.io/protocol-rfcs/0019-milestone-payload/0019-milestone-payload.html) | -| Indexation | 2 | [RFC-0017](#indexation-payload) | +| Payload Name | Type Value | RFC | +| ------------ | ---------- | ------------------------------------------------------------------------------------------------------------- | +| Transaction | 0 | [RFC-0018](https://iotaledger.github.io/protocol-rfcs/0018-transaction-payload/0018-transaction-payload.html) | +| Milestone | 1 | [RFC-0019](https://iotaledger.github.io/protocol-rfcs/0019-milestone-payload/0019-milestone-payload.html) | +| Indexation | 2 | [RFC-0017](#indexation-payload) | ### Indexation payload From 39eaf11da1215b409c4136fbfcb8307779cc208c Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 13:33:27 +0100 Subject: [PATCH 31/35] Beautify markdown table --- .../0018-transaction-payload.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index c295c29d7..dd766d144 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -468,11 +468,11 @@ A Reference Unlock Block defines an Unlock Block which references Example: Consider an Transaction Essence containing UTXO Inputs A, B and C, where A and C are both spending the UTXOs originating from the same Ed25519 address. The Unlock Block part must thereby have following structure: -| Index | Must Contain | -| ----- | ---------------------------------------------------------------------------------------------------------------- | -| 0 | A Signature Unlock Block holding the corresponding Ed25519 signature to unlock A and C. | -| 1 | A Signature Unlock Block which unlocks B. | -| 2 | A Reference Unlock Block which references index 0, since C also gets unlocked by the same signature as A. | +| Index | Must Contain | +| ----- | ----------------------------------------------------------------------------------------------------------- | +| 0 | A _Signature Unlock Block_ holding the corresponding Ed25519 signature to unlock A and C. | +| 1 | A _Signature Unlock Block_ which unlocks B. | +| 2 | A _Reference Unlock Block_ which references index 0, since C also gets unlocked by the same signature as A. | ## Validation From 4198e02bec3e2484117a530c8dcb7199a9d1bb66 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Wed, 3 Nov 2021 13:37:32 +0100 Subject: [PATCH 32/35] Reference BLAKE RFC --- text/0018-transaction-payload/0018-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index dd766d144..19a40ccee 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -53,7 +53,7 @@ A Transaction Payload payload is made up of two parts: All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. -A `Blake2b-256` hash of the entire serialized data makes up Transaction Payload's ID. +The *Transaction Payload ID* is the [BLAKE2b-256](https://tools.ietf.org/html/rfc7693) hash of the entire serialized payload data. Following table structure describes the entirety of a Transaction Payload's serialized form: * Data Type Notation, see [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html#data-types) From f86d8dbc33bfa2734297dcce577c8424982e53c1 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Thu, 4 Nov 2021 12:35:22 +0100 Subject: [PATCH 33/35] Several minor cleanups --- .../0018-transaction-payload.md | 784 +++++++++--------- 1 file changed, 381 insertions(+), 403 deletions(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index 19a40ccee..ca238bf5d 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -1,16 +1,16 @@ -+ Feature name: transaction_payload ++ Feature name: `transaction-payload` + Start date: 2020-07-10 + RFC PR: [iotaledger/protocol-rfcs#18](https://github.com/iotaledger/protocol-rfcs/pull/18) # Summary -This RFC defines a new transaction structure for Chrysalis Phase 2, which replaces the current notion of bundles. Specifically, this RFC proposes a transaction payload for the messages described in the IOTA protocol [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). +In the current IOTA protocol, transactions are grouped into so-called bundles to assure that they can only be confirmed as one unit. This RFC proposes a new UTXO-based transaction structure containing all the inputs and outputs of a transfer. Specifically, this RFC defines a transaction payload for the _messages_ described in the IOTA protocol [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). # Motivation -The current IOTA protocol uses **transactions** (which are vertices in the Tangle), where each transaction defines either an input or output. A grouping of those input/output transaction vertices make up a **bundle** which transfers the given values as an atomic unit (the entire bundle is applied or none of it). The input transactions define the funds to consume and create the deposits onto the output transactions target addresses. Additionally, to accommodate the larger WOTS signatures, additional transaction vertices might be part of the bundle to carry parts of the signature which do not fit into one transaction vertex. +Currently, the vertices of the Tangle are represented by transactions, where each transaction defines either an input or output. A grouping of those input/output transaction vertices makes up a bundle which transfers the given values as an atomic unit (the entire bundle is applied or none of it). An applied bundle consumes the input transactions' funds and creates the corresponding deposits into the output transactions' target addresses. Furthermore, additional meta transactions can be part of the bundle to carry parts of the signature which do not fit into a single input transaction. -The bundle concept has proven to be time consuming, with several issues as well: +The bundle concept has proven to be very challenging in practice because of the following issues: * Since the data making up the bundle is split across multiple vertices, it complicates the validation of the entire transfer. Instead of being able to immediately tell whether a bundle is valid or not, a node implementation must first collect all parts of the bundle before any actual validation can happen. This increases the complexity of the node implementation. * Reattaching the tail transaction of a bundle causes the entire transfer to be reapplied. * Due to the split across multiple transaction vertices and having to do PoW for each of them, a bundle might already be lazy in terms of where it attaches, reducing its chances to be confirmed. @@ -21,41 +21,39 @@ The new transaction structure should fulfil the following criteria: * Support for Ed25519 (and thus reusable addresses). * Support for adding new types of signature schemes, addresses, inputs, and outputs as part of protocol upgrades. * Self-contained, as in being able to validate the transaction immediately after receiving it. -* Enable unspent transaction outputs (UTXO) as inputs instead of an account based model (UTXO enables easier double-spend detection). +* Enable unspent transaction outputs (UTXO) as inputs instead of an account based model. # Detailed design ## UTXO -The *unspent transaction output* (UTXO) model defines a ledger state where balances are not directly associated to addresses but to the outputs of transactions. In this model, transactions specify the outputs of previous transactions as inputs, which are consumed to create new outputs. A transaction must consume the entirety of the specified inputs. +The *unspent transaction output* (UTXO) model defines a ledger state where balances are not directly associated to addresses but to the outputs of transactions. In this model, transactions reference outputs of previous transactions as inputs, which are consumed (removed) to create new outputs. A transaction must consume all the funds of the referenced inputs. -Using an UTXO based model provides several benefits: +Using a UTXO based model provides several benefits: * Parallel validation of transactions. * Easier double-spend detection, since conflicting transactions would reference the same UTXO. * Replay-protection which is important when having reusable addresses. Replaying the same transaction would manifest itself as already being applied or existent and thus not have any impact. -* Technically seen, balances may no longer be associated to addresses which raises the level of abstraction and thus enables other types of outputs. Consider, for example, a type of output which specifies the balance to be unlocked by a transaction which must fulfil a Proof-of-Work difficulty or supply some other unlock criteria, etc. +* Technically seen, balances are no longer associated to addresses which raises the level of abstraction and thus enables other types of outputs with particular unlock criteria. -Within a transaction using UTXOs, inputs and outputs make up the to-be-signed data of the transaction. The section unlocking the inputs is called *unlock block*. An unlock block may contain a signature proving ownership of a given input's address and/or other unlock criteria. +Within a transaction using UTXOs, inputs and outputs make up the to-be-signed data of the transaction. The section unlocking the inputs is called the *unlock block*. An unlock block may contain a signature proving ownership of a given input's address and/or other unlock criteria. The following image depicts the flow of funds using UTXO: ![UTXO flow](img/utxo.png) -The way UTXOs are referenced is further described in the Structure section of this RFC. - ## Structure -### Serialized Layout +### Serialized layout -A Transaction Payload payload is made up of two parts: -1. The The Transaction Essence part which contains the inputs, outputs and an optional embedded payload. -2. The Unlock Blocks which unlock the Transaction Essence's inputs. In case the unlock block contains a signature, it signs the entire Transaction Essence part. +A _Transaction Payload_ is made up of two parts: +1. The _Transaction Essence_ part which contains the inputs, outputs and an optional embedded payload. +2. The _Unlock Blocks_ which unlock the inputs of the _Transaction Essence_. When an unlock block contains a signature, it signs the entire _Transaction Essence_ part. All values are serialized in little-endian encoding. The serialized form of the transaction is deterministic, meaning the same logical transaction always results in the same serialized byte sequence. -The *Transaction Payload ID* is the [BLAKE2b-256](https://tools.ietf.org/html/rfc7693) hash of the entire serialized payload data. +The *Transaction ID* is the [BLAKE2b-256](https://tools.ietf.org/html/rfc7693) hash of the entire serialized payload data including signatures. -Following table structure describes the entirety of a Transaction Payload's serialized form: +The following table structure describes the entirety of a _Transaction Payload_ in its serialized form: * Data Type Notation, see [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html#data-types) *
Subschema Notation @@ -82,364 +80,358 @@ Following table structure describes the entirety of a Transaction Payload

- - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Payload Typeuint32 - Set to value 0 to denote a Transaction Payload. -
Essence oneOf -
- Transaction Essence +
NameTypeDescription
Payload Typeuint32 + Set to value 0 to denote a Transaction Payload. +
Essence oneOf +
+ Transaction Essence +
+ Describes the essence data making up a transaction by defining its inputs, outputs and an optional payload. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + +
NameTypeDescription
Transaction Typeuint8 + Set to value 0 to denote a Transaction Essence. +
Inputs Countuint16The number of input entries.
Inputs anyOf +
+ UTXO Input +
+ Describes an input which references an unspent transaction output to consume. +
+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Input Typeuint8 + Set to value 0 to denote an UTXO Input. +
Transaction IDByteArray[32]The BLAKE2b-256 hash of the transaction payload containing the referenced output.
Transaction Output Indexuint16The output index of the referenced output.
+
+
Outputs Countuint16The number of output entries.
Outputs anyOf +
+ SigLockedSingleOutput
- Describes the essence data making up a transaction by defining its inputs and outputs and an optional payload. + Describes a deposit to a single address which is unlocked via a signature.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Transaction Typeuint8 - Set to value 0 to denote a Transaction Essence. -
Inputs Countuint16The amount of inputs proceeding.
Inputs anyOf -
- UTXO Input -
- Describes an input which references an unspent transaction output to consume. -
- - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Input Typeuint8 - Set to value 0 to denote an UTXO Input. -
Transaction IDArray<byte>[32]The BLAKE2b-256 hash of the transaction from which the UTXO comes from.
Transaction Output Indexuint16The index of the output on the referenced transaction to consume.
-
-
Outputs Countuint16The amount of outputs proceeding.
Outputs anyOf -
- SigLockedSingleOutput -
- Describes a deposit to a single address which is unlocked via a signature. -
- - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Output Typeuint8 - Set to value 0 to denote a SigLockedSingleOutput. -
Address oneOf -
- Ed25519 Address - - - - - - - - - - - - - - - - -
NameTypeDescription
Address Typeuint8 - Set to value 0 to denote an Ed25519 Address. -
AddressArray<byte>[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
-
-
Amountuint64The amount of tokens to deposit.
-
-
- SigLockedDustAllowanceOutput -
- Describes a deposit which as a special property also alters the dust allowance of the target address. -
- - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Output Typeuint8 - Set to value 1 to denote a SigLockedDustAllowanceOutput. -
Address oneOf -
- Ed25519 Address - - - - - - - - - - - - - - - - -
NameTypeDescription
Address Typeuint8 - Set to value 0 to denote an Ed25519 Address. -
AddressArray<byte>[32]The raw bytes of the Ed25519 address which is a BLAKE2b-256 hash of the Ed25519 public key.
-
-
Amountuint64The amount of tokens to deposit.
-
-
Payload Lengthuint32The length in bytes of the optional payload.
Payload optOneOf -
- Generic Payload -
- An outline of a generic payload -
- - - - - - - - - - - - - - - - -
NameTypeDescription
Payload Typeuint32 - The type of the payload. It will instruct the node how to parse the fields that follow. -
Data FieldsANYA sequence of fields, where the structure depends on Payload Type.
-
-
NameTypeDescription
Output Typeuint8 + Set to value 0 to denote a SigLockedSingleOutput. +
Address oneOf +
+ Ed25519 Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typeuint8 + Set to value 0 to denote an Ed25519 Address. +
AddressByteArray[32]The raw bytes of the Ed25519 address which is the BLAKE2b-256 hash of the public key.
+
+
Amountuint64The amount of tokens to deposit.
-
-
Unlock Blocks Countuint16The count of unlock blocks proceeding. Must match count of inputs specified.
Unlock Blocks anyOf -
- Signature Unlock Block +
+
+ SigLockedDustAllowanceOutput
- Defines an unlock block containing signature(s) unlocking input(s). + Describes a deposit which as a special property also alters the dust allowance of the target address.
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typeuint8 - Set to value 0 to denote a Signature Unlock Block. -
Signature oneOf -
- Ed25519 Signature - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
Signature Typeuint8 - Set to value 0 to denote an Ed25519 Signature. -
Public keyArray<byte>[32]The public key of the Ed25519 keypair which is used to verify the signature.
SignatureArray<byte>[64]The signature signing the Blake2b-256 hash of the serialized Transaction Essence.
-
-
NameTypeDescription
Output Typeuint8 + Set to value 1 to denote a SigLockedDustAllowanceOutput. +
Address oneOf +
+ Ed25519 Address + + + + + + + + + + + + + + + + +
NameTypeDescription
Address Typeuint8 + Set to value 0 to denote an Ed25519 Address. +
AddressByteArray[32]The raw bytes of the Ed25519 address which is the BLAKE2b-256 hash of the public key.
+
+
Amountuint64The amount of tokens to deposit.
-
-
- Reference Unlock Block +
+
Payload Lengthuint32The length in bytes of the optional payload.
Payload optOneOf +
+ Generic Payload
- References a previous unlock block in order to substitute the duplication of the same unlock block data for inputs which unlock through the same data. + An outline of a generic payload.
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typeuint8 - Set to value 1 to denote a Reference Unlock Block. -
Referenceuint16Represents the index of a previous unlock block.
NameTypeDescription
Payload Typeuint32 + The type of the payload. It will instruct the node how to parse the fields that follow. +
Data FieldsANYA sequence of fields, where the structure depends on Payload Type.
+
+
+
+
Unlock Blocks Countuint16The number of unlock block entries. It must match the field Inputs Count.
Unlock Blocks anyOf +
+ Signature Unlock Block +
+ Defines an unlock block containing a signature. +
+ + + + + + + + + + + + + + - + + + +
NameTypeDescription
Unlock Typeuint8 + Set to value 0 to denote a Signature Unlock Block. +
Signature oneOf +
+ Ed25519 Signature + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Signature Typeuint8 + Set to value 0 to denote an Ed25519 Signature. +
Public keyByteArray[32]The Ed25519 public key of the signature.
SignatureByteArray[64]The Ed25519 signature signing the Blake2b-256 hash of the serialized Transaction Essence.
-
-
+
+
+ Reference Unlock Block +
+ References a previous unlock block, where the same unlock block can be used for multiple inputs. +
+ + + + + + + + + + + + + + + + +
NameTypeDescription
Unlock Typeuint8 + Set to value 1 to denote a Reference Unlock Block. +
Referenceuint16Represents the index of a previous unlock block.
+
+
-### Transaction Parts - -In general, all parts of a Transaction Payload begin with a byte describing the type of the given part to keep the flexibility to introduce new types/versions of the given part in the future. +### Transaction parts -#### Transaction Essence Data +In general, all parts of a Transaction Payload begin with a byte describing the type of the given part. This improves the flexibility to introduce new types/versions of the given part in the future. -As described, the Transaction Essence of a Transaction Payload carries the inputs, outputs, and an optional payload. The Transaction Essence is an explicit type and therefore starts with its own Transaction Essence Type byte which is of value 0. +#### Transaction Essence data -A Transaction Essence must contain at least one input and output. +The Transaction Essence of a Transaction Payload carries the inputs, outputs, and an optional payload. The Transaction Essence is an explicit type and therefore starts with its own Transaction Essence Type byte which is of value 0. ##### Inputs -The Inputs part holds the inputs to consume, respectively, to fund the outputs of the Transaction Essence. There is only one type of input as of now, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. +The Inputs part holds the inputs to consume in order to fund the outputs of the Transaction Payload. Currently, there is only one type of input, the UTXO Input. In the future, more types of inputs may be specified as part of protocol upgrades. -Each defined input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. - -If multiple inputs can be unlocked through the same Unlock Block, then the given Unlock Block only needs to be specified at the index of the first input which gets unlocked by it. - -Subsequent inputs which are unlocked through the same data must have a Reference Unlock Block pointing to the index of a previous Unlock Block. -This ensures that no duplicate data needs to occur in the same transaction. +Each input must be accompanied by a corresponding Unlock Block at the same index in the Unlock Blocks part of the Transaction Payload. ###### UTXO Input -An UTXO Input is an input which references an output of a previous transaction by using the given transaction's BLAKE2b-256 hash + the index of the output on that transaction. An UTXO Input must be accompanied by an Unlock Block for the corresponding type of output the UTXO Input is referencing. +A UTXO Input is an input which references an unspent output of a previous transaction. This UTXO is uniquely defined by the _Transaction ID_ of that transaction together with corresponding output index. Each UTXO Input must be accompanied by an Unlock Block that is allowed to unlock the output the UTXO Input is referencing. -Example: If the output the input references outputs to an Ed25519 address, then the corresponding unlock block must be of type Signature Unlock Block holding an Ed25519 signature. +Example: +If the input references an output to an Ed25519 address, then the corresponding unlock block must be of type Signature Unlock Block holding an Ed25519 signature. ##### Outputs -The Outputs part holds the outputs to create with this Transaction Payload. +The Outputs part holds the outputs that are created by this Transaction Payload. The following output types are supported: ###### SigLockedSingleOutput -The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. This output can hold addresses of different types. +The SigLockedSingleOutput defines an output (with a certain amount) to a single target address which is unlocked via a signature proving ownership over the given address. This output supports addresses of different types. ###### SigLockedDustAllowanceOutput -The SigLockedDustAllowanceOutput works the same as a SigLockedSingleOutput but additionally controls the dust allowance on the target address. See [Dust Protection RFC-0032 (draft)](https://github.com/iotaledger/protocol-rfcs/pull/32) for further information. +The SigLockedDustAllowanceOutput works in the same way as a SigLockedSingleOutput but additionally controls the dust allowance on the target address. See [Dust Protection RFC-0032 (draft)](https://github.com/iotaledger/protocol-rfcs/pull/32) for further information. ##### Payload -The _Transaction Essence_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). This payload does not affect the semantic validity of the Transaction Essence. If the transaction is not syntactically valid, then the payload must also be discarded. +The _Transaction Essence_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). If the transaction is not [semantically valid](#semantic-validation), then the payload must also be discarded. -The following table lists all the payloads types that can be nested inside a _Transaction Essence_ as well as links to the corresponding specification: +The following table lists all the payload types that can be nested inside a _Transaction Essence_ as well as links to the corresponding specification: | Name | Type Value | RFC | | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- | @@ -447,119 +439,105 @@ The following table lists all the payloads types that can be nested inside a _Tr #### Unlock Blocks -The Unlock Blocks part holds the unlock blocks unlocking inputs within an Transaction Essence. - -There are different types of Unlock Blocks: - -| Name | Value | Description | -| ---------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| Signature Unlock Block | 0 | An unlock block holding one or more signatures unlocking one or more inputs. | -| Reference Unlock Block | 1 | An unlock block which must reference a previous unlock block which unlocks also the input at the same index as this Reference Unlock Block. | - +The Unlock Blocks part holds the unlock blocks unlocking inputs within a Transaction Essence. The following types of unlock blocks are supported: ##### Signature Unlock Block -A Signature Unlock Block defines an Unlock Block which holds one or more signatures signing the Blake2b-256 hash of the Transaction Essence (including the optional payload). +A Signature Unlock Block defines an Unlock Block which holds a signature signing the BLAKE2b-256 hash of the Transaction Essence (including the optional payload). ##### Reference Unlock block -A Reference Unlock Block defines an Unlock Block which references a previous Unlock Block (which must not be another Reference Unlock Block). It must be used if multiple inputs can be unlocked through the same origin Unlock Block. +A Reference Unlock Block defines an Unlock Block which references a previous Unlock Block (which must not be another Reference Unlock Block). It **must** be used if multiple inputs can be unlocked via the same Unlock Block. Example: -Consider an Transaction Essence containing UTXO Inputs A, B and C, where A and C are both spending the UTXOs originating from the same Ed25519 address. The Unlock Block part must thereby have following structure: +Consider a Transaction Essence containing the UTXO Inputs 0, 1 and 2, where 0 and 2 are both spending outputs belonging to the same Ed25519 address A and 1 is spending from a different address B. This results in the following structure of the Unlock Blocks part: -| Index | Must Contain | -| ----- | ----------------------------------------------------------------------------------------------------------- | -| 0 | A _Signature Unlock Block_ holding the corresponding Ed25519 signature to unlock A and C. | -| 1 | A _Signature Unlock Block_ which unlocks B. | -| 2 | A _Reference Unlock Block_ which references index 0, since C also gets unlocked by the same signature as A. | +| Index | Unlock Block | +| ----- | ---------------------------------------------------------------------------------------- | +| 0 | A _Signature Unlock Block_ holding the Ed25519 signature for address A. | +| 1 | A _Signature Unlock Block_ holding the Ed25519 signature for address B. | +| 2 | A _Reference Unlock Block_ which references 0, as both require the same signature for A. | ## Validation -A Transaction Payload payload has different validation stages, since some validation steps can only be executed at the point when certain information has (or has not) been received. We therefore distinguish between syntactical- and semantic validation. +A Transaction Payload has different validation stages, since some validation steps can only be executed when certain information has (or has not) been received. We therefore distinguish between syntactic and semantic validation: -### Syntactical Validation +### Syntactic validation -This validation can commence as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be broadcasted further and can be discarded right away. +Syntactic validation is checked as soon as the transaction data has been received in its entirety. It validates the structure but not the signatures of the transaction. If the transaction does not pass this stage, it must not be broadcasted further and can be discarded right away. -The following criteria defines whether the transaction passes the syntactical validation: +The following criteria defines whether a payload passes the syntactical validation: * Essence: - * `Transaction Type` value must be 0, denoting an `Transaction Essence`. + * `Transaction Type` value must denote a _Transaction Essence_. * Inputs: * `Inputs Count` must be 0 < x ≤ 127. - * At least one input must be specified. - * `Input Type` value must be 0, denoting an `UTXO Input`. - * `UTXO Input`: + * For each input the following must be true: + * `Input Type` must denote a _UTXO Input_. * `Transaction Output Index` must be 0 ≤ x < 127. - * Every combination of `Transaction ID` + `Transaction Output Index` must be unique in the inputs set. - * Inputs must be sorted in lexicographical order of their serialized form.1 + * `Inputs` must be sorted in lexicographical order of their serialized form.1 + * Each pair of `Transaction ID` and `Transaction Output Index` must be unique in the inputs set. * Outputs: * `Outputs Count` must be 0 < x ≤ 127. - * At least one output must be specified. - * `Output Type` must denote a `SigLockedSingleOutput` or `SigLockedDustAllowanceOutput`. - * `SigLockedSingleOutput`/`SigLockedDustAllowanceOutput`: - * `Address Type` must be 0, denoting an `Ed25519` address. - * The `Address` must be unique in the set of `SigLockedSingleOutputs`/`SigLockedDustAllowanceOutputs` (two separate sets). + * For each input the following must be true: + * `Output Type` must denote a _SigLockedSingleOutput_ or a _SigLockedDustAllowanceOutput_. + * `Address Type` must denote an _Ed25519 Address_. * `Amount` must be larger than zero. - * Outputs must be sorted in lexicographical order by their serialized form.1 - * Accumulated output balance must not exceed the total supply of tokens `2'779'530'283'277'761`. + * `Outputs` must be sorted in lexicographical order of their serialized form.1 + * Each `Address` must be unique per output type. For example, a _SigLockedSingleOutput_ and a _SigLockedDustAllowanceOutput_ can have the same address, but not two _SigLockedSingleOutputs_. + * The sum of all `Amount` fields must not exceed the total IOTA supply of 2,779,530,283,277,761. * Payload (if present): * `Payload Type` must match one of the values described under [Payload](#payload). * `Data fields` must be correctly parsable in the context of the `Payload Type`. * The payload itself must pass syntactic validation. * Unlock Blocks: * `Unlock Blocks Count` must match `Inputs Count` of the _Transaction Essence_. - * `Unlock Type` must either be 0 or 1, denoting a `Signature Unlock Block` or `Reference Unlock block`. - * `Signature Unlock Blocks` must define a `Ed25519 Signature`. - * A `Signature Unlock Block` unlocking multiple inputs must only appear once (be unique) and be positioned at the same index of the first input it unlocks. All other inputs unlocked by the same `Signature Unlock Block` must have a companion `Reference Unlock Block` at the same index as the corresponding input which points to the origin `Signature Unlock Block`. - * `Reference Unlock Blocks` must specify a previous `Unlock Block` which is not of type `Reference Unlock Block`. The reference index must therefore be < the index of the `Reference Unlock Block`. + * Each `Unlock Type` must denote a _Signature Unlock Block_ or a _Reference Unlock Block_. + * Each _Signature Unlock Block_ must contain an _Ed25519 Signature_. + * Each _Signature Unlock Block_ must be unique. + * A _Reference Unlock Block_ at index i must have `Reference` < i and the unlock block at index `Reference` must be a _Signature Unlock Block_. * Given the type and length information, the _Transaction Payload_ must consume the entire byte array of the `Payload` field of the encapsulating object. 1 ensures that serialization of the transaction becomes deterministic, meaning that libraries always produce the same bytes given the logical transaction. -### Semantic Validation +### Semantic validation -Semantic validation starts when a message that is part of a confirmation cone of a milestone is processed in the [White-Flag ordering](https://iotaledger.github.io/protocol-rfcs/0005-white-flag/0005-white-flag.html#deterministically-ordering-the-tangle). Semantics are only validated during White-Flag confirmations to enforce an ordering that can be understood by all the nodes (i.e. milestone cones), no matter the order the transactions are received. Otherwise, if semantic validation would occur as soon as a transaction would be received, it could potentially lead to nodes having different views of the UTXOs available to spend. +The Semantic validation of a _Transaction Payload_ is performed when its encapsulating message is confirmed by a milestone. The semantic validity of transactions depends on the order in which they are processed. Thus, it is necessary that all the nodes in the network perform the checks in the same order, no matter the order in which the transactions are received. This is assured by using the White-Flag ordering as described in [RFC-005](https://iotaledger.github.io/protocol-rfcs/0005-white-flag/0005-white-flag.html#deterministically-ordering-the-tangle). +Processing transactions according to the White-Flag ordering enables users to spend UTXOs which are created in the same milestone confirmation cone, as long as the spending transaction comes after the funding transaction in the aforementioned White-Flag order. In this case, it is recommended that users include the _Message ID_ of the funding transaction as a parent of the message containing the spending transaction. -Processing transactions in the White-Flag ordering enables users to spend UTXOs which are in the same milestone confirmation cone, if their transaction comes after the funding transaction in the mentioned White-Flag ordering. It is recommended that users spending unconfirmed UTXOs attach their message directly onto the message containing the source transaction. +The following criteria defines whether a payload passes the semantic validation: +* Each input must reference a valid UTXO, i.e. the output referenced by the input's `Transaction ID` and `Transaction Output Index` is known (booked) and unspent. +* The transaction must spend the entire balance, i.e. the sum of the `Amount` fields of all the UTXOs referenced by inputs must match the sum of the `Amount` fields of all outputs. +* Each unlock block must be valid with respect to the UTXO referenced by the input of the same index: + * If it is a _Signature Unlock Block_: + * The `Signature Type` must match the `Address Type` of the UTXO, + * the BLAKE2b-256 hash of `Public Key` must match the `Address` of the UTXO and + * the `Signature` field must contain a valid signature for `Public Key`. + * If it is a _Reference Unlock Block_, the referenced _Signature Unlock Block_ must be valid with respect to the UTXO. -The following criteria defines whether the transaction passes the semantic validation: -1. The UTXOs the transaction references must be known (booked) and unspent. -1. The transaction is spending the entirety of the funds of the referenced UTXOs to the outputs. -1. The address type of the referenced UTXO must match the signature type contained in the corresponding Signature Unlock Block. -1. The Signature Unlock Blocks are valid, i.e. the signatures prove ownership over the addresses of the referenced UTXOs. +If a _Transaction Payload_ passes the semantic validation, its referenced UTXOs must be marked as spent and its new outputs must be created/booked in the ledger. The _Message ID_ of the message encapsulating the processed payload then also becomes part of the input for the White-Flag Merkle tree hash of the confirming milestone ([RFC-0012](https://iotaledger.github.io/protocol-rfcs/0012-milestone-merkle-validation/0012-milestone-merkle-validation.html)). -If a transaction passes the semantic validation, its referenced UTXOs must be marked as spent and the corresponding new outputs must be booked/specified in the ledger. The booked transaction then also becomes part of the White-Flag Merkle tree inclusion set. - -Transactions which do not pass semantic validation are ignored. Their UTXOs are not marked as spent and neither are their outputs booked into the ledger. +Transactions that do not pass semantic validation are ignored. Their UTXOs are not marked as spent and their outputs are not booked in the ledger. ## Miscellaneous -### Absent transaction timestamp - -A transaction timestamp whether signed or not, does not actually tell when the transaction was issued. Therefore, the timestamp has been left out from the transaction structure. The correct way to determine the issuance time is to use a combination of the solidification and confirmation timestamps of the message embedding the transaction. +### Transaction timestamps -### How to compute the balance +Since transaction timestamps -- whether they are signed or not -- do not provide any guarantee of correctness, they have been left out of the _Transaction Payload_. Applications relying on some notion of time for transactions can use the local solidification time or the global timestamp of the confirming milestone ([RFC-0019](https://iotaledger.github.io/protocol-rfcs/0019-milestone-payload/0019-milestone-payload.html)). -Since the ledger is no longer account based, meaning that balances are directly mapped to addresses, computing the balance involves iterating over all UTXOs where their destination address is the address in question and then accumulating their amounts. +### Address reuse -### Reusing the same address with Ed25519 +While, in contrast to Winternitz one-time signatures (W-OTS), producing multiple Ed25519 signatures for the same private key and address does not decrease its security, it still drastically reduces the privacy of users. It is thus considered best practice that applications and services create a new address per deposit to circumvent these privacy issues. -While creating multiple signatures with Ed25519 does not reduce security, repeatedly reusing the same address not only drastically reduces the privacy of users but also all other people in the UTXO chain of the moved funds. Applications and services are then instructed to create new addresses per deposit, to circumvent the privacy issues stemming from address reuse. -In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. -Ed25519 addresses are not meant to be used like an e-mail address. See this [Bitcoin wiki entry](https://en.bitcoin.it/wiki/Address_reuse#:~:text=The%20most%20private%20and%20secure,a%20brand%20new%20bitcoin%20address.) for further information on how address reuse reduces privacy and this [article](https://en.bitcoin.it/wiki/Receiving_donations_with_bitcoin) on why the same should be applied to donation addresses. +In essence, Ed25519 support allows for smaller transaction sizes and to safely spend funds which were sent to an already used deposit address. Ed25519 addresses are not meant to be used like email addresses. See this [Bitcoin wiki article](https://en.bitcoin.it/wiki/Address_reuse) for further information. # Drawbacks -The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate for it, including client libraries, blueprints, PoC, and applications using IOTA in general. There is no way to keep the changes backwards compatible. Additionally, these changes are breaking, meaning that all nodes must upgrade to further participate in the network. - -Additionally, local snapshots can no longer be represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside on. Therefore, local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices, and then the destination addresses including the balances. +* The new transaction format is the core data type within the IOTA ecosystem. Changing it means that all projects need to accommodate it, including wallets, web services, client libraries and applications using IOTA in general. It is not possible to keep these changes backwards compatible, meaning that all nodes must upgrade to further participate in the network. +* Additionally, local snapshots can no longer be represented by a list of addresses and their balances, since the ledger is now made up of the UTXOs on which the actual funds reside. Therefore, local snapshot file schemes have to be adjusted to incorporate the transaction hashes, output indices, and then the destination addresses including the balances. # Rationale and alternatives -Introducing this new transaction structure allows for further extensions in the future, to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case funds appear to be deposited onto a previous generated address. Due to the switch to a complete binary transaction, size is further reduced, saving network bandwidth and processing time. - -Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would not have been safe against replay attacks, which deems reusing the old transaction structure, for example for Ed25519 addresses/signatures, as infeasible. - -Not switching to the new transaction structure described in this RFC leads to people being open to loss of funds because of WOTS address re-use and not being able to properly extend the protocol further down the line. +* Introducing this new transaction structure allows for extensions in the future, to accommodate new requirements. With the support for Ed25519 addresses/signatures, transaction size is drastically reduced and allows for safe re-signing in case of address reuse. Due to the switch to a complete binary transaction, the transaction size is reduced even further, saving network bandwidth and processing time. +* Other transaction structures have been considered but they would have misused existing transaction fields to accommodate for new features, instead of putting them into a proper descriptive structure. Additionally, those ideas would not have been safe against replay attacks, which deems reusing the old transaction structure, for example for Ed25519 addresses/signatures, as infeasible. +* Not switching to the new transaction structure described in this RFC would have led to more people losing funds because of W-OTS address reuse and it would prevent extending the IOTA protocol further down the line. From 63bdac0c8f955bbfdb351c284a4d70270ba06afc Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Thu, 4 Nov 2021 14:05:08 +0100 Subject: [PATCH 34/35] Fix en-dash --- text/0018-transaction-payload/0018-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index ca238bf5d..35bb5bf02 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -523,7 +523,7 @@ Transactions that do not pass semantic validation are ignored. Their UTXOs are n ### Transaction timestamps -Since transaction timestamps -- whether they are signed or not -- do not provide any guarantee of correctness, they have been left out of the _Transaction Payload_. Applications relying on some notion of time for transactions can use the local solidification time or the global timestamp of the confirming milestone ([RFC-0019](https://iotaledger.github.io/protocol-rfcs/0019-milestone-payload/0019-milestone-payload.html)). +Since transaction timestamps – whether they are signed or not – do not provide any guarantee of correctness, they have been left out of the _Transaction Payload_. Applications relying on some notion of time for transactions can use the local solidification time or the global timestamp of the confirming milestone ([RFC-0019](https://iotaledger.github.io/protocol-rfcs/0019-milestone-payload/0019-milestone-payload.html)). ### Address reuse From 03725311c98b9f04fa355fb5e08ebf07b2a79f11 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Thu, 4 Nov 2021 14:34:36 +0100 Subject: [PATCH 35/35] Clarify semantic validity of the payload --- text/0018-transaction-payload/0018-transaction-payload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0018-transaction-payload/0018-transaction-payload.md b/text/0018-transaction-payload/0018-transaction-payload.md index 35bb5bf02..f3d2d19c4 100644 --- a/text/0018-transaction-payload/0018-transaction-payload.md +++ b/text/0018-transaction-payload/0018-transaction-payload.md @@ -429,7 +429,7 @@ The SigLockedDustAllowanceOutput works in the same way as a SigLockedS ##### Payload -The _Transaction Essence_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). If the transaction is not [semantically valid](#semantic-validation), then the payload must also be discarded. +The _Transaction Essence_ itself can contain another payload as described in general in [RFC-0017](https://iotaledger.github.io/protocol-rfcs/0017-tangle-message/0017-tangle-message.html). The [semantic validity](#semantic-validation) of the encapsulating _Transaction Payload_ does not have any impact on the payload. The following table lists all the payload types that can be nested inside a _Transaction Essence_ as well as links to the corresponding specification: