Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: etotheipi on September 03, 2011, 06:08:13 AM



Title: Lite-client without third-party/server dependency
Post by: etotheipi on September 03, 2011, 06:08:13 AM
I'm familiar with the implementation of the networking, but not so much the reality, perhaps someone with more experience can chime in.  I'm pondering the feasibility of a lite-client without relying on third-parties/servers.  This lite-client would simply connect to peers, scan incoming transactions, and throw away everything it doesn't need.

The problem here is that if this client is on my phone, I can't leave it connected all the time:  data usage costs, battery drain, spotty reception.  My question is, if I wanted to have the client save the last block it scanned, and every 30 minutes update itself, what kind of latencies is the user going to experience when they whip out their phone? 

If it's only two or three blocks, download should be fast, but peer discovery/initiation is the unknown here.

Would there be any benefit bring bit-torrent into the mix?  I know it is also peer-based, but it doesn't have the same kind of lock-out protocols that bitcoin is conservatively designed with at the moment.

In general, I think bit-torrent would be a great idea to move block data around, but it may not be necessary when the protocol is "fully" released.



Title: Re: Lite-client without third-party/server dependency
Post by: Steve on September 03, 2011, 01:12:47 PM
I think the reality is that you'll find you need the third-party server.  Just run bitcoind (or bitcoinjs) on a server somewhere (a user could run their own if they have issues trusting a third party) and connect with it over a lightweight protocol using ssl.


Title: Re: Lite-client without third-party/server dependency
Post by: etotheipi on September 03, 2011, 10:23:09 PM
Steve,

I hear what you're saying.  But I also know that there are many users who just can't set up their own servers for this purpose, and aren't particularly fond of trusting third-parties.  I think that there would be demand for such a client even if it's slightly less convenient.  But "slightly" is a very subjective term.  I suspect it may be "a lot" less convenient, but that's why I'm asking.

I believe that users would really like this kind of client, so I want to figure out if it's possible, what its limitations would be, and if there's any tricks we can pull to make it easier.   For instance, it should be able to send transactions before the blockchain is updated:  your phone knows it had enough TxOuts available last time it checked the network, so why not sign the transaction?  If it's wrong and the coins have already been spent, the tx msg is DOA at the first peer it hits and the phone can spend 2s querying to peer to find out if he accepted it (but this wouldn't happen unless people/devices are sharing accounts).

My perception of peer discovery/download is biased, because there's a networking problem with my computer that leads to terrible connection times.  It takes me hours after starting the BTC client to get caught up with the blockchain.  If it's the kind of thing that can be caught up within 30 seconds, then there's still plenty of cases where this is useful.  If it's only being used to juggle money between friends or pay at sit-down restaurants, 30s + confirmations may be fine.