Sia-UI icon indicating copy to clipboard operation
Sia-UI copied to clipboard

Coins not showing in wallet

Open PhABC opened this issue 7 years ago • 76 comments

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

  1. The coins were sent at my third address.

  2. The blockchain is synced : consensus

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

  1. 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

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

Sia Client v1.2.1 Sia Daemon v1.2.1

  1. 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.

PhABC avatar May 07 '17 07:05 PhABC

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

lle-bout avatar May 07 '17 07:05 lle-bout

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

PhABC avatar May 07 '17 07:05 PhABC

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

lle-bout avatar May 07 '17 07:05 lle-bout

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.

PhABC avatar May 07 '17 21:05 PhABC

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.

lukechampine avatar May 07 '17 22:05 lukechampine

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.

PhABC avatar May 07 '17 22:05 PhABC

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.

lukechampine avatar May 07 '17 22:05 lukechampine

This is the actual wallet.log file.

PhABC avatar May 07 '17 22:05 PhABC

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.

lukechampine avatar May 08 '17 00:05 lukechampine

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

PhABC avatar May 08 '17 21:05 PhABC

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.

lukechampine avatar May 08 '17 21:05 lukechampine

Error ;

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

PhABC avatar May 08 '17 22:05 PhABC

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

lukechampine avatar May 08 '17 22:05 lukechampine

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

PhABC avatar May 08 '17 22:05 PhABC

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.

lukechampine avatar May 08 '17 22:05 lukechampine

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

PhABC avatar May 09 '17 02:05 PhABC

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)

lukechampine avatar May 09 '17 06:05 lukechampine

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

PhABC avatar May 09 '17 15:05 PhABC

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.

DavidVorick avatar May 09 '17 15:05 DavidVorick

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.

lukechampine avatar May 09 '17 15:05 lukechampine

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.

PhABC avatar May 10 '17 14:05 PhABC

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.

DavidVorick avatar May 11 '17 00:05 DavidVorick

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.

trolololomg avatar May 11 '17 13:05 trolololomg

@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.

tostyp avatar May 17 '17 18:05 tostyp

@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,

BuvSethia avatar May 18 '17 05:05 BuvSethia

@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 :)

PhABC avatar May 18 '17 11:05 PhABC

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.

BuvSethia avatar May 18 '17 18:05 BuvSethia

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

avidenic avatar May 20 '17 19:05 avidenic

I had the same problem and solved using that tool.

pdroalves avatar May 22 '17 22:05 pdroalves

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?

elektokat avatar Jun 09 '17 11:06 elektokat