Skip to content

import Bitcoin Wallet private key backup from new file format#82

Merged
apetersson merged 2 commits intomycelium-com:masterfrom
johnzweng:update-schildbach-import
May 13, 2014
Merged

import Bitcoin Wallet private key backup from new file format#82
apetersson merged 2 commits intomycelium-com:masterfrom
johnzweng:update-schildbach-import

Conversation

@johnzweng
Copy link
Copy Markdown
Contributor

Adds support for the new protocol buffer based backup file format of the Schidbach Bitcoin Wallet.

@apetersson
Copy link
Copy Markdown
Contributor

this 500kb java file looks scary to have it in the build. i will check out how that impacts the total size after proguard.

@apetersson
Copy link
Copy Markdown
Contributor

single apk build test:

without protos: Total time: 1 mins 51.104 secs
apk: 3,5 MB (3.484.971 bytes)

with protos: Total time: 2 mins 1.481 secs
apk: 3,6 MB (3.619.262 bytes)

@johnzweng
Copy link
Copy Markdown
Contributor Author

Is this overhead ok for you (for a single feature)?

@apetersson
Copy link
Copy Markdown
Contributor

the main drawback is the 135k extra size in the apk. that sounds indeed a bit much. i don't know if that comes from including protobuf the library or the big generated protos file. also, there is a 64k limit on the total methods in a project (before minimizing) which we will hit soon-ish. (we are for example unable to include spongy/bouncy castle because of that)

otoh,i really hope we will switch some of our own code to protobufs with HD wallets protocol. this will bring in most of this anyways.

we are really busy, please let us some time until after the conference to think about the best solution.

@johnzweng
Copy link
Copy Markdown
Contributor Author

I fully understand. No need for a rush. This isn't a very important feature so take your time and decide yourself if it's worth to be added. :)

@apetersson
Copy link
Copy Markdown
Contributor

i am leaning towards including it now. but if we need to make room for the 64k method limit this will be a candidate to be removed ;(

@johnzweng
Copy link
Copy Markdown
Contributor Author

Maybe in future you may consider refactoring your classes into sperate dex-files and using custom classloader to load them on demand (depends on the structure of your app if this is a possible way to go): http://android-developers.blogspot.co.at/2011/07/custom-class-loading-in-dalvik.html

Or reducing your codebase.. ;) Where do 64k methods come from? :-)

@apetersson apetersson merged commit 0ed8b92 into mycelium-com:master May 13, 2014
@apetersson
Copy link
Copy Markdown
Contributor

an alternative could also be to use square wire which is a more optimized protobuf approach.

https://github.com/square/wire

the 64k methods come mostly from all the libraries we use. so far, it is not a pressing issue.

@johnzweng johnzweng deleted the update-schildbach-import branch May 13, 2014 09:23
Giszmo added a commit that referenced this pull request Feb 1, 2018
…r-seed

#529 try to fix Crash in WalletManager.configureBip32MasterSeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants