Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signrawtransaction shows errors after partially signing a multisig transaction #9988

Closed
achow101 opened this issue Mar 14, 2017 · 6 comments · Fixed by #11288
Closed

signrawtransaction shows errors after partially signing a multisig transaction #9988

achow101 opened this issue Mar 14, 2017 · 6 comments · Fixed by #11288

Comments

@achow101
Copy link
Member

achow101 commented Mar 14, 2017

Describe the issue

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Follow the steps in https://gist.github.com/gavinandresen/3966071

Expected behaviour

The first signrawtransaction command should be successful and return a partially signed transaction that can be sent to the other cosigners for signing.

Actual behaviour

Instead signrawtransaction fails and does not return a partially signed transaction.

What version of bitcoin-core are you using?

This was reported for 0.14.0. However we have determined that it affects 0.11.1 and later, and likely 0.11.0. It does not affect 0.10.3.

It appears that the bug is caused by this VerifyScript call which was introduced in 8ac2a4e which has been a part of all versions since 0.11.0rc1.

See also: https://bitcointalk.org/index.php?topic=1823847.msg18164848#msg18164848

@paveljanik
Copy link
Contributor

@achow101 Looks like nobody wants to read that URL. Can you please paste commands that can be used on the testnet right away and demonstrate the issue?

@achow101
Copy link
Member Author

From the thread I linked to:

Three addresses and their private and public keys:

cMpfNfuasJcrCv8RKMG35C8YtUVpaheFbNMwDuBXVvdcjaeYE7oh
024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a
mgMZZtLSX1cU9jhAdQWMqMyoPv4JncZqcU

cVM5Kaoim2MKzT8MxVHHAu9BixJKTJgMhqape1eHgjHGhFPkf2mn
03c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771
mrdkuGp2wcXhcmtN7RwwUs7CYevJpYuLnV

cU4mHYwU2X1oTWBfYBGYFN69oYdrpWnBMrWd4nCoeRPUzmRY89vM
0256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b34
mospdWZdHtym59yMwUUi8w4HcWQxd7sQsv

Create 2-of-3 multisig address:

createmultisig 2 '["024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a","03c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771","0256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b34"]'

{
  "address": "2N9nn3aMYzTjs2ccTRAvDUmdKykL9YjM2cj",
  "redeemScript": "5221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453ae"
}

Import address and fund it:

importaddress 2N9nn3aMYzTjs2ccTRAvDUmdKykL9YjM2cj "" false

//sent 0.1btc to 2N9nn3aMYzTjs2ccTRAvDUmdKykL9YjM2cj

listunspent
[
  {
    "txid": "ff65917ac6cbe36d55893d9e1ce63cad1140c2ab38e9c7d099170b16d1a55d70",
    "vout": 0,
    "address": "2N9nn3aMYzTjs2ccTRAvDUmdKykL9YjM2cj",
    "account": "",
    "scriptPubKey": "a914b579aabfd350ed75ee056ff4d6d56718c74f55df87",
    "amount": 0.10000000,
    "confirmations": 1,
    "spendable": false,
    "solvable": false
  }, 

Make unsigned spending tx:

createrawtransaction '[{"txid":"ff65917ac6cbe36d55893d9e1ce63cad1140c2ab38e9c7d099170b16d1a55d70","vout":0,"scriptPubKey":"a914b579aabfd350ed75ee056ff4d6d56718c74f55df87","redeemScript":"5221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453ae"}]' '{"mqZa1zbDg5RHVYbX6ea1QxPuuxAyuGVSoK":0.0999}'

0100000001705da5d1160b1799d0c7e938abc24011ad3ce61c9e3d89556de3cbc67a9165ff0000000000ffffffff01706f9800000000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000

Attempt to sign with first privkey fails:

signrawtransaction '0100000001705da5d1160b1799d0c7e938abc24011ad3ce61c9e3d89556de3cbc67a9165ff0000000000ffffffff01706f9800000000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000' '[{"txid":"ff65917ac6cbe36d55893d9e1ce63cad1140c2ab38e9c7d099170b16d1a55d70","vout":0,"scriptPubKey":"a914b579aabfd350ed75ee056ff4d6d56718c74f55df87","redeemScript":"5221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453ae"}]' '["cMpfNfuasJcrCv8RKMG35C8YtUVpaheFbNMwDuBXVvdcjaeYE7oh"]'


{
  "hex": "0100000001705da5d1160b1799d0c7e938abc24011ad3ce61c9e3d89556de3cbc67a9165ff00000000b5004830450221009d4f252bc47a8ab7078c3f93929bd091da175ed115bbe4953a3704d1e8027e12022005ab1434847d64bc6551ce6044b970becad36fc0cf6380847c33b241a30fc085014c695221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453aeffffffff01706f9800000000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000",
  "complete": false,
  "errors": [
    {
      "txid": "ff65917ac6cbe36d55893d9e1ce63cad1140c2ab38e9c7d099170b16d1a55d70",
      "vout": 0,
      "scriptSig": "004830450221009d4f252bc47a8ab7078c3f93929bd091da175ed115bbe4953a3704d1e8027e12022005ab1434847d64bc6551ce6044b970becad36fc0cf6380847c33b241a30fc085014c695221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453ae",
      "sequence": 4294967295,
      "error": "Operation not valid with the current stack size"
    }
  ]
}

@jnewbery
Copy link
Contributor

I've tested this and I can sign the returned partial transaction:

// Sign with the first key
→ bitcoin-cli signrawtransaction '02000000011cde84bb4859cef89c748d85072511f45be4db9df4ae833951e2bf883e8c86850100000000ffffffff01706f98000
00000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000' '[{"txid":"85868c3e88bfe2513983aef49ddbe45bf4112507858d749cf8ce5948bb84de1c","vout":1,"scriptPubKey":"a914b579aabfd350ed75ee056ff4d6d56718c74f55df87","redeemScript":"5221024c5965fb18701569ec09e8d2979c45e3d
6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec028
85300a1bb0a1159e289ae66af78b3453ae"}]' '["cMpfNfuasJcrCv8RKMG35C8YtUVpaheFbNMwDuBXVvdcjaeYE7oh"]'
{
  "hex": "02000000011cde84bb4859cef89c748d85072511f45be4db9df4ae833951e2bf883e8c868501000000b400473044022053bf59c161ada753cd4de4ecd86a7d4719a6d903f0ff0aa7a0e8f1d3a7eb46e50220511bf2308f9b708c8eef11c71ae4198c0b59fde19b559a27c03a43edc8d7e103014c695221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453aeffffffff01706f9800000000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000",
  "complete": false,
  "errors": [
    {
      "txid": "85868c3e88bfe2513983aef49ddbe45bf4112507858d749cf8ce5948bb84de1c",
      "vout": 1,
      "witness": [
      ],
      "scriptSig": "00473044022053bf59c161ada753cd4de4ecd86a7d4719a6d903f0ff0aa7a0e8f1d3a7eb46e50220511bf2308f9b708c8eef11c71ae4198c0b59fde19b559a27c03a43edc8d7e103014c695221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453ae",
      "sequence": 4294967295,
      "error": "Operation not valid with the current stack size"
    }
  ]
}

// An error is shown, but the returned hex *is* a valid partially signed tx.
// Now sign with a second key

→ bitcoin-cli signrawtransaction '02000000011cde84bb4859cef89c748d85072511f45be4db9df4ae833951e2bf883e8c868501000000b400473044022053bf59c161ada753cd4de4ecd86a7d4719a6d903f0ff0aa7a0e8f1d3a7eb46e50220511bf2308f9b708c8eef11c71ae4198c0b59fde19b559a27c03a43edc8d7e103014c695221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453aeffffffff01706f9800000000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000' '[{"txid":"85868c3e88bfe2513983aef49ddbe45bf4112507858d749cf8ce5948bb84de1c","vout":1,"scriptPubKey":"a914b579aabfd350e
d75ee056ff4d6d56718c74f55df87","redeemScript":"5221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764
829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453ae"}]' '["cVM5Kaoim2MKzT8MxVHHAu9BixJKTJgMhqape1eHgjHGhFPkf2mn"]'
{
  "hex": "02000000011cde84bb4859cef89c748d85072511f45be4db9df4ae833951e2bf883e8c868501000000fc00473044022053bf59c161ada753cd4de4ecd86a7d4719a6d903f0ff0aa7a0e8f1d3a7eb46e50220511bf2308f9b708c8eef11c71ae4198c0b59fde19b559a27c03a43edc8d7e10301473044022026ec2ccf9067b5ae0b3c7f108b0c79546de7187630eafba1a723a77437829a4202205404cbe251e3a165a47bc7555bf09cd5a81e7f0aa4e35cafc207be202aa834bf014c695221024c5965fb18701569ec09e8d2979c45e3d6e0c60ddb3c9d6af0692124d3890e8a2103c9084cf82f74f764829a7d3c842462e03f4bbaf59981cb3b98cd3974438e5771210256d87a1997bad87ebdd409a3437ecec02885300a1bb0a1159e289ae66af78b3453aeffffffff01706f9800000000001976a9146e2fe8ef5dcb05fd258e2f51d3f15ba3781cd96b88ac00000000",
  "complete": true
}

// returned hex is a fully signed multisig tx

It's confusing that the first call to signrawtransaction() returns an error "Operation not valid with the current stack size", but I don't think that stops you from signing the partial transaction.

@achow101
Copy link
Member Author

It's confusing that the first call to signrawtransaction() returns an error "Operation not valid with the current stack size", but I don't think that stops you from signing the partial transaction.

Ah. I see. That it returns an error even when partially signed is still an issue though. That shouldn't happen.

@achow101 achow101 changed the title Cannot create partially signed multisig transactions anymore signrawtransaction shows errors after partially signing a multisig transaction Jun 9, 2017
laanwj added a commit that referenced this issue Sep 26, 2017
df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes #9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
@mozaboy
Copy link

mozaboy commented Nov 16, 2018

how to find the redeemScript in UTXO , i get the UTXO by the blockchain.info's api . i can't find the UTXO through the bitcoin full node on local , my address is external , not create in my node. how to find ? i have the privateKey and the UTXO without the redeemScript

@kot-begemot
Copy link

kot-begemot commented Feb 12, 2019

how to find the redeemScript in UTXO , i get the UTXO by the blockchain.info's api . i can't find the UTXO through the bitcoin full node on local , my address is external , not create in my node. how to find ? i have the privateKey and the UTXO without the redeemScript

Short answer: You can generate it.

Long answer: UTXO contains only script pub key (locking script). Redeem script is a part of signature script (unlocking script). It is generated during signature process, and you need to know all the public keys that are involved in this multisig. Then you append you minimum signature amount required for transaction and this is your signature script with which you can unlock you UTXO.

Detailed answer: I suggest you to check "Mastering Bitcoin" by Andreas M. Antonopoulos. It is explained in Chapter 6, page 132-133 and Chapter 7 page 149-153.

PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Dec 22, 2019
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 2, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 4, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 12, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 12, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 12, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 12, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jan 12, 2020
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
malbit pushed a commit to malbit/raptoreum that referenced this issue Nov 5, 2021
df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin/bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
gades pushed a commit to cosanta/cosanta-core that referenced this issue Jan 28, 2022
…signing

df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes bitcoin#9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@kot-begemot @fanquake @jnewbery @achow101 @paveljanik @mozaboy and others