Skip to content

Commit 027c6f4

Browse files
committed
Standardize terminology around taptree vs tapleaf Merkle tree.
1 parent fa00729 commit 027c6f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bip-0360.mediawiki

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ In other words, P2TSH outputs commit to the Merkle root of a tapscript tree with
125125

126126
This output type is designed to offer tapscript users protection against long exposure quantum attacks as well as a practical output type with which post-quantum signatures may be used if such signatures are adopted in the future.
127127

128-
Since P2TSH outputs have no key path spend, they omit the Taproot internal key. Instead, a P2TSH output includes the 32-byte root of the tapleaf Merkle tree as defined in [[bip-0341.mediawiki|BIP 341]] hashed with the tag "TapBranch" as shown below.
128+
Since P2TSH outputs have no key path spend, they omit the Taproot internal key. Instead, a P2TSH output includes the 32-byte root of the taptree as defined in [[bip-0341.mediawiki|BIP 341]] hashed with the tag "TapBranch" as shown below.
129129

130130
[[File:bip-0360/media/merkletree.png|thumb|Construction of P2TSH Taptree root, scriptPubkey, and Witness]]
131131

@@ -184,7 +184,7 @@ Additionally, there is a privacy tradeoff when comparing P2TSH and P2TR, which i
184184

185185
We define the Pay-to-Tapscript-Hash (P2TSH) output structure as follows:
186186

187-
A P2TSH output is similar to a P2TR output that uses the root of a tapleaf Merkle tree (as defined in [[bip-0341.mediawiki|BIP 341]]); however, unlike P2TR outputs, we disable the key path spend for the benefit of quantum resistance by omitting the internal key and the tap tweak step. The root of the Merkle tree is then set as the witness program, prepended with a SegWit version 2 byte, and committed to in the output scriptPubKey.
187+
A P2TSH output is similar to a P2TR output that uses the root of a taptree (as defined in [[bip-0341.mediawiki|BIP 341]]); however, unlike P2TR outputs, we disable the key path spend for the benefit of quantum resistance by omitting the internal key and the tap tweak step. The root of the Merkle tree is then set as the witness program, prepended with a SegWit version 2 byte, and committed to in the output scriptPubKey.
188188

189189
===Address Format===
190190

@@ -214,7 +214,7 @@ Where:
214214

215215
A P2TSH output is a native SegWit output (see [[bip-0141.mediawiki|BIP 141]]) with version 2 and a 32-byte witness program. The witness program is the root of the tapscript tree. For the sake of comparison, we have - as much as possible - copied the language verbatim from the script validation section of [[bip-0341.mediawiki|BIP 341]].
216216

217-
* Let ''q'' be the 32-byte array containing the witness program (the second push in the scriptPubKey) which represents the root of the tapleaf Merkle tree.
217+
* Let ''q'' be the 32-byte array containing the witness program (the second push in the scriptPubKey) which represents the root of the tapleaf Merkle tree (also known as a taptree).
218218
* Fail if the witness stack does not have two or more elements.
219219
* If there are at least three witness elements, and the first byte of the last element is 0x50, this last element is called ''annex a'' and is removed from the witness stack. The annex (or the lack thereof) is always covered by the signature and contributes to transaction weight, but is otherwise ignored during P2TSH validation.
220220
* There must be at least two witness elements left.

0 commit comments

Comments
 (0)