<blockquote>
<p>But from here I take it that the descriptor format is independent from the network being used.</p>
</blockquote>
<p>I believe you've misread the comment there.</p>
<p>The xpub and xprv formats <strong>do</strong> depend on the network, and by extension, so does the descriptor format.</p>

CC BY-SA 4.0
2023-07-26T17:50:49.323Z
2023-07-26T20:50:04.360Z
2023-07-26T20:50:04.360Z
Pieter Wuille
<p>I'm testing this with the examples provided <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md" rel="nofollow noreferrer">here</a>. More specifically this one:</p>
<pre><code>wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))
</code></pre>
<p>From my raspberry pi running bitcoin core <code>v24.0.1</code>:</p>
<pre><code>$ bitcoin-cli getdescriptorinfo &quot;wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))&quot;
{
  &quot;descriptor&quot;: &quot;wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))#v66cvalc&quot;,
  &quot;checksum&quot;: &quot;v66cvalc&quot;,
  &quot;isrange&quot;: true,
  &quot;issolvable&quot;: true,
  &quot;hasprivatekeys&quot;: false
}
</code></pre>
<p>From a docker image running bitcoin core <code>v23.0.0</code>:</p>
<pre><code>$ docker exec -it bitcoin`enter code here`-dev bitcoin-cli -datadir=./.bitcoin getdescriptorinfo &quot;wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))&quot;
error code: -5
error message:
key 'xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB' is not valid
</code></pre>
<p>Another difference is that the instance running in the docker container is in regtest mode while the other one is mainnet. But from <a href="https://bitcoin.stackexchange.com/questions/90680/why-is-getdescriptorinfo-returning-an-error-invalid-descriptor-code-5#comment123290_90697">here</a> I take it that the descriptor format is independent from the network being used.</p>
<p>So what's the issue here? Descriptors are present since <code>0.17</code></p>

<regtest><output-script-descriptors>
Why is `getdescriptorinfo` saying an xpub is not valid?
Bilthon
# Why is `getdescriptorinfo` saying an xpub is not valid?

(Asked by: username_0 on 2023-07-26)

I'm testing this with the examples provided here. More specifically this one:
wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))

From my raspberry pi running bitcoin core v24.0.1:
$ bitcoin-cli getdescriptorinfo "wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))"
{
  "descriptor": "wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))#v66cvalc",
  "checksum": "v66cvalc",
  "isrange": true,
  "issolvable": true,
  "hasprivatekeys": false
}

From a docker image running bitcoin core v23.0.0:
$ docker exec -it bitcoin`enter code here`-dev bitcoin-cli -datadir=./.bitcoin getdescriptorinfo "wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))"
error code: -5
error message:
key 'xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB' is not valid

Another difference is that the instance running in the docker container is in regtest mode while the other one is mainnet. But from here I take it that the descriptor format is independent from the network being used.
So what's the issue here? Descriptors are present since 0.17

**Tags:** regtest, output-script-descriptors


---

## 1 answers

### Answer by username_1 on 2023-07-26. Score: 1 | Accepted answer

> But from here I take it that the descriptor format is independent from the network being used.

I believe you've misread the comment there.

The xpub and xprv formats **do** depend on the network, and by extension, so does the descriptor format.


---

