Ability to use signrawtransaction offline #11546

issue ghost opened this issue on October 21, 2017
  1. ghost commented at 4:42 PM on October 21, 2017: none

    Describe the issue

    Trying to sign a transaction offline using signrawtransaction will trigger an error : "Input not found or already spent" (very likely https://github.com/bitcoin/bitcoin/blob/master/src/rpc/rawtransaction.cpp#L860).

    The point is to have an offline computer used as cold storage wallet and be able to sign some imported raw transactions created on another online computer (using watch-only addresses).

    Can you reliably reproduce the issue?

    If so, please list the steps to reproduce below:

    1. Create an offline wallet (on an offline computer)
    2. Export offline wallet public keys (addresses)
    3. Import offline wallet public keys on an online wallet (other computer) (=> Watch-Only addresses)
    4. Fund an address
    5. use createarawtransaction from online wallet
    6. try to sign created transaction on offline computer having offline wallet : error.

    Expected behaviour

    Sign the transaction, don't try to check if transaction is funded when offline.

    Actual behaviour

    Won't sign the transaction because don't have access to blockchain offline.

    What version of bitcoin-core are you using?

    0.15.0.1

  2. TheBlueMatt commented at 4:55 PM on October 21, 2017: member

    Bitcoin needs the inputs to sign properly. You can provide the input scriptPubKeys to signrawtransaction with the "prevtxs" argument.

    On October 21, 2017 12:42:43 PM EDT, bitcoin-throwaway notifications@github.com wrote:

    Describe the issue

    Trying to sign a transaction offline using signrawtransaction will trigger an error : "Input not found or already spent" (very likely https://github.com/bitcoin/bitcoin/blob/master/src/rpc/rawtransaction.cpp#L860).

    The point is to have an offline computer used as cold storage wallet and be able to sign some imported raw transactions created on another online computer (using watch-only addresses).

    Can you reliably reproduce the issue?

    If so, please list the steps to reproduce below:

    1. Create an offline wallet (on an offline computer)
    2. Export offline wallet public keys (addresses)
    3. Import offline wallet public keys on an online wallet (other computer) (=> Watch-Only addresses)
    4. Fund an address
    5. use createarawtransaction from online wallet
    6. try to sign created transaction on offline computer having offline wallet : error.

    Expected behaviour

    Sign the transaction, don't try to check if transaction if funded when offline.

    Actual behaviour

    Won't sign the transaction because don't have access to blockchain offline.

    What version of bitcoin-core are you using?

    0.15.0.1

    -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bitcoin/issues/11546

  3. sipa closed this on Oct 21, 2017

  4. sipa commented at 4:59 PM on October 21, 2017: member

    As @TheBlueMatt says, this functionality exists, but you do need to know the outputs being spent. You can find these using the listunspent or gettxout RPCs on the online machine.

  5. ghost commented at 5:41 PM on October 21, 2017: none

    yes it worked, thank you !

  6. coolbobo commented at 3:39 AM on April 18, 2018: none

    @bitcoin-throwaway can you show me your code which using "prevtxs" argument.

  7. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me