<p>By <a href="https://github.com/bitcoin/bips/blob/master/bip-0386.mediawiki" rel="nofollow noreferrer">BIP 386</a>, <code>tr(pkh(...))</code> is not a valid descriptor. By <a href="https://github.com/bitcoin/bips/blob/master/bip-0379.md" rel="nofollow noreferrer">BIP 379</a> however, it is valid.</p>
<blockquote>
<p>Which one is the correct specification?</p>
</blockquote>
<p>That depends on which descriptor extensions you choose to follow. Bitcoin Core implements both.</p>
<p>Perhaps the language could be less confusing, but BIPs do not specify what is unconditionally valid or invalid. They're proposals that pieces of software can choose to implement or not, and thus they only specify what implementers of <em>that specific BIP</em> have to do to be in compliance.</p>

CC BY-SA 4.0
2024-07-08T23:58:23.593Z
My question has been clarified. Thank you!
Shigeyuki Azuchi
CC BY-SA 4.0
2024-07-08T13:56:31.870Z
2024-07-08T13:56:31.870Z
Pieter Wuille
<p>In <a href="https://github.com/bitcoin/bips/blob/master/bip-0386.mediawiki" rel="nofollow noreferrer">BIP386</a>, <code>pkh()</code> nested in <code>tr()</code> is noted as invalid in the Test Vector:</p>
<p><a href="https://i.sstatic.net/VNMI6yth.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VNMI6yth.png" alt="enter image description here" /></a></p>
<p>However, it is enabled in the Bitcoin Core test cases:</p>
<p><a href="https://github.com/bitcoin/bitcoin/blob/v27.1/src/test/descriptor_tests.cpp#L636" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/v27.1/src/test/descriptor_tests.cpp#L636</a></p>
<p>Which one is the correct specification?</p>

<taproot><validation><output-script-descriptors>
pkh() nested in tr() is allowed?
Shigeyuki Azuchi
# pkh() nested in tr() is allowed?

(Asked by: username_0 on 2024-07-08)

In [BIP386](https://github.com/bitcoin/bips/blob/master/bip-0386.mediawiki), `pkh()` nested in `tr()` is noted as invalid in the Test Vector:

[![enter image description here](https://i.sstatic.net/VNMI6yth.png)](https://i.sstatic.net/VNMI6yth.png)

However, it is enabled in the Bitcoin Core test cases:

<https://github.com/bitcoin/bitcoin/blob/v27.1/src/test/descriptor_tests.cpp#L636>

Which one is the correct specification?

**Tags:** taproot, validation, output-script-descriptors


---

## 1 answers

### Answer by username_1 on 2024-07-08. Score: 3 | Accepted answer

By [BIP 386](https://github.com/bitcoin/bips/blob/master/bip-0386.mediawiki), `tr(pkh(...))` is not a valid descriptor. By [BIP 379](https://github.com/bitcoin/bips/blob/master/bip-0379.md) however, it is valid.

> Which one is the correct specification?

That depends on which descriptor extensions you choose to follow. Bitcoin Core implements both.

Perhaps the language could be less confusing, but BIPs do not specify what is unconditionally valid or invalid. They're proposals that pieces of software can choose to implement or not, and thus they only specify what implementers of *that specific BIP* have to do to be in compliance.

> **Comments:**
> **username_0**: My question has been clarified. Thank you!  

---

