BirthdayResearch / defichain-app

DeFi Blockchain desktop app for Windows, Linux and Mac.
https://defichain.com
MIT License
157 stars 57 forks source link

Restore: choose a recent backup > bal 0 #662

Closed RobinTorque closed 3 years ago

RobinTorque commented 3 years ago

All attempts on the test net:

I installed version 2.3.0 on a new device. After that I clicked receive, sent me some DFI and left the wallet again. When I left, I did not create a backup, because backups are only necessary for emergencies, but not for everyday use.

Then I tried to open the app again.

Bildschirmfoto 2021-03-16 um 18 21 48

The wallet was opened, but the account balance was 0.

I did this test 3 times. 3 times the same result. The default Wallet.dat does not store private keys.

Bildschirmfoto 2021-03-16 um 18 26 00

Then I changed the test. I have saved the backup. After that I could choose between the backup and the default file when restoring. The backup contains the coins, the default wallet does not.

Why does the standard wallet not store private keys?

defichain-bot commented 3 years ago

@RobinTorque: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

In the meantime, you can:

  1. Checkout DeFiChain’s Github issue page to see if your issue has already been reported
  2. Submit any logs if you have them, this will greatly expedite the process for us.
  3. You can also join our Telegram or Reddit community channels.
Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/app/blob/master/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
izzycsy commented 3 years ago

Hi @RobinTorque , thanks for your feedback, please give us time to investigate this.

izzycsy commented 3 years ago

/triage accepted

RobinTorque commented 3 years ago

The problem was fixed with version V2.3.2. @izzycsy The issue can be closed from my point of view.

izzycsy commented 3 years ago

Thanks @RobinTorque

thedoublejay commented 3 years ago

I'll re-open this for v2.3.2 @RobinTorque. It will not be included on this version. Unfortunately the issue requires a different fix as it causes other major issues.

Currently, what happens is:

  1. By default, the node creates wallet.dat. Initially it's empty.
  2. If you don't have any wallet or walletdir files, the node uses this file as the default wallet.

The issue occurs because we delete the default wallet.dat. We backup them every time we delete it (e.g, wallet-bak-dateofbackup.dat) on the default wallet directory so funds are safe. My initial fix caused some regressions that I had to rollback. I will do a proper fix for this on the next release.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.