Author

Topic: SPV performance, looking back over the last two years (Read 883 times)

legendary
Activity: 1526
Merit: 1134
Thanks Chris! Smiley
legendary
Activity: 1008
Merit: 1000
Nobody replied to say congratulations? I guess everybody was too distracted by the dramatic crash of that day.

Congratulations!!!

SPV wallets are amazing, especially when you start thinking about how non-trivial they are to implement!
legendary
Activity: 1526
Merit: 1134
It's nearly May 2013 and today version 3 of the Android Bitcoin Wallet app was released. It starts up and syncs more or less immediately and for the first time it has resource usage proportional only to end-user activity, not the size of the Bitcoin system as a whole. It's far from perfect, but I'm very happy we achieved my goal of a mobile app that easily competes with BitcoinSpinner/blockchain style apps - we finally have a pure peer-to-peer solution without needing to compromise on usability, performance or security.

In May 2011, Jeff started the following thread:

   https://bitcointalk.org/?topic=7972.0

He asked how "headers only" clients would evolve, what our goals would be and asked for concrete technical answers. I replied with how I wanted things to work and what we should aim for. It's neat to look back two years and see how things have changed and yet how closely we followed the original roadmap.

In case we forget, in May 2011:

  • Blocks were around 10kb each
  • Saying mobile users should just use a web browser to access their MyBitcoin account didn't sound ridiculous. MyBitcoin would not steal peoples money for another two months at this point.
  • The term "SPV client" did not exist, it seems like I used it for the first time in that thread.
  • Most of us assumed the original app would be upgraded to have a thin-client mode based on some unfinished code by Satoshi. That never happened.
  • bitcoinj had been announced two months before.

In the thread we discuss how the P2P network interaction would work, I proposed Bloom filtering for the first time (later implemented by Matt), we talked about using protocol extensions to provide merkle branches linking filtered transactions to the chain (done by Matt and Pieter), I also mentioned using checkpoints to avoid downloading all the headers - this is the biggest new feature in v3 of the mobile app. I set a goal of <500msec startup time on a phone that gives apps 16mb of RAM.

The last goal we missed a little bit - I never measured but I think Bitcoin Wallet takes a few seconds to go from "press icon" to "loaded and usable" even on very modern phones. But we didn't miss by much and there's still plenty of optimisations left.

The Android app is flawed in many ways - it needs deterministic wallets for better privacy, it needs a proper fee solver, it needs to be less buggy, it needs to not rely so heavily on DNS seeds, it needs to not try and load the entire wallet into RAM because heavy users start to run out of memory, it needs to be able to label transactions rather than addresses and many many other things. But, its performance is finally acceptable.

Big thanks to everyone who helped along the way. Especially Matt, Pieter, Andreas and Jim - you guys totally rock!


Android app installs
Jump to: