Author

Topic: Operation not valid with the current stack size (Read 1555 times)

newbie
Activity: 5
Merit: 0
December 01, 2015, 07:39:35 AM
#8
Here was the workflow.

TXID: 90d2b6545bfdf33200affd690e929ba256d72c531ffc2e50dfe9810e8a861151
I sent .81BTC to a multisig P2SH address.

A refund was issued to send the money back to my main wallet.
01000000015111868a0e81e9df502efc1f532cd756a29b920e69fdaf0032f3fd5b54b6d29000000 000b500483045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be1212 b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf014c695 221030fb5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83 fcad75264ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa78 9afeff05e6381c329fc5a43339da73ff04a832ebf546cc853aeffffffff017984de040000000019 76a914b4fb59a2f1c6d75a4c2454a632e68dd58a117f0788ac00000000

I signed this with TheBrowserBank code, and got this:
01000000015111868a0e81e9df502efc1f532cd756a29b920e69fdaf0032f3fd5b54b6d29000000 000fdfe0000483045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be 1212b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf014 83045022100e5f5c8efc6385c719c236853df321e0219c60bfc4a86a270a0d46f0bcbb789190220 10fbcd95b8e7b07bf7f599fd0eb20f6a63e3a04bfb11403b3ea079a97071b17e014c695221030fb 5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83fcad7526 4ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa789afeff05 e6381c329fc5a43339da73ff04a832ebf546cc853aeffffffff017984de04000000001976a914b4 fb59a2f1c6d75a4c2454a632e68dd58a117f0788ac00000000

I'm not sure if this is normal, but after signing the transaction, the TXID changed from
08560f2b5b1e214536b95280bd184b680561f52fcedc375af980b9b529897f4b
to
7e5988703186c5caeac810ffe7c77a659a7bd9db18f6b8c6545a9230a55871d3

And as we can all see, the 7e59... transaction went through.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
I thought bitcoin core would automagically find the private key in my wallet.

Regardless, I tried escaping the double quotes...

Error: Error parsing JSON:[\"abc123\"]

I never had issues with just signrawtransaction .

Decoding the TX it seems that the TX ID 08560f2b5b1e214536b95280bd184b680561f52fcedc375af980b9b529897f4b
is not known to the network and 90d2b6545bfdf33200affd690e929ba256d72c531ffc2e50dfe9810e8a861151 is spend.

So Im not sure if there is another priv. key involved for the TX 0856..., but from the error it looks like the TX was only partially signed.

It also seems that the TX you got working uses only one input -> https://www.blocktrail.com/BTC/tx/7e5988703186c5caeac810ffe7c77a659a7bd9db18f6b8c6545a9230a55871d3?txinIdx=0
newbie
Activity: 5
Merit: 0
I was able to get the javascript from TheBrowserBank working locally, and it signed the transaction without a fuss. I posted the transaction, and got my bitcoins. No thanks to Bitcoin Core...
newbie
Activity: 5
Merit: 0
I thought bitcoin core would automagically find the private key in my wallet.

Regardless, I tried escaping the double quotes...

Error: Error parsing JSON:[\"abc123\"]
staff
Activity: 3458
Merit: 6793
Just writing some code
You need to specify the private key(s) you are signing with in the signrawtransaction command. The second one you did should work. I think you need to escape the double quotes, so just put a backslash (\) before the double quotes.
newbie
Activity: 5
Merit: 0
What was your command to create the transaction?

I did not create the transaction. I'm just trying to sign it. Note that the transaction decodes properly:

Code:
{
"txid" : "08560f2b5b1e214536b95280bd184b680561f52fcedc375af980b9b529897f4b",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "90d2b6545bfdf33200affd690e929ba256d72c531ffc2e50dfe9810e8a861151",
"vout" : 0,
"scriptSig" : {
"asm" : "0 3045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be1212b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf01 5221030fb5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83fcad75264ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa789afeff05e6381c329fc5a43339da73ff04a832ebf546cc853ae",
"hex" : "00483045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be1212b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf014c695221030fb5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83fcad75264ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa789afeff05e6381c329fc5a43339da73ff04a832ebf546cc853ae"
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 0.81691769,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 b4fb59a2f1c6d75a4c2454a632e68dd58a117f07 OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a914b4fb59a2f1c6d75a4c2454a632e68dd58a117f0788ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"1HVwjeKu6bZzNYurXdNPV5bMevY2jqyiEJ"
]
}
}
]
}
staff
Activity: 3458
Merit: 6793
Just writing some code
What was your command to create the transaction?
newbie
Activity: 5
Merit: 0
Hey,

I'm trying to sign a transaction with Bitcoin Core version v0.11.2 (64-bit).

The receive address is in my Bitcoin Core wallet. When I try to sign, this happens...


Code:

> signrawtransaction 01000000015111868a0e81e9df502efc1f532cd756a29b920e69fdaf0032f3fd5b54b6d29000000000b500483045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be1212b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf014c695221030fb5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83fcad75264ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa789afeff05e6381c329fc5a43339da73ff04a832ebf546cc853aeffffffff017984de04000000001976a914b4fb59a2f1c6d75a4c2454a632e68dd58a117f0788ac00000000

{
"hex" : "01000000015111868a0e81e9df502efc1f532cd756a29b920e69fdaf0032f3fd5b54b6d29000000000b500483045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be1212b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf014c695221030fb5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83fcad75264ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa789afeff05e6381c329fc5a43339da73ff04a832ebf546cc853aeffffffff017984de04000000001976a914b4fb59a2f1c6d75a4c2454a632e68dd58a117f0788ac00000000",
"complete" : false,
"errors" : [
{
"txid" : "90d2b6545bfdf33200affd690e929ba256d72c531ffc2e50dfe9810e8a861151",
"vout" : 0,
"scriptSig" : "00483045022100bcc8c6361db91e293c8721e97c2e55da87fa869f83c645f8fc6651be1212b18302200d7cb50aefad04e814412ef3673189c4842cd696ef950f92291277359247e7cf014c695221030fb5877ac6b796d003f96a8b907d1dd20ebec322f958185343ea52758a7ba61f210257ba83fcad75264ba6b9d00f64ff4ca2f0d24832dda0ef761147514627448eaf2102c712f797d75f0fa789afeff05e6381c329fc5a43339da73ff04a832ebf546cc853ae",
"sequence" : 4294967295,
"error" : "Operation not valid with the current stack size"
}
]
}

I also tried this...

Code:

>dumpprivkey 1HVwjeKu6bZzNYurXdNPV5bMevY2jqyiEJ

{privKeyHere}

>signrawtransaction 'transaction' '[]' '["privKeyHere"]'


But I got the same Operation not valid with the current stack size.

This is my first multisig transaction, so I must be doing something wrong...
Jump to: