ManojNimbalkar / bitcoin-wallet

Automatically exported from code.google.com/p/bitcoin-wallet
0 stars 0 forks source link

Don't store the initial blockchain in the .apk #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This has probably already been considered, but I'd really like to see a version 
without the initial blockchain included in the apk.

As it is, it seems to be copied from the apk to the data directoy directly 
after installation (please correct me if I'm mistaken), and thus requires twice 
the storage.

This does not only increase storage space consumption, but also makes updates 
prohibitively large for installing on a capped mobile data connection.

Maybe a solution would be to only include a secure hash of the initial 
blockchain, and download it from some other location instead from a peer to 
increase download speed. I'm sure you could find a volunteer for hosting.

Original issue reported on code.google.com by lukas.ri...@gmail.com on 17 Jul 2011 at 11:11

GoogleCodeExporter commented 9 years ago
Actually storing the initial blockchain in the APK is much more reliable than 
downloading it, at the present time.

The real issue is that it should not be copied, but used directly from the APK. 
This issue is being worked on.

Btw. On Android 2.2 and above, the APK including one copy of the blockchain is 
stored on your SDcard, so it should not hurt so much.

Original comment by andreas....@gmail.com on 18 Jul 2011 at 8:00

GoogleCodeExporter commented 9 years ago
A feature to import a block chain would be great so I can copy it from my pc so 
I don't have to pay extraneous amounts to get started.

Original comment by RyanWols...@gmail.com on 27 Aug 2011 at 11:05

GoogleCodeExporter commented 9 years ago
Copying from PC won't work, because it's a vastly different file format. Also, 
the block chain on PC contains all the transactions, while BitCoinJ only stores 
block headers.

Original comment by andreas....@gmail.com on 27 Aug 2011 at 11:31

GoogleCodeExporter commented 9 years ago
Thanks, that explains a lot. I am reading the size of the bitcoinj chain is 
around %4 of the size of the pc blockchain. Perhaps a notice of the size that 
is to be downloaded would be informative to first time users? This has solved 
my issue, thanks again

Original comment by RyanWols...@gmail.com on 27 Aug 2011 at 11:43

GoogleCodeExporter commented 9 years ago
Issue 58 has been merged into this issue.

Original comment by andreas....@gmail.com on 23 Nov 2011 at 2:49

GoogleCodeExporter commented 9 years ago
if move/download into the sd-card?

Original comment by castori...@gmail.com on 23 Nov 2011 at 5:44

GoogleCodeExporter commented 9 years ago
This would not reduce the size of the app. By the way, you can already move the 
whole app to SD (at the expense of the widget).

Original comment by andreas....@gmail.com on 23 Nov 2011 at 5:51

GoogleCodeExporter commented 9 years ago
ok, maybe a litle version (without blockchain), ask download at first init and 
store on SD. 

i think that is useful for users with 2.1 or below

Original comment by castori...@gmail.com on 23 Nov 2011 at 10:22

GoogleCodeExporter commented 9 years ago
For the Testnet version, I do not include the blockchain snapshot in the .apk 
any longer.

Original comment by andreas....@gmail.com on 29 Feb 2012 at 2:45

GoogleCodeExporter commented 9 years ago
Considering that you can't use the app without downloading the blockchain 
first, what would be accomplished by being able to download the app and the 
blockchain seperately?

Original comment by voluntar...@gmail.com on 4 May 2012 at 4:42

GoogleCodeExporter commented 9 years ago
@voluntaryman Storing the blockchain snapshot within the apk indeed has some 
downsides. For example, it has to be re-downloaded for each app update, but it 
will only be used on first-time app start (and on blockchain resets).

If we find a way to download/verify the blockchain faster, it should IMHO be 
removed from the apk.

Original comment by andreas....@gmail.com on 4 May 2012 at 4:47

GoogleCodeExporter commented 9 years ago
Maybe an expansion files can be used to store blockchain?

http://android-developers.blogspot.com/2012/03/android-apps-break-50mb-barrier.h
tml

Original comment by wiktor.k...@gmail.com on 14 Jun 2012 at 9:21

GoogleCodeExporter commented 9 years ago
Expansion files can only be stored on the SD card, which again is insecure.

Original comment by andreas....@gmail.com on 14 Jun 2012 at 11:32

GoogleCodeExporter commented 9 years ago
Oh right, sorry. Just out of curiosity how could this be exploited by malicious 
application? I thought the blockchain is used only to compute the balance of 
wallet and the keys are safely stored in Bitcoin Wallet private files.

Thanks for the explanation!

Original comment by wiktor.k...@gmail.com on 14 Jun 2012 at 7:45

GoogleCodeExporter commented 9 years ago
You are correct in that your keys would be safe and no one could steal your 
Bitcoin.

Still, you need to trust the blockchain. If an attacker could modify your 
blockchain he could send you fake transactions.

Original comment by andreas....@gmail.com on 14 Jun 2012 at 8:44

GoogleCodeExporter commented 9 years ago
Why not store a merkle hash tree of the block headers in the secure storage 
(where we store the private keys) then you can quickly check the hash of any 
block. This means the block headers can be stored in a non trusted location.

Original comment by da2...@gmail.com on 26 Mar 2013 at 6:38

GoogleCodeExporter commented 9 years ago
The next major version will get rid of the blockchain snapshot anyway, in a 
secure way.

Original comment by andreas....@gmail.com on 26 Mar 2013 at 9:11

GoogleCodeExporter commented 9 years ago
The fix has been released in 3.0 beta.

Original comment by andreas....@gmail.com on 3 Apr 2013 at 9:48