A part I do not get about SPV

0

SPV (lightweight) users do not have a chain. (Well, some SPV users have a fraction of the full chain, but some SPV users only have block headers. Am I correct?)

If a block is created by a miner and a SPV user recieves this block, he must append this block the existing block chain, but this SPV user does not have the blockchain in this case, so what does SPV user do with a block when he recieves this?

Just attach its block header to what the SPV user has at that time?

Rubertos

Posted 2018-01-14T12:19:42.237

Reputation: 187

Answers

0

SVP can be well understood if you look at the purpose of having SVP. SVP is created for fast verification embedding of a transaction in the blockchain. This is useful when a user is only interested in knowing whether a transaction related to him/her is embedded in the blockchain and how much computation power the community has spent after it.

Each block in blockchain is of 1MByte size whereas the block header size is only 80bytes. The total size occupied by all the block header till date will few MBytes which can be easily stored on a mobile device.

In a block, the transactions are grouped in Merkle tree, where the existence of a transaction can be verified in O(log n) time if the path to the transaction is known. So whenever an SVP is interested in knowing the existence of a txn it can download the corresponding block form a full node and then check it.

Now coming to your question

Well, some SPV users have a fraction of the full chain, but some SPV users only have block headers

It depends on whether an SVP has requested for the updated block header from a full node or not.

what does SPV user do with a block when he receives this?

Ideally, it should propagate the block to nodes it is connected to but an SVP can just decide to drop it and do nothing.

Just attach its block header to what the SPV user has at that time?

It can't be done as the block header of the previous block will not match

sourav

Posted 2018-01-14T12:19:42.237

Reputation: 128

Actually, a block can be larger than 1MB since BIP141. https://bitcoin.stackexchange.com/questions/69468/what-is-the-current-maximum-bitcoin-block-size-in-mb

Willtech 2018-02-14T10:40:29.947