Hi ZmnSCPxj and Ethan, I apologize if my initial explanation was confusing, but it looks like you figured it out. For every fork, SPV clients only have to download one block. If there is a fork after block N, this means there are two blocks at N+1. You only download and verify N+1 from the longer chain.
>Mining a block which will never be accepted is an expensive way to make SPV >clients download validate and discard ~2-4 megabytes of data Absolutely, hence the name "PoW fraud proof". It gets naturally created by honest miners and is prohibitively expensive to forge. >SPV clients may not even learn about these splits because it requires that >someone relay the split to them. Honest full nodes should not relay such >splits. You could perform a fully valid repeated 1-block reorg from the top of the chain. So at least theoretically you could get an honest network to relay every split. >Having SPV clients slow down or become full nodes when a malicious miner with >significant mining power is attempting to disrupt the network is probably a >best case outcome. That is an excellent point. >As I understand it, this requires that UTXO commitments be mandatory. Perhaps UTXO sets can be made useful without committing them. I have some very loose thoughts on the subject, I consider it an open question. > More difficult is: how can an SPV node acquire the UTXO set at a particular > block? I think you are asking fair questions about how the UTXO set commitments would work in practice, and how viable that makes it. I'm not sure. The most comprehensive work I have seen on this topic has been the utreexo proposal by Tadge Dryja: https://www.youtube.com/watch?v=edRun-6ubCc Actually, now that I think about it... As an alternative to UTXO set commitments, the old fraud proofs idea for segwit can be applied here. We get miners to commit to the location of the UTXOs that are being spent (e.g. transaction 5 in block 12). This allows full nodes to succinctly prove invalidity to SPV clients in the following ways: - a committed location does not contain the stated UTXO - the UTXO has already been spent in a prior block If no fraud proofs are given, then the inputs can be assumed to be valid. As you may recall, these kinds of fraud proofs were abandoned mainly because the data unavailability claim could only be verified by downloading the data, resulting in a DoS vector where all blocks had to be downloaded. This problem does not seem to apply here, because we are only interested in blocks which have forks, so it's more doable to download them. -- Ruben Somsen On Fri, Apr 19, 2019 at 6:48 AM ZmnSCPxj <zmnsc...@protonmail.com> wrote: > > Good morning Ethan, > > > My above email contains an error. The SPV client needs to only > > download S+1, not S+1 and S+2. > > > > I agree with you that a weakness of this approach is a miner can make > > SPV clients do substantially more work. However: > > > > 1. Mining a block which will never be accepted is an expensive way to > > make SPV clients download, validate and discard ~2-4 megabytes of > > data. There are far less expensive ways of wasting the resources of > > SPV clients. Its unclear why someone would want to do this instead of > > just packeting full nodes or SPV servers like we saw with the recent > > DDoS attacks against electrum servers. > > > > 2. SPV clients may not even learn about these splits because it > > requires that someone relay the split to them. Honest full nodes > > should not relay such splits. To their bitcoin's worth the attacker > > must also connect to lots of SPV clients. > > > > 3. Having SPV clients slow down or become full nodes when a malicious > > miner with significant mining power is attempting to disrupt the > > network is probably a best case outcome. I would prefer this failure > > mode to the current SPV behavior which is to just go with the > > "longest" chain. > > > I understand. > It seems a reasonable point to do so. > > As I understand it, this requires that UTXO commitments be mandatory. > In particular, if UTXO commitments were not mandatory, it would be trivial to > force chainsplits at heights where a UTXO commitment was not made, and force > an SPV node to download more blocks backwards until a block with a UTXO > commitment is found. > > More difficult is: how can an SPV node acquire the UTXO set at a particular > block? > Fullnodes automatically update their UTXO set at each block they accept as > tip. > Reversing the blocks to update the UTXO set at a particular past time would > require a good amount of CPU and memory. > Thus any service that can provide the actual UTXO set at each block would > potentially be attackable by simply requesting enough past blocks. > > > Regards, > ZmnSCPxj _______________________________________________ bitcoin-dev mailing list bitcoin-dev@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev