比特币 SPV 客户端如何知道它没有错过来自全节点的块?

How does a bitcoin SPV client knows it didn't miss a block from a full node?

比特币 SPV(简化支付验证)客户端不必信任任何完整节点。它向全节点提交布隆过滤器,以仅处理所有块的一小部分。

但是,如果一个 SPV 客户端连接到一个恶意的全节点,而这个恶意的全节点打算不向这个 SPV 客户端发送一个块,而这个块实际上包含一个这个 SPV 客户端感兴趣的交易。

SPV 客户端如何保护自己不会错过来自全节点的钱包地址的任何交易?

SPV 节点连接到多个半信任节点以防止这种攻击。只有单个节点需要诚实

First, while the SPV client can not be easily fooled into thinking a transaction is in a block when it is not, the reverse is not true. A full node can simply lie by omission, leading an SPV client to believe a transaction has not occurred. This can be considered a form of Denial of Service. One mitigation strategy is to connect to a number of full nodes, and send the requests to each node. However this can be defeated by network partitioning or Sybil attacks, since identities are essentially free, and can be bandwidth intensive. Care must be taken to ensure the client is not cut off from honest nodes.

来自https://bitcoin.org/en/operating-modes-guide#potential-spv-weaknesses