Looks like I lost some XCH

I had software 1.3.3 and fully synced with 0.004xch in the wallet plus 4 holiday cats.
I stopped wallet, deleted wallet v2 db and started wallet again.
Now after some hours I am synced again and I have 0.02xch plus the 4 cats
So there is synced and there is really synced

1 Like

I observed potentially similar thing. Running 1.3.3 software update on 3 different machines / 2 different accounts, every time the update and then db upgrade was done the immediate status was synced but, as in your case, every time it was missing XCH. However, in my case each time after additional time (~30 mins or so) somehow it went to really synced with all XCH there. There was no need to kill the wallet db.

Although, not sure whether it matters (it should not), but when db upgrade is being done, it implies that the wallet syncs from other peers. However, once the db upgrade is done and bc fully synced, and wallet db is killed, it syncs from the local node. Should be same blockchain, so should not matter, but it kind of correlates with your observation (sure 1 observation is more like luck then correlation).

  • Fixed an issue where some coins would be missing after a full sync

I think they may have fixed my issue in .5

1 Like

About 2 days ago the balance in my wallet dropped from about 2.71 chias to about 2.44 chias.
I have not made any transaction, nor does any transaction appear in my balance. I think these coins disappeared in the last update (1.3.4 to 1.3.5).
my Wallet is 350911217

.3.5 supposedly fixed a missing coin issue.
Maybe you had extra coins showing, not sure if thats possible but cant see why not.

Id check a block exolorer if it were me.

2 Likes

From the explorer I can see that I have mined 2.69 Chias, at least. I have a few more mined chias but from a pool that I don’t remember its payment address. I never sent chias to anyone.

You have maybe spent a few mojos on plot nft’s?

Either way, maybe they didnt fix the issue as well as they thought.

Personally id try deleting your wallet db and letting it resync, not the blockchain db, just the wallet.

2 Likes

in the same way that the coins disappeared, they appeared again, I did nothing.
Thanks for your help :slight_smile:

To be honest that would be an even bigger concern to me, that shouldnt happen!

Welcome.

Edit.
Maybe the fix they implemented takes a long tine to fully rescan the chain, thats all i can think of.

1 Like

Take a look at “How WAL Works” section of sqlite docs: Write-Ahead Logging. Based on that section (“which allows readers to continue operating from the original unaltered database while changes are simultaneously being committed into the WAL”), when there are writes to wallet db, they first land in that wal file, and are waiting for a COMMIT (that looks like sometimes never comes). As long as those changes are sitting there, the reader (UI part of the wallet) is reading only from sqlite file (the main db). They mention in that section that COMMIT needs to be explicitly issued, so maybe it is not triggered (at least when when db is being closed, nor when some time expires).

Also, in my case, the wallet wal file size is about the same as the main sqlite file, so if not flushed, it can hold almost the whole wallet db. The point of that wal file is to speed up operations; however, when wal file size approaches sqlite file size, most likely all potential gains are gone.

I think that this is the problem with the wallet. The wallet syncing process is mostly writing to the wal file, where the UI is reading from sqlite file, thus we see those discrepancies. Also, it looks like that wal file is not committed when chia closes, and this results in the slow real sync of the wallet on some restarts.

With the v1 wallet that had the main sqlite file in GB, there was a need for that wal file as it speeds up writes (commits them in batches). However, v2 wallet is really tiny, and rarely updated, and it is fast (small db), so that wal file is really not needed.

At least, that would be my interpretation of what is happening.

If that is the case, I don’t think that we should suggest removing sqlite db, rather ask folks to remove both wallet wal and shm files, and just restart. Another thing that could be done is to urn vacuum on the wallet, as that process ingests wal file and move it to sqlite file (so all new data is finally committed).

1 Like