<p>After connecting to bitcoin-core (0.10.0rc3) I received:</p>

<pre><code>ERROR: CScriptCheck() : 620186f101b7db97393af8747923db4cf3f30c3c3c48f4c7cfc23567b6d9ca07:0 VerifySignature failed: Data push larger than necessary
ERROR: AcceptToMemoryPool: : ConnectInputs failed 620186f101b7db97393af8747923db4cf3f30c3c3c48f4c7cfc23567b6d9ca07
</code></pre>

<p>(Thanks bitcoin devs for <a href="https://github.com/bitcoin/bitcoin/commit/ab9edbd6b6eb3efbca11f16fa467c3c0ef905708" rel="nofollow">adding sane error messages</a>!)</p>

<p>From here I noticed I was building the transaction with an outdated fork of <a href="https://github.com/lian/bitcoin-ruby" rel="nofollow">bitcoin-ruby</a>, <strong>updating to the latest bitcoin-ruby fixed this issue</strong> (On both 0.9.03 and 0.10.0). Still not sure why it would only relay after a bitcoind restart, will edit this answer if I figure this out.</p>

CC BY-SA 3.0
2015-01-14T20:44:02.327Z
2015-01-14T20:44:02.327Z
Shaul Kfir
<p>I'm running a bitcoind regtest node. When trying to relay a transaction (created using bitcoin-ruby) I receive<br>
<code>error: {"code":-25,"message":""}</code>
When I restart the node and relay the exact same transaction it relays fine. This behavior is consistent and reproduces every time.</p>

<p>My output for <code>decoderawtransaction</code> is:</p>

<pre><code>{
    "txid" : "df91267ed650795245882bc91b8dc104e6c41d2f29ed3221f29151aa60554842",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "fab40dbf6b95ef2fe5f4aca0668a84edebdf70cfb80565626be80c7af20a525e",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "0 3046022100fb2a69546ea44db3a06cfcf120d1fda135bfde0946f2186a52d8cfee83835705022100c680cc5135174425ce5137a2996fbdcd55463c4acb88bb9fdbdb03f70f0a213b01 30460221008294d1779bfb21240859feccc96104dea574541d41163d2c849846d8e44496fe022100faf00dabba65f22469a1116ea10d5ce34f90bea779ba770ae1ac3af5c432379e01 52210261318d096a7addf67d935076c28dfa4a1c0e8f2ed04a7cb47ac53bd7fe2ebe6d210397866513a1796e75aae6a53d54d0ccc904c56fa12e14ab0ee989a6eed6e29c0352ae",
                "hex" : "00493046022100fb2a69546ea44db3a06cfcf120d1fda135bfde0946f2186a52d8cfee83835705022100c680cc5135174425ce5137a2996fbdcd55463c4acb88bb9fdbdb03f70f0a213b014930460221008294d1779bfb21240859feccc96104dea574541d41163d2c849846d8e44496fe022100faf00dabba65f22469a1116ea10d5ce34f90bea779ba770ae1ac3af5c432379e014c4752210261318d096a7addf67d935076c28dfa4a1c0e8f2ed04a7cb47ac53bd7fe2ebe6d210397866513a1796e75aae6a53d54d0ccc904c56fa12e14ab0ee989a6eed6e29c0352ae"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 1.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_HASH160 ee7455fa97980531b90b15f5f18386122a7f6919 OP_EQUAL",
                "hex" : "a914ee7455fa97980531b90b15f5f18386122a7f691987",
                "reqSigs" : 1,
                "type" : "scripthash",
                "addresses" : [
                    "2NEz4B6YtgTCpv6Qv56f7HarXUeHeLmdmih"
                ]
            }
        },
        {
            "value" : 0.99990000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_HASH160 0b607311f3db7d2a28b4c6fd259913356a86c302 OP_EQUAL",
                "hex" : "a9140b607311f3db7d2a28b4c6fd259913356a86c30287",
                "reqSigs" : 1,
                "type" : "scripthash",
                "addresses" : [
                    "2MtHNxpeYfFmLTMDnW7DFf9y9ZnM49u4tXW"
                ]
            }
        }
    ]
}
</code></pre>

<p>The referenced txout has 2 BTC. I also tried <code>sendrawtransaction &lt;hex&gt;, true</code> to try and rule out some fee problems. Same symptom.
I didn't see any special debug message in debug.log</p>

<p>My output for <code>getinfo</code> is:</p>

