RPC createmultisig outputs a sh(addr(...)) descriptor when address_type field is “p2sh-segwit” #28250

issue Vasu-08 openend this issue on August 10, 2023
  1. Vasu-08 commented at 11:07 am on August 10, 2023: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    While executing rpc createmultisig it outputs a addr descriptor wrapped around sh. Addr descriptor is supposed to be a top level descriptor. Please refer to this gist for further details.

    Expected behaviour

    Not sure.

    Steps to reproduce

    image

    Relevant log output

    2023-08-10T10:28:08Z ERROR: FillableSigningProvider::AddCScript(): redeemScripts > 520 bytes are invalid

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    v25.0rc2

    Operating system and version

    “Ubuntu 22.04 LTS”

    Machine specifications

    No response

  2. achow101 commented at 1:13 pm on August 10, 2023: member
    I think this was fixed by #28067
  3. Vasu-08 commented at 6:28 am on August 11, 2023: none
    Ohh yeah, Thanks. Issue resolved. Closing it now.
  4. Vasu-08 closed this on Aug 11, 2023

  5. bitcoin deleted a comment on Aug 11, 2023
  6. bitcoin deleted a comment on Aug 11, 2023
  7. pinheadmz commented at 1:51 pm on August 11, 2023: member

    On master branch b2ec0326fd76e64a6d0d7e4745506b29f60d0be5 I’m still getting some mixed signals from this command:

    in the logs:

    02023-08-11T13:43:34Z ERROR: FillableSigningProvider::AddCScript(): redeemScripts > 520 bytes are invalid
    

    json-rpc response:

    0{
    1  "address": "3JDRACdkEs41yxtYLi6kiqQJdQHLPDxehc",
    2  "redeemScript": "60... ...ae",
    3  "descriptor": "addr(3JDRACdkEs41yxtYLi6kiqQJdQHLPDxehc)#x7qnlkt9",
    4  "warnings": [
    5    "Unable to make chosen address type, please ensure no uncompressed public keys are present."
    6  ]
    7}
    
  8. furszy commented at 3:39 pm on August 11, 2023: member

    On master branch b2ec032 I’m still getting some mixed signals from this command:

    in the logs:

    02023-08-11T13:43:34Z ERROR: FillableSigningProvider::AddCScript(): redeemScripts > 520 bytes are invalid
    

    json-rpc response:

    0{
    1  "address": "3JDRACdkEs41yxtYLi6kiqQJdQHLPDxehc",
    2  "redeemScript": "60... ...ae",
    3  "descriptor": "addr(3JDRACdkEs41yxtYLi6kiqQJdQHLPDxehc)#x7qnlkt9",
    4  "warnings": [
    5    "Unable to make chosen address type, please ensure no uncompressed public keys are present."
    6  ]
    7}
    

    Yeah, that is a different issue.

    No uncompressed pubkeys are present in the command. The issue relates to the wallet treating the redeem script as a plain legacy sh and not wrapped into a wsh.

    Just made a quick fix locally, and this is the real output of that command in mainnet:

    0{
    1  "address": "3JDRACdkEs41yxtYLi6kiqQJdQHLPDxehc",
    2  "redeemScript": "602102f293c4d026a536a082453f8327f305ae0a0c59350b396205e15fbec2af67390b2103d7b6a7e972f6e1a532f9f49a7cc35055a0ffd7cec5f81728f6a3fdf4dad9367221021f360d51b8eb43422fe942c837ad16e36bab87c5f7567609de9a38e205fb51ed2103a778eaee9cc18a4e5e02a78f403082d4e6f3a9c0d9edaea20b9ad86089de7fc92102a3c95e41e8272c6842df8c9da492ef5e03bbc4ca17c22ce1f88570e716e187db21032e1d465bc5cdea674337934fb861d097dd7ab20289e4d41de14a6cafcd61d30a210370fd35da88778a805ce9acc88c0020e3b14cacaa30f99d829207e1896d782ea12103878a4b831af4fee069964448ccca999071633fcc751d296e8c5325167274febf210248f8621596029568070dda40bc1e3ace78df320b5ebf0d6a431536e9af3ec8942103f757260835b7e439b244a9b10f5645966d7dcff9d2648c400a0d6827f4a64ac421023b3972554e123985b6c3d8575e6fd3384f59a58ef91e0d39ba5905dad49e73722102e32652928f21764e02822d39ffd1075c428e372a06fe7247023d5b60f1d0159621020e002818c48b1d1766f6196e09db90f51e155bbd49be0ad743d1fa6b7e8efcae2103725d482f0c77f4feb1ecbea28f036b30889f462222002e88aa8f8346dce9447421031fa2798d9f40bc2746f91f300460be9091e10f1b4baa37843cd41c965b0f9b41210235b7b545398ce9692f319e6eefe114eae50f008f46d33baf19418e0f17e3bc652102ff72a2b54370c0b1501228b6a210bc36a16535cc358bf7839c85a6ae2c41725c210282ce44556f5a81c7a698dc8fdba12089740df420af93002e80a752020e5d939e210279f5b244862e27f69284befb0299909139b899d2702b3e74b4317ed5b2947e03210293d0b090906afdee07dabedf34798293246ce06ade2e3887302f289008f25f4d0114ae",
    3  "descriptor": "sh(wsh(multi(16,02f293c4d026a536a082453f8327f305ae0a0c59350b396205e15fbec2af67390b,03d7b6a7e972f6e1a532f9f49a7cc35055a0ffd7cec5f81728f6a3fdf4dad93672,021f360d51b8eb43422fe942c837ad16e36bab87c5f7567609de9a38e205fb51ed,03a778eaee9cc18a4e5e02a78f403082d4e6f3a9c0d9edaea20b9ad86089de7fc9,02a3c95e41e8272c6842df8c9da492ef5e03bbc4ca17c22ce1f88570e716e187db,032e1d465bc5cdea674337934fb861d097dd7ab20289e4d41de14a6cafcd61d30a,0370fd35da88778a805ce9acc88c0020e3b14cacaa30f99d829207e1896d782ea1,03878a4b831af4fee069964448ccca999071633fcc751d296e8c5325167274febf,0248f8621596029568070dda40bc1e3ace78df320b5ebf0d6a431536e9af3ec894,03f757260835b7e439b244a9b10f5645966d7dcff9d2648c400a0d6827f4a64ac4,023b3972554e123985b6c3d8575e6fd3384f59a58ef91e0d39ba5905dad49e7372,02e32652928f21764e02822d39ffd1075c428e372a06fe7247023d5b60f1d01596,020e002818c48b1d1766f6196e09db90f51e155bbd49be0ad743d1fa6b7e8efcae,03725d482f0c77f4feb1ecbea28f036b30889f462222002e88aa8f8346dce94474,031fa2798d9f40bc2746f91f300460be9091e10f1b4baa37843cd41c965b0f9b41,0235b7b545398ce9692f319e6eefe114eae50f008f46d33baf19418e0f17e3bc65,02ff72a2b54370c0b1501228b6a210bc36a16535cc358bf7839c85a6ae2c41725c,0282ce44556f5a81c7a698dc8fdba12089740df420af93002e80a752020e5d939e,0279f5b244862e27f69284befb0299909139b899d2702b3e74b4317ed5b2947e03,0293d0b090906afdee07dabedf34798293246ce06ade2e3887302f289008f25f4d)))#xfjxuvgn"
    4}
    

    . Will work on the test case and push it. Good eye reporting this @pinheadmz 👌🏼.

  9. pinheadmz commented at 4:38 pm on August 11, 2023: member

    Will work on the test case and push it. Good eye reporting this @pinheadmz 👌🏼.

    props to @Vasu-08 whose work on descriptors in bcoin brought this to my attention ;-)

  10. furszy commented at 1:59 pm on August 22, 2023: member
    Pushed #28307 solving the issue and adding coverage for it. Take it for a ride when you can.
  11. achow101 referenced this in commit 76a33be21d on Jun 5, 2024
  12. bitcoin locked this on Aug 21, 2024

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: 2024-12-23 18:12 UTC

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