langerhans / multidoge

MultiDoge is a desktop Dogecoin client, powered by dogecoinj. Ported from the MultiBit Bitcoin client.
http://multidoge.org
MIT License
257 stars 110 forks source link

Opening wallet triggers resync for ALL wallets #36

Closed bsdhsr closed 3 years ago

bsdhsr commented 9 years ago

I finally managed to get MultiDoge to sync one wallet..

And then I opened the 2nd wallet, to transfer from it to the one that just synced.

Unfortunately, the sync process began once again all the way back from 2013 .........

Does it make sense that the blockchain data can be 'shared' between wallets, such that opening a new wallet doesn't retrigger a sync for all wallets? This seems to be very unoptimal behavior.

Is there a technical reason for it to be so?

Thanks.

langerhans commented 9 years ago

The thing is, how SPV works, it requests the nodes you're syncing from to send you block hashes and then also send you transactions actually relevant to your wallet. It does so by using bloom filters.
Now, since each of your wallets is differet, it can't use the same blockchain data, as it doesn't hold the same amount of data needed in relation to all your wallets.
Now what it shouldn't do is doing a full resync of the wallets. This might be something in relation to the old codebase here. I'm currently waiting for MultiBit HD to come out, so I could actually work on porting that to Doge ;)

ChristophHaag commented 6 years ago

So that's why it currently does a full resync of my main wallet. I just imported the keys from my old android wallet to see whether I still had some doge there (I did not) and now I need to wait at least 1-2 days of resync of my main wallet until I can send doge again? At least the sync status could be held separately for each wallet.

I left it for 8 hours and it synced like 200,000 blocks and still has 1,700,000 to go. With this ridiculous long sync times, maybe it would be better to add functionality to sync via a bootstrap copy of the blockchain so only a few weeks/months must be synced online. I know, that defeats the purpose of a light wallet a bit, but I mainly wanted one for avoiding it continuously eating away at my the free space on my hard disk.