<pre><code>{
    "version" : 90300,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 530.90534322,
    "blocks" : 460,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "difficulty" : 0.00000000,
    "testnet" : false,
    "keypoololdest" : 1421187525,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}
</code></pre>

<p>I'm still trying to plug v0.10 into my environment for debugging, I understand bitcoin-core has better messages for code -25, but I still need this to play nice with a v0.9 node.</p>

CC BY-SA 3.0
2015-01-13T23:52:36.723Z
relevant: http://bitcoin.stackexchange.com/questions/34203/error-25-when-bitcoind-sendrawtransaction
Nick ODell
CC BY-SA 3.0
2015-01-14T00:05:20.560Z
Thanks, I already took a look at this. I tried mining before the relay, to flush the mempool but the same thing happens, error unless I restart the node after which it works (this rules out double spend)
Shaul Kfir
CC BY-SA 3.0
2015-01-14T00:17:35.297Z
Mining the memory pool doesn't rule out double spend: if there was a conflicting tx in the memory pool, mining it puts that conflicting tx on the block chain---so your transaction is still a conflict. Can you use [`getrawmempool`](https://bitcoin.org/en/developer-reference#getrawmempool) to verify there isn't a conflicting tx in the mempool and [`getblock`](https://bitcoin.org/en/developer-reference#getblock) to verify there isn't a conflicting tx in the blocks you mined?  Also, [`gettxout`](https://bitcoin.org/en/developer-reference#gettxout) to ensure the input you're trying to spend exists.
David A. Harding
CC BY-SA 3.0
2015-01-14T13:55:23.223Z
Thanks @David, I checked `getrawmempool` and `getblock` for conflicting tx and found none. I agree mining doesn't rule out double spend, but being able to relay the tx and mine it after mining a block and a node restart does.
When I do `gettxout` I get strange behavior. I constructed the tx to use input 1 of a tx. I see a txout for `gettxout <hash> 0 true` but not for `gettxout <hash> 1 true`. When I restart bitcoind I see both outpoints 0 and 1.
Shaul Kfir
CC BY-SA 3.0
2015-01-14T14:40:37.300Z
Also, this only happens with bitcoind, if I relay through a non-bitcoind node connected to my bitcoind node, it relays just fine and gets included in block.
Shaul Kfir
CC BY-SA 3.0
2015-01-14T15:37:13.373Z
Besides testing with 0.10.0 and maybe also regular testnet, I can't think of anything else for you to try.  If you can reproduce the problem on 0.10.0, it may be time to [report the issue](https://github.com/bitcoin/bitcoin/issues/new).
David A. Harding
<bitcoind><json-rpc><raw-transaction><rpc-error-25>
Receiving `error: {"code":-25,"message":""}` on sendrawtransaction with v0.9.3
Shaul Kfir
# Receiving `error: {"code":-25,"message":""}` on sendrawtransaction with v0.9.3

(Asked by: username_0 on 2015-01-13)

I'm running a bitcoind regtest node. When trying to relay a transaction (created using bitcoin-ruby) I receive
error: {"code":-25,"message":""}
When I restart the node and relay the exact same transaction it relays fine. This behavior is consistent and reproduces every time.
My output for decoderawtransaction is:
{
    "txid" : "df91267ed650795245882bc91b8dc104e6c41d2f29ed3221f29151aa60554842",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "fab40dbf6b95ef2fe5f4aca0668a84edebdf70cfb80565626be80c7af20a525e",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "0 3046022100fb2a69546ea44db3a06cfcf120d1fda135bfde0946f2186a52d8cfee83835705022100c680cc5135174425ce5137a2996fbdcd55463c4acb88bb9fdbdb03f70f0a213b01 30460221008294d1779bfb21240859feccc96104dea574541d41163d2c849846d8e44496fe022100faf00dabba65f22469a1116ea10d5ce34f90bea779ba770ae1ac3af5c432379e01 52210261318d096a7addf67d935076c28dfa4a1c0e8f2ed04a7cb47ac53bd7fe2ebe6d210397866513a1796e75aae6a53d54d0ccc904c56fa12e14ab0ee989a6eed6e29c0352ae",
                "hex" : "00493046022100fb2a69546ea44db3a06cfcf120d1fda135bfde0946f2186a52d8cfee83835705022100c680cc5135174425ce5137a2996fbdcd55463c4acb88bb9fdbdb03f70f0a213b014930460221008294d1779bfb21240859feccc96104dea574541d41163d2c849846d8e44496fe022100faf00dabba65f22469a1116ea10d5ce34f90bea779ba770ae1ac3af5c432379e014c4752210261318d096a7addf67d935076c28dfa4a1c0e8f2ed04a7cb47ac53bd7fe2ebe6d210397866513a1796e75aae6a53d54d0ccc904c56fa12e14ab0ee989a6eed6e29c0352ae"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 1.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_HASH160 ee7455fa97980531b90b15f5f18386122a7f6919 OP_EQUAL",
                "hex" : "a914ee7455fa97980531b90b15f5f18386122a7f691987",
                "reqSigs" : 1,
                "type" : "scripthash",
                "addresses" : [
                    "2NEz4B6YtgTCpv6Qv56f7HarXUeHeLmdmih"
                ]
            }
        },
        {
            "value" : 0.99990000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_HASH160 0b607311f3db7d2a28b4c6fd259913356a86c302 OP_EQUAL",
                "hex" : "a9140b607311f3db7d2a28b4c6fd259913356a86c30287",
                "reqSigs" : 1,
                "type" : "scripthash",
                "addresses" : [
                    "2MtHNxpeYfFmLTMDnW7DFf9y9ZnM49u4tXW"
                ]
            }
        }
    ]
}

