Bitcoin Forum
November 15, 2024, 12:13:29 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SVP wallet fetching most PoW chain  (Read 85 times)
0x_doomday (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 5


View Profile
February 06, 2023, 01:00:15 PM
Merited by BlackHatCoiner (4), ABCbits (1)
 #1

How does lite clients (SVP) can know the most PoW chain in 2 conflicting fork with just knowing the headers of all block ?
DaveF
Legendary
*
Offline Offline

Activity: 3654
Merit: 6671


Crypto Swap Exchange


View Profile WWW
February 06, 2023, 01:25:47 PM
Last edit: February 06, 2023, 02:46:50 PM by DaveF
Merited by LoyceV (4), BlackHatCoiner (4), NeuroticFish (2), vapourminer (1), ABCbits (1), DdmrDdmr (1)
 #2

How does lite clients (SVP) can know the most PoW chain in 2 conflicting fork with just knowing the headers of all block ?

They don't; they rely on the server they are talking to.
The client itself knows it's addresses and a few other things but for everything else it's querying a server that gives it the info it needs / wants.

That is point of a lite client, it needs very little itself to operate, all the heavy data storage work is done elsewhere.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1708
Merit: 8336


Fiatheist


View Profile WWW
February 06, 2023, 05:57:17 PM
 #3

The SPV client doesn't even know if there's a fork. The Bitcoin node won't share the height until there is a reorg in that case. For example, say we're at block 700,000. If two miners mine block 700,001 simultaneously, and create a disruption in the network, SPV servers will not share that particular block header, until the reorg occurs.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3640
Merit: 11033


Crypto Swap Exchange


View Profile
February 07, 2023, 05:04:45 AM
Merited by ABCbits (4), DaveF (2), vapourminer (1)
 #4

How does lite clients (SVP) can know the most PoW chain in 2 conflicting fork with just knowing the headers of all block ?
There are two ways of looking at this. What SPV (short for Simplified Payment Verification) clients do and what they can do.
There are different implementations of SPV protocol, some are very centralized and what we can all "server dependent". These usually work on phones. In this type they heavily depends on what the single centralized server tells them. So they don't really connect to the bitcoin network directly to know much about it and any possible forks.
But there are other implementations that connect to multiple "servers" (that are full nodes with the chain indexed so that it can be searched) like Electrum which performs more verifications on headers they receive hence are capable detecting chain-splits, etc.

Technically when a full node wants to sync with the network they connect to other random full nodes (multiple peers) and after a handshake they send a "locator" in a getheaders message to download their block headers. They receive a reply containing the headers the "locator" was missing ie. any new header that were mined recently.
This is what a SPV client can do too.

Then the full node performs a series of verification on these headers (version, time, PoW using target, verify target itself using difficulty adjustment, etc.) that way they make sure the headers are actually valid (put simply they are mined correctly).
This is what a SPV client can do too.

Finally they check each batch of headers with what they've stored locally so that they can know what headers (and blocks) they are missing, what they already have and if there is any kind of chain-split, stale block, orphan, etc.
This is what a SPV client can do too.

The only thing that the SPV client doesn't do is the full node's next step which is to download the block itself to verify the transactions and update the chainstate (ie. UTXO database). Which has nothing to do with chain-splits, etc.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!