"Create Unsigned" should not show the message: "The amount exceeds you balance" without suggesting alternatives #27659

issue GregTonoski opened this issue on May 15, 2023
  1. GregTonoski commented at 9:20 AM on May 15, 2023: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    "The amount exceeds you balance." error message after clicking "Create Unsigned" button even though there are funds on an address.

    screenshot

    Expected behaviour

    A message about steps to workaround or solve the issue, e.g. "Balance must be above 0 in order to create PSBT. Do you want to start rescanning Bitcoin blockchain in order to update the balance?" (if that's the true reason).

    Alternatively, start "Create Unsigned" normally and optionally defer amount input.

    Steps to reproduce

    Preconditions:

    1. A watch-only wallet is active.

    Steps:

    1. Start bitcoin-qt
    2. Select Send tab
    3. Fill the pay-to and amount fields
    4. Click "Create Unsigned" button

    Relevant log output

    Console:

    getwalletinfo { "walletname": "test-watch_only", "walletversion": 169900, "format": "sqlite", "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoolsize": 0, "keypoolsize_hd_internal": 0, "paytxfee": 0.00000000, "private_keys_enabled": false, "avoid_reuse": false, "scanning": false, "descriptors": true, "external_signer": false }

    listdescriptors { "wallet_name": "test-watch_only", "descriptors": [ { "desc": "addr(tb1qgaxtdmsh6s7l4fpzlheq5g75nyhee3mfltszqm9n0u2538k30u7q8sp9gu)#8hxudg36", "timestamp": 1684136837, "active": false }, { "desc": "addr(tb1que0qlgeudvu3m2nkxne74j4809d87enawssnz6)#rcm6u9x4", "timestamp": 1684136521, "active": false }, { "desc": "addr(tb1qw2ded86wvzkmmze2yp0fy84d635gfgkv3y3gva)#lxflvchu", "timestamp": 1684136521, "active": false } ] } 20230515debug.txt

    There might have been similar issue reported: https://github.com/bitcoin-core/gui/issues/83

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    25.0 rc1

    Operating system and version

    Windows 11

    Machine specifications

    No response

  2. fanquake commented at 11:07 AM on May 15, 2023: member

    25.0.1 rc1

    This version doesn't exist?

    There might have been similar issue reported: https://github.com/bitcoin-core/gui/issues/83

    Given there is already what looks like a similar issue, might be better to continue the discussion there? GUI issues should be opened on the GUI repo: https://github.com/bitcoin-core/gui.

  3. furszy commented at 1:47 PM on May 15, 2023: member

    Quite sure that https://github.com/bitcoin-core/gui/issues/83 was solved by #26699 (which solved #26687).

    Please try the latest release.

    You will surely face another error now. A "Missing solving data for estimating transaction size" because you are trying to create a transaction for an input that your wallet cannot estimate its signature size due the lack of knowledge of the pubkey (because you imported it as a plain addr()). Which IIRC, should be solved by #26567.

  4. fanquake commented at 1:52 PM on May 15, 2023: member

    Quite sure that this was solved by #26699 (which solved #26687)

    If that's the case, then this shouldn't be an issue in 25.x, which looks like what is being tested here. Would be great if someone else can confirm/deny.

  5. furszy commented at 2:46 PM on May 15, 2023: member

    Well, I also coded a test for that case there https://github.com/bitcoin/bitcoin/pull/26699/commits/68eed5df8656bed1be6526b014e58d3123102b03. So would be good to request an update over https://github.com/bitcoin-core/gui/issues/83.

    But, it seems that the problematic presented here is not that one. Based on the information provided @GregTonoski:

    getwalletinfo { "walletname": "test-watch_only", "walletversion": 169900, "format": "sqlite", "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoolsize": 0, "keypoolsize_hd_internal": 0, "paytxfee": 0.00000000, "private_keys_enabled": false, "avoid_reuse": false, "scanning": false, "descriptors": true, "external_signer": false }

    There is no balance in the wallet. So, probably the importdescriptors RPC command call was done with timestamp=now and no rescan was performed. Which, if that is the case, then this is not a GUI issue (or not entirely.. we could have a simple descriptors import functionality in the GUI that enables rescan by default, letting users disable it in an "advanced" tab).

  6. furszy commented at 3:00 PM on May 15, 2023: member

    Still, this is not the case but better to add that a psbt creation, on a wallet only with unconfirmed balance, isn't possible (coins received from an external source are treated as "untrusted"). In the same way as it is not enabled for regular spending neither in the GUI. Which is something that we could also improve. At least the error message.

  7. GregTonoski commented at 3:10 PM on May 15, 2023: none

    So, probably the importdescriptors RPC command call was done with timestamp=now and no rescan was performed.

    I confirm that there was the importdescriptors RPC command call done with timestamp=now and no rescan was performed.

  8. furszy commented at 7:21 PM on May 15, 2023: member

    So, probably the importdescriptors RPC command call was done with timestamp=now and no rescan was performed.

    I confirm that there was the importdescriptors RPC command call done with timestamp=now and no rescan was performed.

    Based on that, maybe close this issue?

    I think that adding the "Do you want to start rescanning Bitcoin blockchain in order to update the balance?" inside the sending process is an overkill (it will affect other scenarios and not only this one), leading to confusion and users rescanning the chain several times for no real reason.

    The problematic here was caused by a misusage of an RPC command argument rather than by the current GUI.

    Would say that we should instead aim to implement the same "import descriptors" functionality in the GUI, with an advance tab for users who want to skip the rescan process, so GUI users aren't tempted to re-use RPC commands without checking the arg description.

  9. fanquake commented at 12:12 PM on May 16, 2023: member

    Based on that, maybe close this issue?

    Ok. Seems like this can be followed up with in the GUI repo, in any case.

  10. fanquake closed this on May 16, 2023

  11. bitcoin locked this on May 15, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me