9

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
#define TX_EXTRA_MYSTERIOUS_MINERGATE_TAG   0xDE

Further, nonces can be one of:

#define TX_EXTRA_NONCE_PAYMENT_ID           0x00
#define TX_EXTRA_NONCE_ENCRYPTED_PAYMENT_ID 0x01

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

Thanks

4

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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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