Simplified Payment Verification

Revision as of 14:46, 20 January 2020 by Wei (talk | contribs)

Simplified Payment Verification (SPV) is described in section 8 of the Bitcoin whitepaper. It allows a user to prove or verify that a transaction is in the chain without downloading the full chain.

To provide a proof, a user simply download the block headers and the Merkle paths of interested transactions. By showing the Merkle path of a transaction, and its corresponding Merkle root in the block header, it confirms that the transaction is in the chain at that block height.

To validate a such proof, a user only needs to download the block headers. By computing the hash of the transaction and the Merkle root, the user can compare it with the Merkle root in the block header. If it matches, then the validation is successful.

As block headers are of constant size of 80 bytes, the size of the data grows linearly, and is independent of the size of the blocks. The size of a Merkle path is of maximum bytes, where is the total number of transaction in one block.

Longest proof of work chain

SPV Wallet

SPV wallet is a lightweight wallet that uses the mechanism of SPV to construct bitcoin transactions and payments.

To spend a UTXO, a user of a SPV wallet will pass on the following information to the receiver:

  1. - the transaction that contains the UTXO as an output,
  2. The Merkle path of
  3. The block header that contains the Merkle root derived from the Merkle path (or its identifier, e.g., block height)
  4. - the transaction that spends the UTXO