<p>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.</p>

CC BY-SA 3.0
2014-04-18T06:56:18.580Z
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
CC BY-SA 3.0
2014-03-19T03:54:01.430Z
2014-03-19T03:54:01.430Z
uminatsu
<p>I'm trying to sign a transaction using bitcoind via rpc.
Here is the request I send.</p>

<pre><code>signrawtransaction "01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb0000000000ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000" '[]' '["cVAKPN7Rioo1ZLVjALa6n38iqSCd6g9zdyG5UUNcNphikstmwWHW"]'
</code></pre>

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

<pre><code>{"hex":"01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb000000006b48304502201d8199f2639579435e9d3c3d5f2245195d2c8f370bd738996120570146048f4e022100ad33352531fdc8805903d745a460249b5487555b72596a089dec724dc8df0700012103129f14097719e665939e778ef876d0022528b954b95d69b39194b9c764b4ae83ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000","complete":true}
</code></pre>

<p>But when I remove the blockchain file, it's not working anymore</p>

<pre><code>{"hex":"01000000017267f196964c70d529ba2c16c84f1fd8b52d983eb472bd005423c51ba15e6fbb0000000000ffffffff020065cd1d000000001976a9147c9b6f1bc7173d2751d49f072c6d29a10d40e24188acf03dcd1d000000001976a9144d814b8163d4cf7ad896cc5ecaba8a2c3790950c88ac00000000","complete":false}
</code></pre>

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

<p>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.</p>

<blockchain><bitcoind><raw-transaction><signature>
Bitcoind need blockchain to sign transaction
user1534422
# Bitcoind need blockchain to sign transaction

(Asked by: username_0 on 2014-03-18)

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.

**Tags:** blockchain, bitcoind, raw-transaction, signature


---

## 1 answers

### Answer by username_1 on 2014-03-19. Score: 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.

> **Comments:**
> **username_2**: 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.  

---

