kyokan / bob-wallet

Bob Wallet is a GUI for DNS Record Management and Name Auctions on Handshake. It includes an integrated full node: hsd
https://www.bobwallet.io/
GNU General Public License v3.0
381 stars 91 forks source link

Wallet not recoverable with all transactions present #617

Closed Xarbiok closed 1 year ago

Xarbiok commented 1 year ago

Hello,

A few days ago, the power went out and immediately after opening BOBWallet it showed the error: No newline at end of file related to the "CURRENT" file in the hsd_data\wallet folder In fact this Current file, opening it with Notepad++, no longer showed the name of the Manifest but only "NUL NUL NUL NUL...." Tried to modify it with NOTEPAD++ adding Manifest name and newline, but nothing, it gave an error of incorrect format of Manifest, so I proceeded with other attempts.

What is the problem? The Wallet shows now all transactions correct, no transactions are missing and they all seem confirmed, non-transparent, the spendable HNS value seems correct, but: Locked: show no data only "No locked HNS" Domain Manager: All won domains that were to be registered soon are gone Your Bids: empty when I had different offers made, therefore impossible to "reveal"

The transactions on the offers seem correct, but as if BOBWallet can't recognize that they are from my Wallet but from another HNS address, in fact there is the wallet address of the offer, but it doesn't say "You".

Almost all attempts made: I state that I have no experience in programming languages 1) backed up entire folders in BOB's Roaming, rescan/reset on the original PC 2) imported the wallet on a new PC and then inserted all the backup files except the files of hsd_data\wallet which does not work the file Current 3) last attempt i'm making now is FULL NODE on the original pc, but it will take a long time

Questions: 1) Which files contain all the data of the offers made and domains in my possession to register/register? The files in the "Tree" or "db" folder or something else? 2) Is there a way to recover domains I own that are yet to be registered or are lost, and deals done since I have the entire BOB folder backed up? 3) The File "MANIFEST-...." changes each time it is opened, putting the backup files, they are probably deleted every time because they are not related to the correct Manifest. Is it possible with NOTEPAD++ to put a single .ldb file even if it obviously exceeds 2MB in weight?

Thanks for the support.

rithvikvibhu commented 1 year ago

power went out

Sudden forced shutdowns can corrupt databases and unfortunately, the only "solution" is to remove it and start again. In this case, it's the wallet db that's affected, so it's fine to keep all the blockchain data and only delete (or rename as a backup) the wallet folder. Starting Bob after this and re-importing the wallets should be enough.

  1. Which files contain all the data of the offers made and domains in my possession to register/register? The files in the "Tree" or "db" folder or something else?

The wallet folder in Bob's directory. Which is (by default, unless a custom location is set):

  1. Is there a way to recover domains I own that are yet to be registered or are lost, and deals done since I have the entire BOB folder backed up?

If you have the seed phrase, simply importing (and waitng for the rescan to complete) will get all domains and $hns to show up.

  1. The File "MANIFEST-...." changes each time it is opened, putting the backup files, they are probably deleted every time because they are not related to the correct Manifest. Is it possible with NOTEPAD++ to put a single .ldb file even if it obviously exceeds 2MB in weight?

Editing database files will almost certainly corrupt it as they are binary files not meant to be opened by text editors.

Hope you get the wallet running again. If there's any issue, feel free to ask on Telegram or Discord (links at https://bobwallet.io)

Xarbiok commented 1 year ago

@rithvikvibhu

Thanks for this information and support.

In the future I have to set continuous backup on the "Wallet" folder, the other folders I think are not so fundamental as to compromise the loss of offers and domains not yet registered, but already Revealed. Or in order not to lose the offers data, even after a full sync/rescan, is it necessary to make backups of other things as well?

So, if any problem happens to the files in the "Wallet" folder, even the domains that have already been "Revealed" but not yet "Registred" are lost?

Is there a way to merge .ldb files without corrupting them? OR Import data from these backup files. These last files are ok but it's the "CURRENT" file that seems corrupted, and a simple line that no longer carries the correct Manifest name has compromised the entire wallet.

After many resets, scans, etc, it still seems that the wallet still doesn't show even the domains "Reveal", still to be registered. Domain management is empty.

I will wait for the Full Node Sync to finish and try again. With SPV not work.

Thanks again.

rithvikvibhu commented 1 year ago

As long as you have the seed phrase, all of these are recoverable on a new Bob install / computer:

What's not backed up is data that is not on chain:


In the future I have to set continuous backup on the "Wallet" folder, the other folders I think are not so fundamental as to compromise the loss of offers and domains not yet registered, but already Revealed. Or in order not to lose the offers data, even after a full sync/rescan, is it necessary to make backups of other things as well?

So simply having the seed phrase is enough to restore in the worst case. Rescans don't even need this, all domains will be back once it's done.

So, if any problem happens to the files in the "Wallet" folder, even the domains that have already been "Revealed" but not yet "Registred" are lost?

As soon as you reveal, the wallet doesn't need to be touched for ~2 years. It can be registered (won) or redeemed (lost) any time really. But since names expire in 2 years, it's better to register and renew before then.

Is there a way to merge .ldb files without corrupting them? OR Import data from these backup files. These last files are ok but it's the "CURRENT" file that seems corrupted, and a simple line that no longer carries the correct Manifest name has compromised the entire wallet.

Not really, but it shouldn't be required at all. Just the seed phrase (+optionally the backup/restore from within Bob settings) covers everything.

