1

I explored SPV clients as a subject from a lot of different resources, but there are a few of things that are keeping me confused:


  1. I found out that SPV clients have no mempool even though SPV clients are participating in transaction verification. So, what happens when the node verifies a transaction? Is a SPV client checking only its own outgoing transactions?
  2. Does a transaction that a SPV client is trying to verify have a block hash as a reference where the transaction came from? Is that how a SPV client knows in which block to search for the target transaction when the SPV asks a full node for part of Merkle tree?
  3. A SPV client asks a full node for hashes inside the Merkle tree, so it can reconstruct the part of the tree it is interested in and checks that way if a transaction is really in the block that the transaction is referring to. Is this correct? And if it is, is there anything more these two clients share?
  4. If I'm on the right path, how do bloom filters help in increasing of level of privacy since SPV clients still needs to ask a full node for a transaction by its hash?

Thank you.

  • You would get better answers to each of your seven question in this post if you hadn't posted all of them in a single topic. I'd like to reiterate that it's perfectly fine to post multiple question posts at once. Doing so would allow people to more thoroughly address each of the questions more in depth, and you may even get multiple answers to some. I was considering to close this as "too broad", but since it has an answer already, I don't feel strongly enough about it. – Murch Jul 13 at 21:01
  • @Murch I considered commenting something like this too, but all the questions really seem to be around clarifying a single concept that OP has a hard time expressing. – Pieter Wuille Jul 13 at 21:07
  • Yeah, but then the title of the topic being "Details of SPV clients" is already a good indicator that the topic is too broad–it's not easy to summarize it in a single phrase. It could have been split for example into "How do SPV clients verify transaction validity?", "How does an SPV client know what block confirmed a transaction?", "How do Merkle branches work?", and "What are the privacy benefits of BIP-37?". The topic is already structured that way anyway! – Murch Jul 13 at 21:16
  • @Murch sorry I wanted to do just what Pieter said, it was all related to one subject. I'm trying to keep in one question as much as I can so I dont spam site with a lot of question. Plus there is a delay of 40minutes in posting the question, right? – ddavi031 Jul 13 at 21:26
  • "so I dont spam site with a lot of question" ⇒ Right, what I'm trying to say is that you should rather "spam the site with multiple questions" than ask everything in one post. :) If you are currently under a delay, I'm fairly certain that such a limit will be lifted once you get a little more rep. The title of a topic is the most important element of a question post: the title and the tags serve other users to quickly assess whether a topic is interesting to them. Something as broad as "Details of SPV clients" does not narrow down the topic sufficiently to inform other users. – Murch Jul 13 at 23:11
4
  1. I found out that SPV has no mempool, but although SPV client is participating in transaction verification. So, what happens when node verifies transaction? Is SPV client checking only owner's outgoing transactions?

That depends on what you mean by "verification". SPV clients cannot and do not verify the validity of transactions themselves; they can only verify that they were included in a block, relying on the assumption that miners would not waste their energy on creating a block with invalid transactions in it.

  1. Transaction that SPV client is trying to verify has block hash as a reference where did a transaction came from? That's how SPV client knows in which block to search for target transaction when SPV asks full node for part of Markle tree. Is this correct?

Transactions do not (and cannot) contain a hash of the block they're contained it; that would be a cyclic dependency. I don't understand the rest of this question.

  1. SPV client asks full node client for hashes inside Merkle Tree, so he can reconstruct the part of the tree of his interest and that way check if transaction is really in the block that transaction is referring to.

When using BIP37, the client sends a Bloom filter of which scripts/addresses/utxos they're interested in, and then requests blocks. The server responds with filtered blocks, containing only the matching transactions, plus efficient Merkle proofs that those transactions are actually in a block with the claimed hash.

  1. If I'm on a right path, how does bloom filters help in increasing of level of privacy since SPV client still needs to ask full node client for a transaction by its hash?

BIP37 bloom filters are primarily a way to improve efficiency - it means that with little bandwidth overhead, the server knows what to not send to the client. It was intended to optionally offer some moderate level of privacy, because a client can choose to send an overly broad filter, resulting in false positives. It has since been discovered that this basically offers no privacy at all, due to correlation the server can still observe between requested things.

| improve this answer | |
  • Thank you for your answer, you got me on the right path of understanding SPV now. – ddavi031 Jul 14 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.