NebulousLabs / Sia-UI

A Graphical Frontend for Sia - https://sia.tech
MIT License
389 stars 119 forks source link

Coins not showing in wallet #581

Open PhABC opened 7 years ago

PhABC commented 7 years ago

Problem

I purchased my first siacoins via Shapeshift.io and I transferred them to the first address generated with my seed, but I don't see them in my wallet.

Information

  1. My wallets are : wallet addresses

    3221da3292ef7e7a395b8f4ae1cf334ded99ac142bbea49679c19c5c3e64f1c4b48312411bb4 5a56b777f8ccf730b62ad959292f178b90dd2b19df1c76f7487c658368f02332853c0523ff9f ef62e8fcf59241f8f7a0c508932f685745c337702532e69528aa4b863642358d531b085306ac

  2. The coins were sent at my third address.

  3. The blockchain is synced : consensus

    Synced: Yes Block: 00000000000000b22c0b85c2706da2ef28c93a828b493c17889d755489e7d2cd Height: 103580 ...

  4. Wallet balance is zero: wallet balance

    Wallet status: Encrypted, Unlocked Confirmed Balance: 0 H Unconfirmed Delta: +0 H Exact: 0 H Siafunds: 0 SF Siafund Claims: 0 H

  5. I am using Windows 10 with sia versions : version

    Sia Client v1.2.1 Sia Daemon v1.2.1

  6. I tried restarting Sia, but no luck. Note that everytime I restart Sia-UI, it says Synchronizing 99.8% and then gets synced after about a minute. Everytime. This might be related, but seems also to be a glitch. I restart faster than a new block can be found.

It also seems like I am not the only user running into this problem.

famadorian 8 days ago I transferred siacoins from poloniex like a week ago and it has not yet appeared in my mike wallet. It says it's synchronized and it's all green clean machine.

ameri-size 10 months ago I have loaded a wallet from a seed key to my current machine. The address has loaded and is listed when I enter siac wallet addresses. However, when I enter siac wallet balance it still shows a 0 balance. On the Sia Explorer it shows the proper balance, so I'm not worried about them missing. I'm just wondering if there is something else I should be doing to display the balance. As of right now, the block height shows synced and the current height is 55711.

lle-bout commented 7 years ago

Hi,

Please backup your seed, and re-install Sia, then load your seed in this new install, then restart Sia. You should now be able to see your balance. To speed up syncing in the new install, you can also backup the consensus.db file, in the consensus folder at the root folder of the install. You can also backup the transactionpool.db in the transactionpool folder to speed up consensus loading process in the new install.

If it still does not work and you really received funds, it confirms that it is indeed a bug. You can check this with http://explore.sia.tech

Regards

PhABC commented 7 years ago

Will re-install now, but as mentioned in 2. I did receive the funds according to the blockchain explorer.

lle-bout commented 7 years ago

Did you load your current wallet from a seed? Please describe the steps involved in setting up your bogus install.

PhABC commented 7 years ago

Steps taken for reinstall

  1. Delete Sia-UI folder in ~/Appdata/Roaming/ folder (with consensus.db and transactionpool.db backed up)
  2. Re-Download https://github.com/NebulousLabs/Sia-UI/releases/download/v1.2.1/Sia-UI-v1.2.1-win32-x64.zip
  3. Run Sia-UI.exe
  4. Shutdown Sia
  5. Copy backed-up consensus.db and transactionpool.db in respective folders
  6. Run Sia-UI.exe again (took a while to launch this time.)
  7. Load seed, copy seed and password, unlock wallet.
  8. Restart Sia after unlocked.
  9. Wait for syncing (always at 99.8% synced when opening).
  10. Unlock wallet.
  11. wallet balance

Wallet status: Encrypted, Unlocked Confirmed Balance: 0 H Unconfirmed Delta: +0 H Exact: 0 H Siafunds: 0 SF Siafund Claims: 0 H

Hence seems to be unresolved by the proposed method above.

lukechampine commented 7 years ago

Thanks for the detailed issue. Can you check your wallet.log for errors? You can view the log by pressing Ctrl+Shift+L and viewing the wallet tab.

PhABC commented 7 years ago

Doesn't seem to have any issue. Time doesn't look like mine however.

