novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

save bare wallet #404

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Like Jim said a couple of weeks ago, in future the wallet backup format will 
probably be the wallet format itself, rather than our textual key exchange 
format.

The reason I still use the textual format is that it hardly gets corrupted, so 
I always have a fallback for if the main wallet file cannot be read. I know 
that this resurrected many wallets, for example those that were corrupted by my 
incomplete wallet eviction.

I think protobuf format can be just as robust, we only need to store the bare 
minimum. So my proposal is:

Have a second form of WalletProtobufSerializer.writeWallet() and/or an added 
boolean parameter to the existing method. With that, you can save a wallet 
stripped down to just the keys (and probably other non-derivable data like 
wallet names). It should create a file that can be read with readWallet() 
followed by a blockchain replay to get it live again.

Original issue reported on code.google.com by andreas....@gmail.com on 8 May 2013 at 5:31

GoogleCodeExporter commented 9 years ago
I think this is a good idea - a bare wallet would not be very large and quick 
to save so you could save it whenever you added new keys or whatever. 

Original comment by jimburto...@gmail.com on 8 May 2013 at 6:07

GoogleCodeExporter commented 9 years ago
I have a branch for this feature at

https://github.com/schildbach/bitcoinj/tree/write-wallet-skip-redundant

Original comment by andreas....@gmail.com on 20 Feb 2014 at 8:31

GoogleCodeExporter commented 9 years ago
I wonder if we can instead make the loading process more robust, like a mode 
which doesn't do any consistency checking. The hard part is protobuf 
validation: I'm not sure the Java API allows you to make it optional.

Original comment by mh.in.en...@gmail.com on 10 Mar 2014 at 4:20