The referenced txout has 2 BTC. I also tried sendrawtransaction , true to try and rule out some fee problems. Same symptom.
I didn't see any special debug message in debug.log
My output for getinfo is:
{
    "version" : 90300,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 530.90534322,
    "blocks" : 460,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "difficulty" : 0.00000000,
    "testnet" : false,
    "keypoololdest" : 1421187525,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}

I'm still trying to plug v0.10 into my environment for debugging, I understand bitcoin-core has better messages for code -25, but I still need this to play nice with a v0.9 node.

**Tags:** bitcoind, json-rpc, raw-transaction, rpc-error-25

> **Comments:**
> **username_1**: relevant: http://bitcoin.stackexchange.com/questions/34203/error-25-when-bitcoind-sendrawtransaction  
> **username_0**: Thanks, I already took a look at this. I tried mining before the relay, to flush the mempool but the same thing happens, error unless I restart the node after which it works (this rules out double spend)  
> **username_2**: Mining the memory pool doesn't rule out double spend: if there was a conflicting tx in the memory pool, mining it puts that conflicting tx on the block chain---so your transaction is still a conflict. Can you use [`getrawmempool`](https://bitcoin.org/en/developer-reference#getrawmempool) to verify there isn't a conflicting tx in the mempool and [`getblock`](https://bitcoin.org/en/developer-reference#getblock) to verify there isn't a conflicting tx in the blocks you mined?  Also, [`gettxout`](https://bitcoin.org/en/developer-reference#gettxout) to ensure the input you're trying to spend exists.  
> **username_0**: Thanks @David, I checked `getrawmempool` and `getblock` for conflicting tx and found none. I agree mining doesn't rule out double spend, but being able to relay the tx and mine it after mining a block and a node restart does. When I do `gettxout` I get strange behavior. I constructed the tx to use input 1 of a tx. I see a txout for `gettxout <hash> 0 true` but not for `gettxout <hash> 1 true`. When I restart bitcoind I see both outpoints 0 and 1.  
> **username_0**: Also, this only happens with bitcoind, if I relay through a non-bitcoind node connected to my bitcoind node, it relays just fine and gets included in block.  
> **username_2**: Besides testing with 0.10.0 and maybe also regular testnet, I can't think of anything else for you to try.  If you can reproduce the problem on 0.10.0, it may be time to [report the issue](https://github.com/bitcoin/bitcoin/issues/new).  

---

## 1 answers

### Answer by username_0 on 2015-01-14. Score: 2

After connecting to bitcoin-core (0.10.0rc3) I received:
ERROR: CScriptCheck() : 620186f101b7db97393af8747923db4cf3f30c3c3c48f4c7cfc23567b6d9ca07:0 VerifySignature failed: Data push larger than necessary
ERROR: AcceptToMemoryPool: : ConnectInputs failed 620186f101b7db97393af8747923db4cf3f30c3c3c48f4c7cfc23567b6d9ca07

(Thanks bitcoin devs for adding sane error messages!)
From here I noticed I was building the transaction with an outdated fork of bitcoin-ruby, updating to the latest bitcoin-ruby fixed this issue (On both 0.9.03 and 0.10.0). Still not sure why it would only relay after a bitcoind restart, will edit this answer if I figure this out.


---