2017/05/07 07:56:04.248189 persist.go:92: STARTUP: Logging has started. 2017/05/07 08:06:32.685066 persist.go:92: STARTUP: Logging has started. 2017/05/07 15:44:56.620267 wallet.go:158: SHUTDOWN: Logging has terminated. 2017/05/07 15:45:38.478031 persist.go:92: STARTUP: Logging has started. 2017/05/07 15:48:16.354419 encrypt.go:426: INFO: Unlocking wallet. 2017/05/07 15:48:24.130308 encrypt.go:426: INFO: Unlocking wallet. 2017/05/07 19:33:04.811649 persist.go:92: STARTUP: Logging has started. 2017/05/07 19:35:12.198079 encrypt.go:426: INFO: Unlocking wallet. 2017/05/07 21:25:45.607048 encrypt.go:403: INFO: Locking wallet. 2017/05/07 21:25:45.607510 wallet.go:158: SHUTDOWN: Logging has terminated. 2017/05/07 21:26:11.332097 persist.go:92: STARTUP: Logging has started. 2017/05/07 21:28:24.700083 encrypt.go:426: INFO: Unlocking wallet. 2017/05/07 21:30:54.331547 encrypt.go:403: INFO: Locking wallet. 2017/05/07 21:30:54.331547 wallet.go:158: SHUTDOWN: Logging has terminated.

lukechampine commented 7 years ago

The times are UTC. There should be an entry for when you loaded the seed that shows the highest index it located in the blockchain. Is this the full log? It will also be on disk in the Sia folder under wallet/wallet.log.

PhABC commented 7 years ago

This is the actual wallet.log file.

lukechampine commented 7 years ago

Apologies for the inconvenience. Multiple other users are reporting the same issue, so I have created a tool called recover for manually determining and setting the seed progress. From the usage:

Run recover in your Sia directory with one of the following arguments:

    scan           Scan consensus/consensus.db for outputs generated from your seed
    set [index]    Overwrite the seed progress value of your wallet
    find [addr]    Scan consensus/consensus.db for uses of an address

First run 'scan' to determine the largest seed index present in the
blockchain. Your blockchain must be synced, and siad must be stopped.

Then, run 'set' using the index provided by 'scan'. This will overwrite the
existing value in your wallet. As a safeguard, 'set' will only run if the
wallet's primary seed matches the seed you provide.

Download link (Windows, OS X, Linux)

Source code

Again, I apologize for the trouble. I'll try to track down the root cause and have this fixed in the next release. In the meantime, the tool above should restore your correct balance.

PhABC commented 7 years ago

Thank you @lukechampine .

Two things ;

  1. Why does this require root access? Not that I don't trust you, but I don't know Go well and I don't want to leak something :).
  2. I get the following error:

    $ recover scan The type of the file system is NTFS. Press ENTER to begin recovery of the file on drive C: Cannot lock the drive. The volume is still in use.

Steps taken to reproduce error:

  1. Download recover-windows.exe
  2. Run recover-windows.exe
  3. Shutdown sia
  4. Go to /Users/AppData/Roaming/Sia-UI/sia folder in terminal
  5. Run recover scan
  6. Press Enter
  7. Error
lukechampine commented 7 years ago

Sorry, apparently recover was a bad choice for a name. It seems that recover is a built-in operation on Windows. You should instead run recover-windows.exe scan and recover-windows.exe set accordingly.

PhABC commented 7 years ago

Error ;

$ recover-windows.exe scan Seed: The handle is invalid.

lukechampine commented 7 years ago

Did you enter your seed and press enter before seeing that message?

PhABC commented 7 years ago

I was running this command with git bash on windows, which doesn't work. When running it via command line and at the seed prompt, I try to copy/type my seed but no success. When typing, I don't see any character. Tried to press enter both after pasting and type and I get the following message :

word not found in dictionary for given language

lukechampine commented 7 years ago

It intentionally hides the seed for privacy reasons. Here is a version that does not hide the seed. The seed should look like word1 word2 word3 etc. when pasted in, i.e. no " or trailing spaces.

PhABC commented 7 years ago

recover-windows.exe scan doesn't seem to find anything:

Scanning blockchain... Scanned to height 103831 (largest index seen: 0) Finished scanning. Largest index found: 0 Suggested seed progress: 1

lukechampine commented 7 years ago

I have high confidence in the ability of the scanner to find all outputs, and there's no chance you entered the seed incorrectly (since they have a checksum), so the address you sent the coins to must belong to a different seed. Here is another helper program that will confirm whether an address belongs to a given seed. (Source code)

