signrawtransactionwithkey gives confusing error when missing redeemScript #16249

issue ajtowns opened this issue on June 20, 2019
  1. ajtowns commented at 11:30 AM on June 20, 2019: contributor

    Forgetting to include the redeemscript when invoking signrawtransactionwithkey used to give a useful error:

    $ bitcoin-cli -regtest signrawtransactionwithkey "02000000018a24833c36be23272080d6be8a53e36586b81e0ac447e1298ee58e18cc96bdee0100000000ffffffff0118246bee0000000017a914e139e3904e9e69ecbce87b0fcfb73b1b0e3b9e818700000000" '["cUJ7bUweEgENv4ixezsSyZa2uBJxR37iFLtCt18gSvkjpkj7CmMr"]'  '[{"txid":"eebd96cc188ee58e29e147c40a1eb88665e3538abed680202723be363c83248a","vout":1,"scriptPubKey":"0020f89f2138a58a2042310f297259ca8050bcaecd3a0f3c936edffb7e38e31d775a","amount":"40.00000000"}]'

    With 0.17:

    error code: -3
    error message:
    Missing redeemScript

    With master/0.18:

    {
      "hex": "02000000018a24833c36be23272080d6be8a53e36586b81e0ac447e1298ee58e18cc96bdee0100000000ffffffff0118246bee0000000017a914e139e3904e9e69ecbce87b0fcfb73b1b0e3b9e818700000000",
      "complete": false,
      "errors": [
        {
          "txid": "eebd96cc188ee58e29e147c40a1eb88665e3538abed680202723be363c83248a",
          "vout": 1,
          "witness": [
          ],
          "scriptSig": "",
          "sequence": 4294967295,
          "error": "Witness program was passed an empty witness"
        }
      ]
    }

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- For the GUI-related issue on Linux provide names and versions of a distro, a desktop environment and a graphical shell (if relevant). -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. ajtowns cross-referenced this on Jun 20, 2019 from issue signrawtransactionwithkey: report error when missing redeemScript/witnessScript by ajtowns
  3. fanquake added the label RPC/REST/ZMQ on Jun 22, 2019
  4. MarcoFalke referenced this in commit e06067387e on Jul 2, 2019
  5. MarcoFalke closed this on Jul 2, 2019

  6. sidhujag referenced this in commit 0c8c2ad2de on Jul 3, 2019
  7. ajtowns cross-referenced this on Jul 5, 2019 from issue 0.18 backport: report error when missing redeemScript/witnessScript by ajtowns
  8. fanquake referenced this in commit 1fb747a800 on Jul 7, 2019
  9. bitcoin locked this on Dec 16, 2021
  10. knst referenced this in commit 34819eb302 on Feb 2, 2023
  11. knst referenced this in commit 37e8c467c7 on Feb 13, 2023
  12. knst referenced this in commit cd919f4c0f on Feb 28, 2023
  13. knst referenced this in commit 83824fa53f on Mar 14, 2023
  14. knst referenced this in commit e1d4d6ade6 on Mar 15, 2023
  15. knst referenced this in commit 2725c9e6d5 on Mar 19, 2023
  16. knst referenced this in commit 8f778443fc on Mar 24, 2023
  17. knst referenced this in commit 3790876cd3 on Mar 29, 2023
  18. UdjinM6 referenced this in commit 57e3060ec8 on Mar 29, 2023
  19. UdjinM6 referenced this in commit b44eb21591 on Apr 6, 2023

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-05-20 06:54 UTC