Reading the code, I see that transactions can contain an unlimited number of tx_extra_field items.

tx_extra_field is defined in src/cryptonote_core/tx_extra.h as a union of a few possible types, identified by a type byte:

#define TX_EXTRA_TAG_PADDING                0x00
#define TX_EXTRA_TAG_PUBKEY                 0x01
#define TX_EXTRA_NONCE                      0x02
#define TX_EXTRA_MERGE_MINING_TAG           0x03

Further, nonces can be one of:

#define TX_EXTRA_NONCE_PAYMENT_ID           0x00

What are each of these types/formats used for? Also, what is the purpose of padding?



Padding is for adding freeform data of arbitrary length. It can be used to embed any data, for example a human readable mesage.

Pubkey is for the transaction public key (R in the Cryptonote whitepaper).

Nonce is for extra data, currently only used for the payment ID. Classic style payment IDs are 256 bits and unencrypted, while integrated address payment IDs are 64 bits and encrypted.

Merge mining tag is meant to be used for merge mining. Only Fantomcoin can be merged mined to my knowledge.

Minergate's tag's use is unknown. Minergate started using it a few months ago.

Your Answer