PhABC commented 7 years ago

Does this address contains any Siacoin? Perhaps I am not interpreting correctly the explorer output.

ef62e8fcf59241f8f7a0c508932f685745c337702532e69528aa4b863642358d531b085306ac

This is one of the addresses coming out of the wallet addresses command.

For the new helper program, I ran the following code:

checkaddr.exe ef62e8fcf59241f8f7a0c508932f685745c337702532e69528aa4b863642358d531b085306ac
seed: ...

Generating keys...
ef62e8fcf59241f8f7a0c508932f685745c337702532e69528aa4b863642358d531b085306ac
Found address at seed index 0
DavidVorick commented 7 years ago

The explorer indicates that there are about 43k siacoins in that address. They have not been spent, so assuming that the wallet code is not buggy, any wallet with that address listed in wallet addresses should also show a balance of at least 43k siacoins.

lukechampine commented 7 years ago

Ah. Perhaps index 0 was the only seed address used? I seem to recall that this was also true for another user. Maybe the bug only occurs when index 0 is the only index used.

Try running recover-windows.exe set 1 and unlocking the wallet.

PhABC commented 7 years ago

Worked! Took a full day to unlock, but the transaction and coins are there. Also, I should not that while the money was transferring I clicked on "Receive token". So perhaps the address change before the tokens were sent was part of the problem? Just thought I would let you know and might be worth trying see if it is a problem.

DavidVorick commented 7 years ago

The problem appears to be that the wallet is not correctly recognizing when it is doing a load/scan. We've got a pull request that should fix this.

trolololomg commented 7 years ago

hi SiaCoin will never be popular if we have to scan/recover/reinstall/redownload and so on.....SiaCoin is in its baby-stage...problems like this should be fixed ASAP !! I also get 0 ballance..quite frustrating.

tostyp commented 7 years ago

@lukechampine @DavidVorick Can you help me receive my coins , I made a transaction of 344,000 sia coins yesterday and I still have yet to receive them, thanks in advance :)!

I think i have to recover them please help.

BuvSethia commented 7 years ago

@PhABC Quick question. When you say it took a full day for your wallet to unlock, do you mean that it was stuck on that screen that says "Unlocking your wallet" for a whole day after running recover-windows set 1? I'm in the same situation right now and I'm not sure if the wallet unlock process has just stopped/frozen or if it's doing something in the background still to unlock it,

PhABC commented 7 years ago

@BuvSethia Yes, it does look stuck. One way to monitor the progress is to look at the RAM usage by Sia... you should see that it steadily increases overtime as your wallet is being unlocked. Slow, but it will work out :)

BuvSethia commented 7 years ago

Thanks @PhABC. Apparently Windows decided it wanted to auto-update last night so it's back to square one for me, waiting wise...thought I turned it off. I'll keep waiting though and hopefully everything will be there once it's done.

avidenic commented 7 years ago

Hey, is this change going to be released in June? I also cannot see any funds/transactions in wallet.

pdroalves commented 7 years ago

I had the same problem and solved using that tool.

elektokat commented 7 years ago

I also have this problem. But when I try to start the recover.exe it just starts and then shut down immediately?

When I open the Sia Wallet I can see the transaction as confirmed, but the Confirmed balance is 0. I currently have the rest of my Sia on an exchange. If I do send the rest to the wallet, can I be sure I actually have it there if I see the transaction being confirmed in the wallet, even if the confirmed balance is not updated? In other words, would be Sia be safe in my wallet, even if I can't see the balance?

avahowell commented 7 years ago

how much is the transaction? The wallet currently rounds decimal values down to zero, so if you have <1SC it will show as zero

elektokat commented 7 years ago

The transaction was for 11 Sia coins from Poloniex. The fee is 10 though so it was 1 Sia coin that was confirmed in the wallet. Still show up as 0 in the balance though. Btw I read something really worrying in the Sia forum about people who lost coins from the Sia wallet, I would like to see someone at Sia comment on this also: https://forum.sia.tech/topic/1252/sia-gui-1-2-2-who-emptied-my-wallet/7

hudene5790 commented 7 years ago

First off, thank you so much for posting this. It gives a little hope in finding my coins. I transferred a little less than 19k from Poloniex so i'm a bit worried.

When running recover-windows.exe scan, i get

bolt.Close(): funlock error: The segment is already unlocked. error opening consensus database: timeout

