← Back to Glossary

wtxid

The wtxid is a transaction identifier that hashes the entire transaction including its witness data, defined in BIP 141 alongside SegWit's 2017 activation. It complements the txid, which excludes witnesses, and for a transaction with no witness data the two identifiers are identical.

Why it matters

SegWit deliberately made the txid blind to signatures so it could not be malleated, but the network still needs a name for the complete transaction as actually transmitted, signatures included. The wtxid is that name. It lets nodes distinguish two versions of the same transaction that differ only in witness content, and it gives blocks a way to commit to witness data so miners cannot alter signatures after the fact.

It also improved the network layer: BIP 339 introduced wtxid-based transaction relay, which reduced wasted bandwidth from re-fetching transactions that peers had already seen in a different witness form.

How it works

Every block builds a second Merkle tree, this one of wtxids, with the coinbase's own wtxid fixed at 32 zero bytes by convention. The resulting root is embedded in an output of the coinbase transaction as the witness commitment. Upgraded nodes verify that the witnesses they received match this commitment, binding signature data to the block as firmly as the transactions themselves.

Ready to convert your gold to Bitcoin?

Get Your Free Kit →