2

I've learned that "some SPV clients simply don’t check signatures themselves at all": https://bitcoincore.org/en/2016/01/26/segwit-benefits/#efficiency-gains-when-not-verifying-signatures

I wonder if popular lightweight wallets (like Electrum) nowadays do signature checks? If not, why?

2 Answers 2

1

Some lightweight wallets do not check the signatures because checking the signature requires data from the previous transaction. However lightweight wallets generally will not have the previous transaction to fetch the data from and are thus unable to verify the signatures.

9
  • Incorrect, lightweight wallets most certainly have enough data to verify signatures via merkle root. How well they do it is another story, but it's is not unable.
    – arshbot
    Aug 17, 2018 at 19:50
  • 2
    Merkle roots are completely unrelated to signatures. The merkle root is about the block, not about signatures.
    – Andrew Chow
    Aug 17, 2018 at 19:52
  • 1
    Interesting, I assumed because the merkle root was reliant on the transaction hash it thus had some data of the signature in it - but according to the whitepaper: "He can't check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it." Which means it's really just relying on the network, not doing proper validation itself. I stand corrected
    – arshbot
    Aug 17, 2018 at 19:55
  • Lightweight wallets know each input of a transaction, thus they should be able to fetch every previous transaction, up to the coinbase transaction. I've also learned that Satoshi once said: "The recipient just needs to verify it back to a depth that is sufficiently far back in the block chain, which will often only require a depth of 2 transactions. All transactions before that can be discarded."
    – Chris Chen
    Dec 12, 2018 at 22:38
  • 1
    Yes, validating signatures does improve security. Being able to validate signatures means that you can partially check if a transaction is valid. This means that you are less likely to accept invalid transactions. However, signature validation is not the only thing for checking if a transaction is valid. You also need to check that the transaction spends coins that exist, and you can't really do that without validating the entire blockchain.
    – Andrew Chow
    Jan 14, 2019 at 15:00
0

Most lightweight clients do not validate signatures in Bitcoin. While Simplified Payment Verification (SPV) was introduced in the bitcoin whitepaper as a method of verifying payments without the whole blockchain

re:

It is possible to verify payments without running a full network node

SPV has found most of it's usage on wallets that are unable to allocate the resources for a full validating node. The popular example belongs to the mobile wallet.

I wonder if popular lightweight wallets (like Electrum) nowadays do signature checks? If not, why?

Electrum isn't a standard lightweight wallet. Typical lightweight wallets connect via the bitcoin protocol directly to bitcoin seed servers and communicate directly with bitcoin servers.

Electrum does not do this. Electrum lightweight clients connect to Electrum servers, therefor it doesn't make sense for Electrum lightweight clients to take the burden on validation (when at best they could do a sub par job as SPV isn't perfect and results in plenty of false positives)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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