Reviewed Aug 2026
DE
BA-05 · LESSON 12

Witnesses, wtxids, and block commitments

KEY DEFINITIONS

Terms used in this lesson

Witness
Signatures, scripts, or other data supplied to satisfy a Bitcoin output’s spending condition.
Witness transaction ID
An identifier that commits to a transaction including its witness data.
Transaction ID
The identifier produced by hashing a Bitcoin transaction’s non-witness serialization.
Coinbase transaction
The special first transaction in a Bitcoin block, which claims permitted subsidy and fees and has no ordinary prior-output input.
SegWit
Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
Signature malleability
The possibility that related signature representations can authorize the same message unless a scheme and its rules enforce a canonical form.
HASH256
Bitcoin's name for applying SHA-256 twice to the same byte sequence.
OP_RETURN
A Bitcoin Script operation commonly used to create an unspendable output carrying a small amount of data.
Outpoint
A transaction ID plus output number that identifies one exact prior output.

Trace witness serialization, txid versus wtxid, the coinbase witness reserved value, and the witness commitment that binds SegWit data into a block.

65 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

SegWit serialization inserts marker 00 and flag 01 after version, keeps the same inputs and outputs, then appends one witness stack for every input before locktime. The txid excludes marker, flag, and witnesses. The wtxid includes them. A block commits all transaction witness identifiers through a witness Merkle root and a commitment in the coinbase output.

GUIDED EXPLANATION1/5 ideas inspected
1

Detect SegWit serialization

After version, marker 00 and nonzero flag select extended serialization. The following input and output vectors keep their ordinary format.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionWitness data is outside the blockchain and is not committed by proof of work.

Witness bytes are transmitted and stored with SegWit blocks. Their wtxids feed a witness commitment inside the coinbase, which is committed by the ordinary block Merkle root and header.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.