Bitcoin Forum
May 02, 2024, 06:07:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Offline transaction with blockchain  (Read 2317 times)
o (OP)
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
April 29, 2013, 11:07:16 PM
Last edit: April 29, 2013, 11:57:51 PM by o
 #1

Reading few methods of offline transaction (https://bitcoinarmory.com/using-offline-wallets-in-armory/), it seems that there is still no easy way to do that at the moment (https://bitcointalk.org/index.php?topic=167312.0). There are many details to take care in BOTH online and offline clients. The less thing to do, the less the risk. So could the whole process be easier if the whole blockchain is copied to the offline computer? Is there any problem in following procedure?

(1) Copy the whole folder ~/.bitcoin/blocks to the offline computer
(2) [offline]: ./bitcoind sendtoaddress <address> <amount>
(3) [offline]: ./bitcoind getrawtransaction <txid>
(4) Copy the hexstring transaction back to the online machine
(5) [online]: ./bitcoind sendrawtransaction <hexstring>
---------- Alternative ----------
(4) Display QR code of hexstring transaction in offline computer
(5) Scan QR code and paste the transaction at https://blockchain.info/pushtx
(6) Erase everthing on USB to prevent any information leaking back to online computer

I have couples of concerns about the Satoshi client:
* Is the ~/.bitcoin/blocks folder contains all the necessary information of blockchain? Is it enough to only copy the newest part of database?
* I dont want to backup wallet every time. So to prevent the keypoolrefill(), is that the only way is to sendmany to send back to the original wallet? Do I need to calculate the exact amount in the sendmany to prevent it to send remainder to new address?
* Is the fee determined from the offline computer accurate? Even if the blockchain is not the newest one?
* If there is any errors found about the transaction before submitting, how to remove it and make a new one?

1714630057
Hero Member
*
Offline Offline

Posts: 1714630057

View Profile Personal Message (Offline)

Ignore
1714630057
Reply with quote  #2

1714630057
Report to moderator
1714630057
Hero Member
*
Offline Offline

Posts: 1714630057

View Profile Personal Message (Offline)

Ignore
1714630057
Reply with quote  #2

1714630057
Report to moderator
1714630057
Hero Member
*
Offline Offline

Posts: 1714630057

View Profile Personal Message (Offline)

Ignore
1714630057
Reply with quote  #2

1714630057
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714630057
Hero Member
*
Offline Offline

Posts: 1714630057

View Profile Personal Message (Offline)

Ignore
1714630057
Reply with quote  #2

1714630057
Report to moderator
1714630057
Hero Member
*
Offline Offline

Posts: 1714630057

View Profile Personal Message (Offline)

Ignore
1714630057
Reply with quote  #2

1714630057
Report to moderator
nevafuse
Sr. Member
****
Offline Offline

Activity: 247
Merit: 250


View Profile
April 30, 2013, 02:20:06 PM
 #2

Save http://brainwallet.org source to an html file on your flash drive w/ some linux live boot distro.  While still online go to the "transactions" section, enter your source address to get your previous transaction history (click "edit inputs" and save to txt file on flash drive). 

Boot live distro on your cold storage machine.  Open brainwallet html in firefox & go to the "transaction section".  Copy in transaction history from your txt file.  Copy in your private key (use bitcoind to get key from wallet.dat if necessary).  Copy destination address and the amount.  I'd recommend specifying a destination address for the remainder (to avoid accidentally giving some miner a huge fee).  I believe you can use the same address for the remainder as the source if you want.  Brainwallet may default to this, but I'm not 100% sure.  Hit re-sign if necessary to produce a raw transaction.  Save that raw transaction back to your txt file.

Now you can copy that raw transaction into http://blockchain.info/pushtx or bitcoind to send the transaction without the online computer ever seeing your private key.

PLEASE TRY THIS WITH A SMALL AMOUNT FIRST.  VERY EASY TO ACCIDENTALLY SEND A LOT OF MONEY TO THE WRONG PERSON - LIKE A MINER.  GOOD LUCK.

The only reason to limit the block size is to subsidize non-Bitcoin currencies
o (OP)
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
April 30, 2013, 09:18:02 PM
 #3

Save http://brainwallet.org source to an html file on your flash drive w/ some linux live boot distro.  While still online go to the "transactions" section, enter your source address to get your previous transaction history (click "edit inputs" and save to txt file on flash drive). 

Boot live distro on your cold storage machine.  Open brainwallet html in firefox & go to the "transaction section".  Copy in transaction history from your txt file.  Copy in your private key (use bitcoind to get key from wallet.dat if necessary).  Copy destination address and the amount.  I'd recommend specifying a destination address for the remainder (to avoid accidentally giving some miner a huge fee).  I believe you can use the same address for the remainder as the source if you want.  Brainwallet may default to this, but I'm not 100% sure.  Hit re-sign if necessary to produce a raw transaction.  Save that raw transaction back to your txt file.

Now you can copy that raw transaction into http://blockchain.info/pushtx or bitcoind to send the transaction without the online computer ever seeing your private key.

PLEASE TRY THIS WITH A SMALL AMOUNT FIRST.  VERY EASY TO ACCIDENTALLY SEND A LOT OF MONEY TO THE WRONG PERSON - LIKE A MINER.  GOOD LUCK.

Thanks for the suggestion. Is it possible to play with the brainwallet on the testnet? I have taken a look on it before. The issue is that the functionality of brainwallet is very simple and it seems not support sendtomany() now. Sure I can first send it to standard wallet and then create another transaction, but it takes an hour and increase the error.

The standard client have commands for all type of transactions, that is why I want to know whether the scheme described works or not?
nevafuse
Sr. Member
****
Offline Offline

Activity: 247
Merit: 250


View Profile
May 02, 2013, 05:09:08 PM
 #4

Thanks for the suggestion. Is it possible to play with the brainwallet on the testnet? I have taken a look on it before. The issue is that the functionality of brainwallet is very simple and it seems not support sendtomany() now. Sure I can first send it to standard wallet and then create another transaction, but it takes an hour and increase the error.

The standard client have commands for all type of transactions, that is why I want to know whether the scheme described works or not?

Sendtomany?  Like send amounts to 2 different people from the same private key?  If you use the + button next to the destination address, you can add multiple destination addresses.  That's why I was saying you should probably specify what change address to use by adding it as another destination address.

The only reason to limit the block size is to subsidize non-Bitcoin currencies
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
May 03, 2013, 05:36:25 PM
 #5

Use armory it supports offline transactions.

Another option is to use disposable addresses that you empty all at once and then never use again. If you go this route you can simply use blockchain.info API to broadcast your transaction:

Quote
Want to send without a My Wallet account? If you do not have a My Wallet account $guid can be replaced with a hex encoded private key and the password parameters can be omitted.

http://blockchain.info/api/blockchain_wallet_api
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!