14

I'm vaguely familiar with Bitcoin's UTXO-based transaction structure and Ethereum's account-based/gas-including transaction structure.

What does an IOTA transaction contain?

1
  • I’m voting to close this question because it is about the legacy protocol and given the latest updates it might make sense to only keep recent Shimmer, ShimmerEVM and IOTA Chrysalis questions Apr 28 at 7:01

1 Answer 1

19

Trinary Note

  • In the "normal" world we have bytes & bits, where 1 byte is 8 bits giving us 2^8 = 256 possible data values for 1 byte.
  • In the trinary world we have trytes & trits, where 1 tryte is 3 trits giving us 3^3 = 27 possible data values for 1 tryte. This is what IOTA uses to stores its transaction data.

Transaction Composition

One IOTA transaction consists of 2673 trytes. Note, however, that a user will usually broadcast a collection of multiple transactions (also called a bundle). One bundle could consist of

  1. Withdrawal transaction (acquire funds to be spent from some address)
  2. Payment transactions (pay some other address a sub or total amount of the funds withdrawn)
  3. Change transaction (deposit unspent funds back to one of the user's addresses)

Note that bundles are not restricted to a specific number of transactions. For exmaple, one could have a bundle that consists of just one transaction (when a value of 0 is "transferred").

The data segments within one transaction are as follows.

Core Data
  1. Signature Message Fragment contains the transaction signature = 2187 trytes
  2. Address is either receipt address (if value > 0) or withdrawal address (if value < 0) = 81 trytes
  3. Value is the amount of IOTA transferred = 27 trytes
  4. Obsolete Tag is some arbitrary user-defined value = 27 trytes
  5. Time Stamp of when the transaction was issued = 9 trytes
  6. Current Index of this transaction in its bundle = 9 trytes
  7. Last Index is the total number of transactions in the bundle = 9 trytes
Hashes
  1. Bundle Hash is the hash of the entire bundle = 81 trytes
  2. Trunk Hash is the hash of the 1st transaction referenced/approved = 81 trytes
  3. Branch Hash is the hash of the 2nd transaction referenced/approved = 81 trytes
Another Tag
  1. Tag is another arbitrary user-defined value = 27 trytes
Additional Time Stamps
  1. Attachment Time is the time stamp for when PoW is completed = 9 trytes
  2. Attachment Time (lower bound) is a slot for future use = 9 trytes
  3. Attachment Time (upper bound) is a slot for future use = 9 trytes
Proof-of-Work Data
  1. Nonce is the PoW nonce of the transaction = 27 trytes

Additional Links

https://github.com/iotaledger/iri/.../controllers/TransactionViewModel.java
https://github.com/alon-e/iotaWayback
https://iota.readme.io/docs/the-anatomy-of-a-transaction

4
  • Actually, the Nonce has been reduced to 27 trytes, and the remaining part of the (old) nonce is used for a second Tag field (27 trytes) and three timestamp fields (9 trytes each)
    – mihi
    Nov 29, 2017 at 20:02
  • @mihi Do you have a source? Then I can update my answer accordingly.
    – Phil-ZXX
    Nov 29, 2017 at 22:34
  • iri commit: github.com/iotaledger/iri/commit/…
    – mihi
    Nov 29, 2017 at 22:46
  • Small clarification: 8. is the hash of the fields 2 to 7 of the entire bundle (it obviously cannot contain itself, the signature, or one of the other hashes, but it also does not include the additional timestamps)
    – mihi
    Dec 2, 2017 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.