I've tried to lock and unlock my wallet via the UI and the screen always remains like this after i enter my password:

image

lukechampine commented 7 years ago

Sia needs to be fully shutdown before running the recovery tool. Check your Task Manager to make sure it is no longer running.

hudene5790 commented 7 years ago

i just noticed another post saying that! Now I'm just waiting for it to finish scanning. Thank you so much @lukechampine , your responses have been so helpful

elektokat commented 7 years ago

@lukechampine Sia is fully closed down. The recovery program just starts for half a second then closes again.

elektokat commented 7 years ago

I do not feel fully confident in this wallet after reading this though: https://forum.sia.tech/topic/1252/sia-gui-1-2-2-who-emptied-my-wallet/9

Is there any alternative way to store? A paper wallet?

PhABC commented 7 years ago

You can always save the seed yes, that should be sufficient to recover your accounts in other hypothetical Sia wallets.

hudene5790 commented 7 years ago

@PhABC @lukechampine How do you save the seed? Also, It's been 24 hours since I've ran the scan, should it take this long? =o

PhABC commented 7 years ago

It's pretty long, so don't panic yet. Well, you were given your seed when you created your wallet no? Should be a list of words. Just copy and paste it somewhere!

hudene5790 commented 7 years ago

@PhABC ignore me, that was a very dumb question lmao

hudene5790 commented 7 years ago

I still don't see my coins =(. I loaded the Siad.exe then Sia UI after I set recover-windows.exe to 1 (show below are my results)

recover-windows.exe set 1 Rewrote seed progress from 6 -> 1 The next time you unlock the wallet, it will need to do a full rescan.

hudene5790 commented 7 years ago

well. that was strange, after i pasted my seed and ran the scan, the file that contained my seed was mysteriously deleted. now i'm sh** out of luck... i have a back up of my wallet and now no seed -_- OH MY GOD.

dhdenny commented 7 years ago

Just chiming in with a similar issue on Linux (Ubuntu 16.04). Transaction completed (nanopool payout) but local wallet doesn't see it despite being synced for well over 24 hours now. Also for those of you that have the horsepower, I recommend keeping a clean virtual machine for running wallet apps given all the malware and crap floating around these days. Backup your keys/seeds to a usb stick just in case.

hudene5790 commented 7 years ago

@dhdenny yep. i usually back up my stuff, but didn't when i created my siacoin wallet due to all of the chaos of trying to get my coins to even show up... now there's no point if I don't have my seed... ugh.

lukechampine commented 7 years ago

Sorry to hear that @hudene5790. If the wallet is still running and unlocked, you can view your seed with siac wallet seeds. This could also save you if you know your password, but not your seed.

@dhdenny is the transaction present on the explorer?

pdroalves commented 7 years ago

After a long time without problems, this morning I had transfered some siacoins to my wallet and couldn't see them in the balance or log. (txid: 214aaf8fb6126cf3c916fc2f15c1af16168f044e8317bacf876825af99623f9).

I tried running recover-linux and got this:

➜  Sia ./recover-linux scan
Seed: XXX
Generating keys... Finished in 5.27 seconds.
Scanning blockchain...
Scanned to height 45064 (largest index seen: 0)
Finished scanning. Largest index found: 0
Suggested seed progress: 1
➜  Sia ./recover-linux set 1
could not decode type uint64: EOF

My coins still not appear in the balance.

➜  Sia ./siac version
Sia Client v1.2.2
Sia Daemon v1.2.2
lukechampine commented 7 years ago

Your blockchain is not synced: it only contains up to block 45064. Try again after siac prints Synced: Yes

pdroalves commented 7 years ago

@lukechampine

➜ Sia ./siac Synced: Yes Block: 0000000000000073b6da8de0defd9dd077b133e80b39dc07d251b567f8626057 Height: 109597 Target: [0 0 0 0 0 0 0 150 21 23 58 40 225 252 202 215 71 31 191 101 145 38 212 168 153 88 210 192 210 235 131 105] Difficulty: 122910786575750450 ➜ Sia ./siac wallet Wallet status: Encrypted, Unlocked Confirmed Balance: 0 H Unconfirmed Delta: +0 H Exact: 0 H Siafunds: 0 SF Siafund Claims: 0 H

hudene5790 commented 7 years ago

@lukechampine The seed and password are the same for SIA UI =( I just have a backup of my wallet... trying to recover my seed file via Recuva... what a mess!