Auto-pruning and transaction consolidation

Post Reply
whitebeard
Posts: 12
Joined: Wed Aug 27, 2014 7:34 pm
os: linux
Contact:

Auto-pruning and transaction consolidation

Post by whitebeard »

This started in The Great Aggregating thread, so I'm quoting some of the more salient parts here:
whitebeard wrote:It seems to me there might be a simpler approach to this than changing fees and slapping on band-aids. Pretty soon it won't be a block-chain; it'll be a bandage-chain. What we need to do is remove the need for people to consolidate all their tiny transactions, by doing it for them automatically.

Couldn't we add a feature to the wallet that automatically consolidates all extant inputs to a particular address if there are any inputs of at least X days of age into one transaction, by adding a marker to a new block that effectively authenticates the presence of all these inputs from previous blocks, so there is no need to search further back down the block-chain for authentication of the inputs. Thus decreasing the data size of any future outputs from that address. I would make it so that it would, also, automatically re-consolidate the returned change inputs by adding them back to the address from which they originally came without having them travel the block-chain again.

To take this further, it effectively would be an auto-pruning measure, because at some point you would never need to go back to the genesis block for authentication.

This, ultimately, may or may not have an effect on difficulty, so care needs to be taken that we do not introduce inflation into the economy.
phelix wrote:
whitebeard wrote:
Automatically consolidating is bad. Pruning is good and we (Domob) are working on it but it is difficult. Help with coding is appreciated.
Why? Please expand on this. What is your rationale?
Privacy issues was the first thing to jump to mind. Probably others. I would be happy to further discuss this suggestion but please create a separate thread for it.

I don't understand how placing a token into the blockchain affects my privacy any more than creating a transaction does. It would not publish any more information than is already freely available on the blockchain (the address involved and the amount of coin belonging to that address). Basically, what I am proposing is making a new creation point for the involved coins similar to what happens when new coins are mined. Once verified and approved by the community (i.e. miners [&other wallets?]) the historical links to those coins can be severed.

The advantage of auto-consolidaton for the network is generally smaller outputs from any given address. The disadvantage is an increase in change-making transactions. However, the two may balance each other as far as net effect on difficulty/network-load.

I am not sure if the best route would be to destroy the coins and recreate them (functionalities that already exist and seems like the logical choice) or create a whole new algorithm.

Regardless of consensus on auto-consolidation, something similar to this may be the answer to the pruning issue. The issue, then becomes one of how to get a genesis block on which new clients are dependent. I propose a historical summary generated by consensus of 'the community' either at regular intervals or on a floating interval based on recent activity on the network The summation lines would start from coin creation and jump to their current state eliminating all the data in between. This of course depends on integrity of the prior data which must be verified before the "genesis summary" is implanted and truncation of the blockchain occurs.

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Auto-pruning and transaction consolidation

Post by domob »

Please correct me if I'm wrong, but from what I understood, your proposal boils down to more or less keeping track of balances for addresses instead of individual coins. Without having thought about it in depth, I think that it is a good idea (and one which has been brought up for Bitcoin already multiple times, I think) - it should rather increase privacy than decrease it, and may be more efficient in general (as you point out).

However, this would be a complete restructuring of the underlying blockchain and ledger. I don't think this is likely to happen, just for the reason that Satoshi chose the coins approach when developing Bitcoin. But if you believe your approach is superior, you can start a fresh altcoin based on it (either for Namecoin or Bitcoin itself) - you could even use the "spin-off" idea to restore balances (and names) from either Namecoin or Bitcoin into your chain, to make it a real drop-in replacement in case it gets accepted by the majority of people.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

whitebeard
Posts: 12
Joined: Wed Aug 27, 2014 7:34 pm
os: linux
Contact:

Re: Auto-pruning and transaction consolidation

Post by whitebeard »

That is the gist of my proposal... but there would still be accounting for individual coins... I suppose I should fork both bitcoin and namecoin...

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Auto-pruning and transaction consolidation

Post by phelix »

My worry about privacy implications was specifically about "automatically consolidating" small inputs into larger ones.

About keeping balances instead of txs - there will be advantages and disadvantages and lots of work in this. I know little about the concept, probably it has been discussed on bitcointalk quite a bit, e.g. https://bitcointalk.org/index.php?topic ... 10#msg4610
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Auto-pruning and transaction consolidation

Post by phelix »

nx.bit - some namecoin stats
nf.bit - shortcut to this forum

whitebeard
Posts: 12
Joined: Wed Aug 27, 2014 7:34 pm
os: linux
Contact:

Re: Auto-pruning and transaction consolidation

Post by whitebeard »

Those are discussions from 4 years ago and they were talking about balance sheets kept by clients (which would never work). My proposal is essentially a method of summarizing the blockchain in the blockchain. (Initiated by the client perhaps, but verified and installed into the blockchain by the community.)

The beauty of this is that it does keep a summary record of verified transactions all the way back to coin creation. That's the only way it could work.

tosh0
Posts: 43
Joined: Sat Mar 22, 2014 6:48 pm

Re: Auto-pruning and transaction consolidation

Post by tosh0 »

How about a new kind of block?
this superblock will happen every x blocks and will contain not transactions but merkle tree of all the previous blocks. ( block numbers and hashes) also will contain the hash of a balance sheet with all balances of all addresses.( the spendable tx output database, as well as names).

Then a lite client only need to download all the blocks after the last 2 superblocks and update the database. It could also request a new type of file, balance sheet, that is tied to the superblock by the hash, as it were on the last superblock (and check to see if the hash of the latest checkpoint is included in this superblocks ). Nodes will be required to have at least the last 2 superblocks and their corresponding balance sheets.

The superblock cannot be empty and must contain all balances.

Also regular blocks cannot be empty and must contain at least 50% of transactions in the memory pool that have enought fees.
NMC: more stable than BTC!

whitebeard
Posts: 12
Joined: Wed Aug 27, 2014 7:34 pm
os: linux
Contact:

Re: Auto-pruning and transaction consolidation

Post by whitebeard »

That is certainly something to consider, given the need for light clients if cryptocurrency is going to become portable without the need for trusted third parties. I think we're talking about basically the same thing, just using different terms. The major difference is yours would happen "every x blocks" and mine happens continuously.

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Auto-pruning and transaction consolidation

Post by biolizard89 »

Are you guys familiar with the SPV+UTXO work? http://utxo.tumblr.com/ The guy working on it needs funding though.

libcoin also is working on something similar.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

Post Reply