hhanh00 / zwallet

Zcash and Ycash light shielded wallet

Home Page:https://ywallet.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The each account should maintain own rescan state

skironDotNet opened this issue · comments

Current behavior is horrible, I had an account that required scanning whole night, today I added an account that was ok to start to scan from today, switching back to old account in hope to send from it to new account, and boom! all balances gone, why? because when set other account to scan from today it affected other accounts, that make no sense! Different accounts will have different "birthday" block number, and if you chose to affect all by most recent the wallet is close to unusable in the the terms of speed.

It's ok (maybe, depending on how scanning work) to re-scan all younger accounts when added older account, but killing state of older account when adding a younger account?

Tap on Rescan should mean, re-scan only selected wallet from it's initialization height. Would be nice to be able to adjust initialization height for a wallet, for example you restore from seed, select today because you want to obtain your address fast, maybe don't remember of birthday height or date. The next day you want to actually see all the transaction so you select "change birthday" (whatever to call it) popup same selector window (date or height) and re-scan from that new point but only for currently selected account.

Synchronization updates every wallet at once with a single pass (and download of compact blocks).
If you have several wallets you want to restore, import them all without rescan.
Then manually trigger rescan at the end.
All the accounts will be updated.

you don't understand. I'm amazed you were able to code such a great tool for many platforms but at the same time it seems like it's missing real think thru and real life use case.
Let me give you one more explanation based on your response.

If you have several wallets you want to restore, import them all without rescan.

makes sense

Then manually trigger rescan at the end.

ok

All the accounts will be updated.

cool,
now read my first post :P just kidding

So now you are in a state of having let say 4 wallets. One of them is from 2019 call it R. All nicely synchronized, and R has some incoming funds from 2020 because you were using it as cold storage, wherever the reason.
Now you "accidentally" found 5th seed but you know it's from 01/2023, you add 5th account call it N, scan is "ok fast" and you had in mind that you'll shift the funds from R to N so you switch the wallet from N that just finished scanning and choose R and here we go! The funds are 0, you can't send them. Why? Because as you imported 5th the N and choose restore date 01/2023

All the accounts will be updated.

and now the R is re-scanned from 01/2023 and shows 0

Maybe that's not exact scenario maybe you hit "rescan" on N (maybe even accidentally) and then the above happens, but the point is, it's buggy behavior.