Signrawtransaction false: Operation not valid with the current stack size


#1

Dear all,
I follow the "Public Alpha Guide" and successfully build the zcash and also get some coins already. Now I was stalled at the signrawtransaction rpc which return with an error: "Operation not valid with the current stack size".
I have checked that I do have the respond private key, so I decide to send the result hex by sendrawtransaction directly. Than the error message changes to "absurdly high fees" (show in debug.log). To solve the problem I just raise the transaction fee limit and send it again. Now the error message shows: error: {"code":-26,"message":"16: mandatory-script-verify-flag-failed (Operation not valid with the current stack size)"} which is as same as issue#206 in github (https://github.com/zcash/zcash/issues/206).
I use the latest release package, and all the previous step are followed the guide. Can anyone help me to figure out the problem? Thanks a lot.


#3

This particular error usually shows up because the signature doesn't work. (You may have copied keys or addresses from the guide that you should have constructed yourself.)


#4

Be sure the rawtxn is in double quotes, i.e.

./src/zcash-cli signrawtransaction "020..."


#5

Has this been solved? I'm having the same issue as well even after following the suggestions above. Thanks in advance.


#6

Same here - seems very familiar. I tried the process with and without quotes around the large hexadecimal strings.


#7

You could try giving my script a try. if it works, then it must've been user error somehow. If not, something else is up.

https://github.com/dan-da/zcash-util


#8

danda,

Thanks, after installing PHP your scripts worked like a charm!
I'm using VMWARE ubuntu running under Windows so the processing is a little slow but it is okay for evaluation purpose.

Question: My result list "exists" as false. Why is that? Does this mean I can't use this protected amount? Also, this amount does not show up on my getinfo or listunspent command anymore so what command do I use to display this 'poured' amount? Where did it go?

{
"amount" : 49.90000000,
"bucket" : "805b6d2....76a",
"exists" : false
}

Thanks again.


#9

I asked this same question about exists:false and was told it is because the tx has not made it into a block yet.