getTransaction3 (58)

Planned Upgrade

The getTransaction3 message is a request for the full binary data of a single, specific transaction, identified by its transaction ID (TxID).

This is a more targeted version of getTransactions2 and is used when a node needs to fetch just one particular transaction.

Core Data Types

Payload Structure

FieldData TypeMinMaxDescription
transactionIDIxiBytesThe transaction ID (hash) of the transaction being requested.
blockNumIxiVarUInt0The block number that this transaction is expected to be in. 0 if the block is unknown or the transaction is from the mempool.

Behavioral Notes

  • A node sends this message to fetch a single missing transaction.
  • The blockNum field provides a hint to the receiving peer about where to look for the transaction, which can optimize the lookup process (e.g., check a specific block's cache before searching the entire database).
  • Upon receiving this message, a peer should find the requested transaction and send it back to the requester using a transactionData2 message.
  • If the transaction is not found, no response is required.