For a Taproot output with a script tree, the output key is an internal public key tweaked with the tree's Merkle root, and Bitcoin Core checks a script path spend in VerifyTaprootCommitment by recomputing that root and verifying the tweak.
Sources and checks
T1Bitcoin Core src/script/interpreter.cpp, VerifyTaprootCommitmentSource code, says this directly
// Verify that the output pubkey matches the tweaked internal pubkey, after correcting for parity.
VerifyTaprootCommitment, read 2026-11-20
T1BIP 341, TaprootBIP, supports part of it
of a Merkle tree whose leaves consist of a version number and a script.
Informal design overview, read 2026-11-20
bitcoin/bitcoin at f498a5a671 contains this text in src/script/interpreter.cpp, and still does on the default branch.
Run it yourself
git clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/script/interpreter.cpp | grep -nF 'const uint256 merkle_root = ComputeTaprootMerkleRoot(control, tapleaf_hash);'bitcoin/bitcoin at f498a5a671 contains this text in src/script/interpreter.cpp, and still does on the default branch.
Run it yourself
git clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/script/interpreter.cpp | grep -nF 'return q.CheckTapTweak(p, merkle_root, control[0] & 1);'Checked at block 976,759, 20 Nov 2026, 17:27 UTC: quotes 2/2, code 2/2
History
Nothing is edited silently; every revision keeps what it replaced.
- 20 Nov 2026, 17:27 UTCblock 976,759
Published Revision 1, run 2026-11-20-seed-taproot