Bitcoin Forum
May 10, 2024, 05:52:08 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SPV performance, looking back over the last two years  (Read 860 times)
Mike Hearn (OP)
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
April 11, 2013, 12:50:37 PM
 #1

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
1715320328
Hero Member
*
Offline Offline

Posts: 1715320328

View Profile Personal Message (Offline)

Ignore
1715320328
Reply with quote  #2

1715320328
Report to moderator
1715320328
Hero Member
*
Offline Offline

Posts: 1715320328

View Profile Personal Message (Offline)

Ignore
1715320328
Reply with quote  #2

1715320328
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715320328
Hero Member
*
Offline Offline

Posts: 1715320328

View Profile Personal Message (Offline)

Ignore
1715320328
Reply with quote  #2

1715320328
Report to moderator
chriswilmer
Legendary
*
Offline Offline

Activity: 1008
Merit: 1000


View Profile WWW
March 15, 2014, 07:35:32 AM
 #2

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!
Mike Hearn (OP)
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
March 16, 2014, 02:46:11 PM
 #3

Thanks Chris! Smiley
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!