Author

Topic: Simple Payment Verfication (SPV) (Read 173 times)

legendary
Activity: 3472
Merit: 10611
March 17, 2020, 10:33:05 AM
#3
well the "condition" is to take 2016 blocks then calculate the time it took to mine them using the 4 byte time variable that is already in the block header and then readjust the difficulty based on that (increase if it took less than 14 days, otherwise decrease). since a full node also does that check using the headers a light node could also perform the same check. however, i don't know whether Electum does this check or not.
Tym
newbie
Activity: 15
Merit: 14
March 17, 2020, 05:35:23 AM
#2
What I just found is the following:

Quote
Electrum fetches blockchain information from Electrum servers, bitcoin nodes that index the blockchain by address. Electrum performs Simple Payment Verification to check the transactions returned by servers. For this, it fetches blokchain headers from about 10 random servers. In addition, Electrum servers are authenticated by SSL, in order to protect users from MITM attacks.
(Source: https://en.bitcoin.it/wiki/Thin_Client_Security)

To improve my question from above: How is the Client able to verify the correctness of these blocks?
Tym
newbie
Activity: 15
Merit: 14
March 17, 2020, 03:57:18 AM
#1
Hello there,

according to the documentation an Electrum wallet is able to verify transactions by its own using the SPV technique. https://electrum.readthedocs.io/en/latest/spv.html#spv

SPV makes it pretty easy for my wallet to make sure that my transaction is included in the Bitcoin blockchain. That's because my wallet knows all block headers of the entire chain (right?).

My Question: Is there a way for my wallet to verify that a block (header) is part of the Bitcoin blockchain. If so, how does it work?

My thoughts: If I want to verify a block I need to check if the hash fulfillfs the conditions of the target. To check that I need to know the correct target. Is there any way to proof (or to be very sure) that a target is correct (e.g. taking a look at blocks in the past, ...)

My aim: I want to proof that a target is correct at any time for one of my projects (kind of a SPV-Client). I was trying to find some approaches in the documentation of electrum (how they do it). But I didn't.


I'd love to read your answers. :-) Many thanks to everyone reading my question.
Tym




Jump to: