gui icon indicating copy to clipboard operation
gui copied to clipboard

Bugfix: Allow the user to start anyway when loading a wallet errors

Open luke-jr opened this issue 4 years ago • 8 comments

Right now, if a GUI user leaves a wallet loaded and something happens to make it error at startup, they're stuck.

This turns the error dialog into a question about starting without the wallet instead.

luke-jr avatar Mar 03 '21 01:03 luke-jr

~~Not sure why GitHub thinks this has conflicts - it doesn't.~~

~~Mainly this is a WIP because it uses a hacky global to avoid trying to load the wallets the user has chosen to skip... Suggestions for a good way to deal with that?~~

luke-jr avatar Mar 03 '21 01:03 luke-jr

Rebased, which made it practical to drop the global hack. This seems ready for review now.

luke-jr avatar Jan 10 '22 01:01 luke-jr

Concept ACK, will review / test.

kristapsk avatar Mar 06 '22 18:03 kristapsk

Still gives me error message without ability to continue, not question.

$ ./src/qt/bitcoin-qt -version
Bitcoin Core versija v22.99.0-fb3ea0ad3a87
Copyright (C) 2009-2021 The Bitcoin Core developers

Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org/> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>

$ git log | head -n 1
commit fb3ea0ad3a8788e023b9ba7237c26fc8ef0dba79
$ ./src/qt/bitcoin-qt -signet
Error: Error loading /fast_home/neonz/.bitcoin/signet/wallets/jmw/wallet.dat: Wallet requires newer version of Bitcoin Core

image

kristapsk avatar Mar 08 '22 16:03 kristapsk

Ah, it only caught some errors. Pushed a revision that should catch the rest.

luke-jr avatar Mar 08 '22 22:03 luke-jr

Apart from review comment above, ACK, working for me (tested scenario with trying to load external signer wallet without external signer support compiled into Bitcoin Core).

kristapsk avatar Mar 09 '22 02:03 kristapsk

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

DrahtBot avatar Jun 12 '22 21:06 DrahtBot

@luke-jr do you want to respond to suggestions here? Or would you be open to a someone making a new PR?

Status of the PR seems to be that it is up to date, but has a bug that could cause command line and bitcoin.conf wallets to be ignored. I suggested a fix for the bug and some cleanups in https://github.com/bitcoin-core/gui/pull/236#discussion_r842066839.

I think there is also a usability problem with this PR in the case of temporary errors where a wallet can't be loaded due to a temporary issue like: background assumeutxo download https://github.com/bitcoin/bitcoin/pull/23997, pruning, a missing external signer https://github.com/bitcoin/bitcoin/pull/22173, an encrypted drive not being mounted, a removable drive not being plugged in, or a version incompatibility that will be resolved by upgrading or downgrading. In these cases it would be useful to have the option to continue starting the GUI and letting the node sync, while temporarily not loading individual wallets that are unavailable, and the current dialog doesn't provide an option to temporarily not load a wallet. The only options are quit or continue without loading the wallet next time. I think it would be a improvement to change the dialog to "Wallet could not be loaded because of , do you want to try to load it next time Bitcoin Core is started?" with "Yes" "No" buttons (and maybe "Details" and "Abort" buttons off to the side like #379). This was one of four alternatives suggested in https://github.com/bitcoin-core/gui/issues/95, and there is more discussion about this issue there.

ryanofsky avatar Oct 06 '22 16:10 ryanofsky

@luke-jr do you want to respond to suggestions here? Or would you be open to a someone making a new PR?

I'm going to close this, and mark "Up for grabs".

hebasto avatar Dec 06 '22 19:12 hebasto