spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.5k stars 3.1k forks source link

normal swap failure #7136

Open ecdsa opened 3 years ago

ecdsa commented 3 years ago
Traceback (most recent call last):
  File "/opt/electrum/electrum/gui/qt/main_window.py", line 323, in task
    r = f.result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/opt/electrum/electrum/submarine_swaps.py", line 288, in normal_swap
    raise Exception(f"fswap check failed: onchain_amount is more than what we estimated: "
Exception: fswap check failed: onchain_amount is more than what we estimated: 1117740 > 110676
ecdsa commented 3 years ago

@bitromortac can you please have a look?

I pressed the max button when it happened

bitromortac commented 3 years ago

I cannot reproduce so far, I tried with a similar magnitude (~1Msat) on testnet and it worked for a normal swap with a single channel active for receiving. Will do some more tests.

SomberNight commented 3 years ago

I was wondering if this could be a race: mining fees changed on-chain between when we last queried normal_fee from the swap server and when you clicked "OK" in the swap dialog. https://github.com/spesmilo/electrum/blob/41f22df26b09c7a5c03baaeb3aa7a09e742ac998/electrum/submarine_swaps.py#L440

The values look too different though. I am assuming your paste is truncated and is missing the last character, in which case the diff (1117740-110676?) is around 11k sats. With a tx size of 170 vbytes [0], that would mean a feerate change of ~65 sat/vbyte...

ecdsa commented 3 years ago

yes, I believe it is likely that one character is missing in the paste