The witness’s commitments in one output of a Coinbase transaction include:OP_RETURN commitment_prefix|witness_commitment
where commitment_prefix=0xaa21a9ed
andwitness_commitment=sha256(sha256(witness_merkle_root|witness_reserved_value))
.
witness_merkle_root
The root of the Merkle tree, which includes all transactions, takes witness data into account. For Coinbase transactions, you cannot use the actual hash of the transaction due to recursive dependencies. To resolve using all 0:
sha256(sha256(E | F))
│
┌──────────────────┴───────────────────┐
│ │
E = sha256(sha256(A | B)) F = sha256(sha256(C | D))
┌───────────────┴───────────────┐ ┌───────────────┴───────────────┐
│ │ │ │
A (CoinbaseTx) B C D
000... txid_2 txid_3 txid_4
Why use a TX ID set for all 0s rather than ignoring Coinbase transactions and creating a Merkle route?
Discover more from Earlybirds Invest
Subscribe to get the latest posts sent to your email.