Nyzo techData formatsTransaction

Transaction

The structure of the transaction depends on the type of the transaction. All transactions begin with a transaction type followed by a timestamp. The timestamp determines block membership of the transaction. Every transaction has one and only one block in which it can be incorporated. If the transaction is not incorporated in that block, there is no possibility of the transaction being incorporated in a later block.

All transactions except coin-generation transactions contain signatures. Coin-generation transactions are only allowed in block 0, the Genesis block. Therefore, all transactions past the Genesis block are signed.

Transaction types with "sign" and "store" columns use different representations for signing and for storage / transmission. Check marks indicate whether a field is included in the signing representation, the storage / transmission representation, or both representations.

Coin generation (type 0)

name
size
description/notes
type
1 byte
8-bit unsigned integer denoting the type (0) of the transaction
timestamp
8 bytes
64-bit Unix timestamp of the transaction, in milliseconds
amount
8 bytes
64-bit amount of the transaction, in micronyzos
receiver identifier
32 bytes
Ed25519 public key of the receiver of this transaction

Seed (type 1) and standard (type 2)

name
size
sign
store
description/notes
type
1 byte
8-bit unsigned integer denoting the type (seed=1, standard=2) of the transaction
timestamp
8 bytes
64-bit Unix timestamp of the transaction, in milliseconds
amount
8 bytes
64-bit amount of the transaction, in micronyzos
receiver identifier
32 bytes
Ed25519 public key of the receiver of this transaction
previous-block hash
32 bytes
the hash of an earlier block in the blockchain, used to protect against eclipse attacks
previous-hash height
8 bytes
height of the block represented by the previous-block hash
sender identifier
32 bytes
Ed25519 public key of the sender of this transaction; must be the same as the receiver for seed transactions
sender data
variable, up to 33 bytes
user-determined, 1 byte length specifier followed by up to 32 bytes of data
sender-data hash
32 bytes
double SHA-256 of the sender data
signature
64 bytes
Ed25519 signature of the bytes of all "sign" fields

Cycle (type 3)

name
size
sign
store
description/notes
type
1 byte
8-bit unsigned integer denoting the type (3) of the transaction
timestamp
8 bytes
64-bit Unix timestamp of the transaction, in milliseconds
amount
8 bytes
64-bit amount of the transaction, in micronyzos
receiver identifier
32 bytes
Ed25519 public key of the receiver of this transaction
previous-block hash
32 bytes
the hash of an earlier block in the blockchain, used to protect against eclipse attacks
previous-hash height
8 bytes
height of the block represented by the previous-block hash
signer identifier
32 bytes
Ed25519 public key of the signer of this transaction; unlike seed and standard transactions, this is not the source of funds for this transaction
sender data
variable, up to 33 bytes
user-determined, 1 byte length specifier followed by up to 32 bytes of data
sender-data hash
32 bytes
double SHA-256 of the sender data
signature
64 bytes
Ed25519 signature of the bytes of all "sign" fields
cycle signatures, v1
variable, 1 byte length specifier, 96 bytes per signature
identifiers (32 bytes) and Ed25519 signatures (64 bytes) from cycle verifiers, stored in the approving block
cycle signatures, v2
variable; 1 byte length specifier, 105 bytes per signature
timestamps (8 bytes), identifiers (32 bytes), votes (yes/no, 1 byte), and Ed25519 signatures (64 bytes) from cycle verifiers, stored in the balance list

Cycle signature (type 4)

name
size
sign
store
description/notes
type
1 byte
8-bit unsigned integer denoting the type (4) of the transaction
timestamp
8 bytes
64-bit Unix timestamp of the transaction, in milliseconds
signer identifier
32 bytes
Ed25519 public key of the signer
vote
1 byte
1=yes, [all other values]=no
original transaction signature
64 bytes
Ed25519 signature of the cycle transaction, not stored in the list of signatures attached to cycle transactions in the balance list
signature
64 bytes
Ed25519 signature of the bytes of all other fields