The idea is to enable thin clients to verify finalized checkpoints without downloading the whole chain. Previous discussion. We assume that blocks up to the finalization point are secure enough to base the SPV wallet on.
The way to do this is to add an option to the filterload message that will make the "full" peer match and send transactions that affect the finalization (deposits, votes, slashes and logouts).
The thin client will download all the headers starting from genesis or what it had previously cached. For each block he will get all of his own transactions and the finalization affecting transactions and update the state (set of the validators and votes for current epoch). Confirming that transactions were actually included in the block is already here (merkle tree).
After the initial sync the SPV wallet should keep track of the transactions just as described above. If the wallet notices another fork, it has to validate the finalizations on the new one and choose the main one. The wallet should only include transactions that happened before the most recent finalization.
To ensure this will be enough I will add a functional test imitating the behaviour of a SPV wallet.
The idea is to enable thin clients to verify finalized checkpoints without downloading the whole chain. Previous discussion. We assume that blocks up to the finalization point are secure enough to base the SPV wallet on.
The way to do this is to add an option to the filterload message that will make the "full" peer match and send transactions that affect the finalization (deposits, votes, slashes and logouts). The thin client will download all the headers starting from genesis or what it had previously cached. For each block he will get all of his own transactions and the finalization affecting transactions and update the state (set of the validators and votes for current epoch). Confirming that transactions were actually included in the block is already here (merkle tree).
After the initial sync the SPV wallet should keep track of the transactions just as described above. If the wallet notices another fork, it has to validate the finalizations on the new one and choose the main one. The wallet should only include transactions that happened before the most recent finalization.
To ensure this will be enough I will add a functional test imitating the behaviour of a SPV wallet.