Web Interstitial Ad Example

hash – What is TXID?Is it used to calculate merkleroot

[ad_1]

There are two types of transaction identifiers, TXID and WTXID.

TXID represents the result of a double SHA256 of the serialized transaction form without witness data. It is used to uniquely identify the transaction. TXID is also used to create a Merkle tree and indirectly determine the Merkle root.

WTXID represents the result of a double SHA256 of the serialized transaction form including witness data. It is not used to uniquely identify the transection (although it actually represents a unique identifier). The WTXID is used to create a commitment in a coinbase transaction.

If the transaction does not have witness data, then the TXID is equivalent to the WTXID.

Hash of the transaction is the result of a double SHA256 of the entire serialized form of the transaction, whatever it may be. If the transaction is segWit (if it has witness data), then this hash will be equal to the WTXID and will only be used for the commitment in the coinbase transaction. If the transaction is not segWit (if it does not have witness data), then this hash will be equal to the TXID (but also with WTXID) and will be used as a unique identifier, but also for the construction of the merkle root in the block header.

[ad_2]

Source link