pull down to refresh

New idea

What if some nodes on the network signaled that they are willing to provide an extra bit of data to their peers upon request, which is this: if your node asks theirs to prove that a certain utxo is spent, they will provide that proof, if they have it, in the form of (1) the earliest transaction in the blockchain that spends that utxo (2) and a merkle proof proving that transaction is included in a certain block’s block header. Your node can then validate that transaction and validate the merkle proof – which even a pruned node can do.

How this helps

If your node connects to peers who signal that feature, then it does not need to store a full copy of the utxo set. The reason is this: suppose you discard some utxos, including utxo Q, and a new block comes in containing a transaction that claims to spend utxo Q. To validate it, you request from your peers a proof that utxo Q was spent. Per the trust assumption stated in Number 1, not all of your peers will withhold this data from you, so if the utxo was spent before the current block, you will learn of it, and that will prove that utxo Q was spent already, so the block is invalid; otherwise, utxo Q was not spent already, so the block is not therefore invalid.

Optimization

Nodes which use this technique could therefore prune their utxo set. To limit network requests, they could also keep a configurable amount of utxos, e.g. the most recently created 1 gigabyte of them, and prune the remainder. Then, if anyone spends an “old” utxo, use the method outlined above to recover it from your peers, and continue validation.
Well, perhaps I'm exposing my ignorance, but this idea seems like it just turns a node that tries to implement it into a node that trusts the network to give it proof on demand. Why keep any of the utxo set at all?
My ignorant concept of the way Bitcoin Core does this is that the block data is how you prove everything, but when you download and verify it, you produce a new thing called the utxoset which is all you need to verify if incoming coins are valid. But if you discard any of the block data, you can't reconstruct your utxoset if it gets damaged.
So Super's idea here sounds like a new kind of SPV node.
102 sats \ 0 replies \ @optimism 1h
BIP-64? Didn't work well.
reply