sortedmulti in descriptors does not work, always fails with error #18874

issue chris-belcher opened this issue on May 4, 2020
  1. chris-belcher commented at 11:55 PM on May 4, 2020: contributor

    <!-- Describe the issue -->

    The sortedmulti expression in descriptors seems to not be recognized.

    Expected behavior

    Take the sortedmulti example from the descriptor document and pass it to getdescriptorinfo.

    $ bitcoin-cli getdescriptorinfo "wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))"
    error code: -5
    error message:
    A function is needed within P2WSH
    

    Actual behavior

    Changing sortedmulti to multi no longer results in the error.

    $ bitcoin-cli getdescriptorinfo "wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))"
    {
      "descriptor": "wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))#t2zpj2eu",
      "checksum": "t2zpj2eu",
      "isrange": true,
      "issolvable": true,
      "hasprivatekeys": false
    }
    

    To reproduce

    Run the above getdescriptorinfo command, or with any descriptor involving sortedmulti.

    System information

    Running Bitcoin Core version v0.19.0.1 (64-bit). Release version which I downloaded from bitcoincore.org

    $ uname -a
    Linux username 4.4.0-142-generic [#168](/bitcoin-bitcoin/168/)-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    
  2. chris-belcher added the label Bug on May 4, 2020
  3. achow101 commented at 12:14 AM on May 5, 2020: member

    sortedmulti is not available in 0.19.x. It was merged after it's release. It should be available in 0.20.0. Can you check 0.20.0rc1?

  4. chris-belcher commented at 12:57 AM on May 5, 2020: contributor

    Ahh.

    I just tried it with 0.20.0rc1, and it works perfectly.

    Maybe only adding a note to the descriptor document is needed.

    Either way, this isn't a bug in Core. Closing.

  5. chris-belcher closed this on May 5, 2020

  6. DrahtBot locked this on Feb 15, 2022

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: 2026-04-13 21:14 UTC

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