Bitcoin Forum
July 07, 2024, 02:03:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Idea: lightweight user wallets keeping/validating x% of all transactions  (Read 1197 times)
oleganza (OP)
Full Member
***
Offline Offline

Activity: 200
Merit: 104


Software design and user experience.


View Profile WWW
March 14, 2013, 07:26:40 AM
 #1

It's not a novel idea, Gavin and others already mentioned it in other threads. Just wanted to gather your opinions in one place.

We have roughly two types of wallets: either store the full blockchain ("full node"), or only keep the password/private keys and trust other full nodes about transaction confirmation status ("light node"). All full nodes have to validate all the transactions themselves and keep the whole history. This is essential to miners (to rearrange transactions for the next block), but not so much to the rest of us. Regular folks don't like storing gigabytes of blockchain, but might be interested in having extra security for low cost.

Imagine a wallet which has a setting "amount of storage allowed for transactions" with values like 50 Mb, 100 Mb, 200 Mb. The wallet will store all the block headers, but receive full blocks and only store some random portion of transactions and validate them against what it has in the storage already (and, as an option, store all transactions involved in his own addresses). If the wallet detects an invalid block, it can be announced to the peers immediately, so they can validate it fully themselves (by downloading missing transactions from others). This is in contrast to a server which may maliciously or by accident present incorrect history to its clients for some time.

Lets say the blockchain occupies 100 Gb a couple of years from now and every user wants to store around 100 Mb. This will make him validate 0.1% of all transactions (p=0.001). If N clients are using such clients, the lowest probability of catching the bad transaction in a bad block is (1–(1–p)^N). To make it 99,995% only 10000 clients should use the app. If a number of clients increases 10 times, the percentage of validated transactions can be divided by 10 and the same security level will remain.

Another way to do it: validate only your transactions. E.g. if you are a shop owner, you may only keep histories of transactions that are important to you and prune those that are no longer relevant (can be re-downloaded again when needed). If every shop owner does that, they collectively will still validate the whole blockchain, but wasting much less computational resources.

Today this scheme is not really needed because the blocks are fast to validate, and the whole blockchain is relatively small. But when Bitcoin gets mass adoption and people would want it to scale, this might one of the ways to do it. (Especially if blockchain grows faster than the hardware.)

What do you think?

Bitcoin analytics: blog.oleganza.com / 1TipsuQ7CSqfQsjA9KU5jarSB1AnrVLLo
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
March 14, 2013, 10:21:38 AM
 #2

For any particular transaction, the most useful thing to validate about it is: "Are all the transaction inputs still available to be spent ?".

If you have a small percentage of all transactions in your local cache, the chances of a cache miss for all of those particular transaction inputs is pretty high. If a transaction had, say, 10 inputs you might be able to say that the one input you knew about was/ was not valid.

There is no way at the moment to broadcast if you think a transaction is a double spend but if there was the "somewhat lightweight" client could broadcast "Hey, for tx id 123 the tx input #4 is already spent".

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
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!