-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Core v0.21.0
Coldcore v0.3.0
Windows 10
During the wallet setup test transaction steps, I sent 0.00001 tBTC from my Bitcoin Core testnet wallet to my coldcore testnet wallet (which exists as a watch-only wallet on Bitcoin Core).
Once the 0.00001 tBTC was received in the coldcore wallet, it moved on to the next step of sending 90% of the value to a new address... I am assuming the error is because the transaction was sending 900 sats to the new address, and 100 sats to a change address, causing the change amount to be below the dust limit.
There are two issues that need to be addressed here:
- The uncaught exception
'Insufficient funds' code: -4
- The coldcore setup process specifically says to send a tiny amount "like ~0.000001 BTC", but this seems to be too low. If the dust limit is 546 sats, then the minimum UTXO size that should be selected is ~10,000 sats (9,000 sats to make up the 90%, 141 sats for fee, leaves us with 859 sats change output. This minimum UTXO size is specific to this setup process since it explicitly splits the value 90/10. But I suspect the insufficient funds error could pop up in other cases when trying to spend from coldcore. We should also handle the case where the dust limit is raised above 859 sats.
# test transactions
-----------------
□ send a tiny amount (we're talking like ~0.000001 BTC) to
tb1qs00ld7dmtjcjc9u9tcdmracf77qx2lv33gjqva
(obviously, this is an address you own)
◱ waiting for transaction
✔ received amount of 0.00001000 (txid e72cceda)
-- great - now let's test your ability to send
-- we're going to send 90% of the value of the last UTXO over to a new address:
tb1qxr9edahl7lak8te2vgw4g2zlfs8us50e8ker4w
Traceback (most recent call last):
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 3274, in <module>
main()
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 3265, in main
cli.run()
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 298, in run
return fnc(*func_args, **func_kwargs)
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 2173, in cli_main
ui()
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 262, in wrapper
return fnc(*args, **kwargs)
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 2073, in ui
start_ui(config, walls)
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 1819, in start_ui
curses.wrapper(draw_menu, config, wallet_configs, action)
File "C:\Users\billy\AppData\Local\Programs\Python\Python39\lib\curses\__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 1781, in draw_menu
config, wallet = run_setup(config)
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 1059, in run_setup
prepared_tx = _prepare_send(
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 2787, in _prepare_send
result = rpcw.walletcreatefundedpsbt(
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 590, in _call_wrapper
return self._call(name, *args, **kwargs)
File "C:\Hub\Dev\coldcore-new\coldcore\coldcore", line 540, in _call
raise JSONRPCError(
__main__.JSONRPCError: msg: 'Insufficient funds' code: -4
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working