1

I'm trying to sign a transaction using bitcoind via rpc. Here is the request I send.

signrawtransaction "01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb0000000000ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000" '[]' '["cVAKPN7Rioo1ZLVjALa6n38iqSCd6g9zdyG5UUNcNphikstmwWHW"]'

When I send that to the bitcoind daemon with all the blockchain downloaded it's working perfectly:

{"hex":"01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb000000006b48304502201d8199f2639579435e9d3c3d5f2245195d2c8f370bd738996120570146048f4e022100ad33352531fdc8805903d745a460249b5487555b72596a089dec724dc8df0700012103129f14097719e665939e778ef876d0022528b954b95d69b39194b9c764b4ae83ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000","complete":true}

But when I remove the blockchain file, it's not working anymore

{"hex":"01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb0000000000ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000","complete":false}

Does bitcoind need the blockchain to sign the transaction (it would be highly surprising to me), or is there something I am missing?

PS: I tried to sign the transaction on a freshly installed bitcoind and it wasn't working. All the "delete the blockchain files" part was only to make sure that it was really the blockchain missing that was causing the problem and not a strangely installed/configured bitcoind.

1

You surely need the unspent tx outputs (tx hashes, and indices) to sign a transaction. Furthermore you need the age and value for each utxo to calculate required fees.

1
  • You can pass the unspent transaction output data directly to signrawtransaction though. Bitcoind falls back to looking it up only when you don't pass it. – Pieter Wuille Apr 18 '14 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.