listdescriptors true fails with ‘Can’t get descriptor string’ in non-watch-only descriptor wallet #32078

issue mrtnetwork openend this issue on March 15, 2025
  1. mrtnetwork commented at 6:40 pm on March 15, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    When running the command:

    0bitcoin-cli listdescriptors true
    

    it fails with the error:

    0error code: -4
    1error message:
    2Can't get descriptor string.
    

    even though the wallet is not watch-only and is a descriptor wallet.

    However, when running:

    0bitcoin-cli listdescriptors false
    

    the command works fine and returns descriptor information, but without private keys.

    Expected behaviour

    Since the wallet is not watch-only and is a descriptor wallet, the command should succeed, just like listdescriptors false, but with the private key information included.

    Steps to reproduce

    Verify that the wallet is a descriptor wallet:

    0{
    1  "walletname": "BTC",
    2  "walletversion": 169900,
    3  "format": "sqlite",
    4  "keypoolsize_hd_internal": 4000,
    5  "private_keys_enabled": true,
    6  "descriptors": true,
    7  "external_signer": false,
    8  "blank": false,
    9}
    

    Relevant log output

    I didn’t find any related errors in the debug file, but I listed my descriptor for reference

     0{
     1  "descriptors": [
     2    {
     3      "desc": "pkh([761f1ef4/44h/1h/0h]tpubDDeGeaPE1STPq4dQFhc5grg8pn6pqyttBtX6Pkw8cAVKesnJr7wYFF7LKy2ysifbPSKDyBT3hHjAg9rftJdPVKLUrGgan7pmML9CFeDuua6/0/*)#cnspa9u5"
     4    },
     5    {
     6      "desc": "pkh([761f1ef4/44h/1h/0h]tpubDDeGeaPE1STPq4dQFhc5grg8pn6pqyttBtX6Pkw8cAVKesnJr7wYFF7LKy2ysifbPSKDyBT3hHjAg9rftJdPVKLUrGgan7pmML9CFeDuua6/1/*)#f84qqsvv"
     7    },
     8    {
     9      "desc": "pkh([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/100)#t96q85nr"
    10    },
    11    {
    12      "desc": "sh(wpkh([761f1ef4/49h/1h/0h]tpubDDohgQvP57jvmvVzmKFo1JjZjwWRAaYyL7aPG4ZPiiNjnbSDKBHxgPSBmBx9Esjf4HxxeEeRVdkiGRaJmVRofHBMLtQzHxKmRbAg9oMxEmw/0/*))#h40wmz6r"
    13    },
    14    {
    15      "desc": "sh(wpkh([761f1ef4/49h/1h/0h]tpubDDohgQvP57jvmvVzmKFo1JjZjwWRAaYyL7aPG4ZPiiNjnbSDKBHxgPSBmBx9Esjf4HxxeEeRVdkiGRaJmVRofHBMLtQzHxKmRbAg9oMxEmw/1/*))#z5pcra0u"
    16    },
    17    {
    18      "desc": "sh(wsh(multi(2,[761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/2,[761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/3)))#3455mcsd"
    19    },
    20    {
    21      "desc": "tr([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/*)#rrrwmyl6"
    22    },
    23    {
    24      "desc": "tr([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/1,multi_a(2,[761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/2,[761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/3))#teu9thwc"
    25    },
    26    {
    27      "desc": "tr([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/1,{pk([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/2),pk([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/1)})#597an7jq"
    28    },
    29    {
    30      "desc": "tr([761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/1/*)#jhx0x30z"
    31    },
    32    {
    33      "desc": "tr(ca46e9fad132afe73c7efcc02039225d2f4626cf476f6ca91ab56ad2d1956029,multi_a(2,[761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/2,[761f1ef4/86h/1h/0h]tpubDDRksBabSitMWcvdvWwVzhEvwFC9Bf77ASZRGHtoMhYr6AFDChuQtNxEvWqtjNy5Vqmd7DKwh5b41NM1oT3YfNRWBMrbcw53da4NwmJ12Td/0/3))#guq2rvkj"
    34    },
    35    {
    36      "desc": "wpkh([761f1ef4/84h/1h/0h]tpubDCSU3vbXvSzLszkaX4dBv5bsovXH5JqoR6rpCToEJZJ8kiZb3VZkWpoKnf5Sr5aGjxCqbDhfR6Z8JtT5rT3CLj7aC8NfLUjEtxhZB9PNHxs/0/*)#lf9s05rn"
    37    },
    38    {
    39      "desc": "wpkh([761f1ef4/84h/1h/0h]tpubDCSU3vbXvSzLszkaX4dBv5bsovXH5JqoR6rpCToEJZJ8kiZb3VZkWpoKnf5Sr5aGjxCqbDhfR6Z8JtT5rT3CLj7aC8NfLUjEtxhZB9PNHxs/1/*)#waq3jpnt"
    40    }
    41  ]
    42}
    

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    Bitcoin Core RPC client version v28.1.0

    Operating system and version

    Windows 11 Home 26100.3476

    Machine specifications

    No response

  2. furszy commented at 1:58 pm on March 17, 2025: member
    This occurs when the wallet does not contain all key/script paths key material (e.g. taproot descriptor with an internal pubkey). Test exercising the behavior and explaining the issue further: https://github.com/furszy/bitcoin-core/commit/970efeb0fb2632d714e0f444b4ac89278eb80b28.
  3. willcl-ark added the label Wallet on Mar 19, 2025
  4. willcl-ark added the label RPC/REST/ZMQ on Mar 19, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-03-28 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me