SPV clients don't normally carry the UTXO set around in their memory, correct?
Right the "UTXO client" we've been talking about is a different animal with a stronger security model...
2) SPV Clients SPV clients only request information on transactions involving addresses that they care about (well actually they ask for a range of address to preserve some level of anonymity).
Using the merkle tree an SPV is able to link a single transaction up the tree to the block's header. Since they do maintain the header chain of the longest blockchain, this mechanism allows them to verify for themselves the validity of a transaction. However since they do not keep data on other addresses or transactions, they are not able to verify blocks or other new transactions on the P2P network. Think of them as leaves to the network. SPV clients take information, but do not contribute to the P2P network's security in any way, they are leaches.
1) "Archival nodes" [Full nodes operating with full history] &
3) "Pruned nodes" or "UTXO hash started nodes" [Full nodes operating without full history]All full nodes maintain the full UTXO set. This is what enables them to verify blocks and new transactions on the network.
The UTXO hash clients mentioned before are still full clients. The only difference is how the node obtains the current UTXO set from the longest blockchain. One method is to download and process the complete history (i.e. 1 - Archival nodes; 3 - Pruned nodes) , another method is to download only the UTXO set (current as of block xxx) and verify that UTXO set within the current block with a hash embedded in the block (i.e. 3 - UTXO hash started nodes). Once done, such a node would be in the same state as another who processed the complete history and would contribute to the P2P network as a full node.
I would argue that a UTXO hash would be as secure as a coinbase transaction, which is very secure. The risk to UTXO hashes is that a miner might insert an invalid hash for a new incorrect UTXO set. Miners can do the same thing with coinbase transactions, i.e. reward themselves 1000 BTC instead of 25 BTC. But they don't because such a block is invalid and would be rejected. Same with a UTXO hash, a miner could insert an incorrect hash, but such a block is invalid and would be rejected. And if you were still worried you could always scan the complete history, there will always be some nodes who do so and who would scream if there was a falsification.
You're doing a great job articulating this but what's a bit confusing, at least for me, is from which type of node's perspective you're arguing from; namely 1. Archival nodes, 2. SPV clients, or 3. Pruned nodes.
I think it matters because I don't think that current SPV clients have the capability to download the UTXO set to verify the UTXO hash embedded in their block headers. Do you think it would just be a small additional implementation detail that these wallet providers will insert once this protocol change gets enacted? Do smartphones have that memory capability?
Ah OK, I think I now see what you were getting at.
In the post above I was contrasting all three types, sorry if that was confusing. I edited the quoted text above to hopefully make the post more clear.
If I understand your question correctly, you're asking if thin clients such as smartphones could utilize some form of a UTXO set to verify transactions and blocks on the P2P network. That is an interesting possibility.
The reason smartphone type devices can't be full nodes today is due to both the storage and the bandwidth requirements. In terms of storage both 3) Pruned nodes and 3) UTXO hash started nodes could run on a smartphone since neither have to store the full blockchain. Bandwidth would still be an issue though. Pruned nodes would still need to download the full blockchain, over a mobile connection that would be expensive. UTXO hash started nodes however would only have to download the UTXO set, probably reasonable today, but it keeps growing. And that is just to get started, once started the node would need to transmit transactions & blocks. At over 1MB every 10 minutes, that will eat through any wireless plan's data allowances pretty fast.
Here is a chart on the current UTXO set size. We are already at 650MB and growing. High end smartphones today only have 2-3GB of memory, and some of that is needed for other apps.
http://statoshi.info/#/dashboard/file/default.json?panelId=5&fullscreen&from=now-24h&to=nowSo my guess is pretty soon the size of the UTXO set will be large enough that smartphone like devices couldn't run a full node, even if you ignore the bandwidth and storage limitations. Node memory requirements will become too large.