After many resets, scans, etc, it still seems that the wallet still doesn't show even the domains "Reveal", still to be registered. Domain management is empty. I will wait for the Full Node Sync to finish and try again. With SPV not work.

This seems like a different issue and is easier to debug in chat. Is it possible for you join https://t.me/bobwallet or https://discord.gg/EC6Ta75wkk ? If not, what's the (a) current sync status (top-right); (b) height (bottom-left in sidebar); (c) is the wallet balance correct; (d) are all names showing in My Domains?

Xarbiok commented 1 year ago

@rithvikvibhu Thanks for all this detailed information, it would be useful to put it in a FAQ available to everyone.

After several days of testing and trying, I haven't found any solutions for it. I should add that I use fully updated Windows 10, so not a little compatible / little used operating system.

Wallet after full rescan and reset on the same PC and also on a new PC through simple wallet import (new BOBWallet installation and no previous folder present), show all transactions, HNS correct, Last Current Height, Full Syncronized, but the "Domain Manager" shows 0 data and does not show any entries to record the domains. As per your information, Revealed domains should always give the possibility to register them, but this is not possible even for 1. I also tried via API and t":null,"error":{"message":"Auction not found: . ...........","code":-32603},"id":null} , when the Wallet correctly displays "the transaction confirming the reveal" and that it has been won (shown by the Blockchain). Example: https://e.hnsfans .com/name/betp2p As if the Wallet doesn't recognize that it's their own transaction and it comes from a different address. Any wallet after the import, even without backup copies, should always show all owned domains on "Domain Manager" and always give the possibility to register them if the reveal has been made and they have been won.

Furthermore, on a recent Wallet (different from the previous one and saved on a different PC) where I had made Backup Wallet copies over several days, I was never able to recover the lost BIDs even by making several Backup copies over several days. Hard Disk space is over 30GB free

  1. Once the 1st Backup (made by BobWallet) of the Wallet folder has been set, BobWallet opens without showing any errors and deleting everything placed in the Wallet folder, not showing any registered Wallet (I guarantee that all the files from the Backup made by BobWallet are present, none are missing)
  2. Set the 2nd Backup (the last one - different day) (made by BobWallet) of the Wallet folder, BobWallet shows "Assertion Failed" and does not open. Here we must be given the possibility on the BOBWallet of a button "FIX" or "Open uncorrupted data" or "Restore from Backup data X".
  3. Once the 3rd Backup has been set (directly the Wallet folder of a few days ago -different day), BobWallet stops synchronizing at 40-50% with SPVChain giving continuous errors to the log which fails to connect to the ping (even leaving it open for about 24 hours or reopening it does not resolve). Tried to do Rescan it always stops at a block, Impossible to do Reset + Rescan because the button does not work / does not respond. When you delete SVPChain, the synchronization restarts and always stops at a percentage. If the Wallet folder is deleted, the synchronization is total but obviously the data of all the offers are lost. I'll try to import it with FULL Chain but I don't think it will fix.

I add additional problems found:

I came to the conclusion that after several user tests (without programming knowledge), I currently find BobWallet slow and very dangerous to use (even making backup copies), except for small offers and a few at a time. If lack developers to make something that is safe/stable to use over time, I would suggest charge a monthly/yearly subscription to use it, but as it stands unfortunately it's not safe to use.

rithvikvibhu commented 1 year ago

useful to put it in a FAQ available to everyone

Yup, links to guides created by various members + some guides could go in the wiki.

re: the wallet not completing sync and domains not showing, it would be a lot easier and faster to resovlve in chat (telegram: https://t.me/bobwallet or discord: https://discord.gg/EC6Ta75wkk). If that's not possible, can you mail the log file from Bob -> Settings -> Download Log to rithvikvibhu@gmail.com? We can figure out what's going on from that.


The BID offers, I read that they are automatically corrected if there are no blinds with the new version, this is not true.

No, they are not corrected automatically. Where did you read that?

Every time you restart the PC or close BobWallet, it always has to load everything taking really long time (even hours),

It shouldn't take hours just to re-open the app, could be related to the wallet issues, letsee with the log.

From what I know about BOBWallet the limit is around 450-500

I probably should've asked this first, but are you on the latest Bob release? v2.0.0 fixes a lot of wallet issues, including batching actions (the 450-500 you mention).

BobWallet must create automatic backup copies

Good idea. Ideally it shouldn't be needed at all, but wouldn't hurt as a feature.

possibility of downloading the FULL CHAIN in a more direct and faster way... taking weeks for a FULL CHAIN with ultra fiber/SSD.

  1. We have discussed that, but download speeds isn't a bottleneck, it's verification of each block.
  2. It should NOT take weeks to sync, especially if it's an SSD. For context, I did a full sync from 0 to 150,000 which took 20 hours. So if it takes weeks to sync, there's something wrong there.
  3. There are improvements being worked on in hsd which shows promising speed ups (2-4x faster from the 20 hours): https://github.com/handshake-org/hsd/pull/804

I currently find BobWallet slow and very dangerous to use (even making backup copies), except for small offers and a few at a time.

It's true there have been a few issues before, but in the years everyone's been using it, there has been 0 loss of names or funds because of a wallet issue. Again, if you can join any of the groups linked above, we can identify the issue and get it fixed asap, I don't believe the names are "lost" or anything. Having said that, we still have this in the main readme:

Status: This is beta software. As with all wallet GUIs, please use with care, and at your own risk.

Xarbiok commented 1 year ago

@rithvikvibhu Thanks a lot for your support.

I have sent all the information to your email address.

rithvikvibhu commented 1 year ago

Resolved in chat.