UnstoppableSwap / unstoppableswap-gui

Graphical User Interface (GUI) For Trustless Cross-Chain XMR<>BTC Atomic Swaps
https://unstoppableswap.net/
MIT License
275 stars 15 forks source link

Bad initial UX, swap fails with "failed to broadcast Bitcoin lock transaction" #148

Open icy-ux opened 1 year ago

icy-ux commented 1 year ago

Expected Behavior

User downloads app, runs swap, swap completes as normal

Current Behavior

Initial swaps fail for a variety of reasons, finally we get to the point where it broadcasts the Bitcoin lock tx and even that fails

Steps to Reproduce

{"timestamp":"2023-07-27T19:40:04.667927808Z","level":"INFO","fields":{"message":"Logging initialized to /home/user/.local/share/xmr-btc-swap/cli/mainnet/logs"}}
{"timestamp":"2023-07-27T19:40:04.667979431Z","level":"DEBUG","fields":{"message":"Using existing sqlite database."}}
{"timestamp":"2023-07-27T19:40:04.668987266Z","level":"DEBUG","fields":{"message":"Reading in seed from /home/user/.local/share/xmr-btc-swap/cli/mainnet/seed.pem"}}
{"timestamp":"2023-07-27T19:40:10.394320315Z","level":"DEBUG","fields":{"message":"RPC exec path: /home/user/.local/share/xmr-btc-swap/cli/mainnet/monero/monero-wallet-rpc"}}
{"timestamp":"2023-07-27T19:40:11.406915471Z","level":"DEBUG","fields":{"message":"RPC version output: Monero 'Fluorine Fermi' (v0.18.1.2-release)\n"}}
{"timestamp":"2023-07-27T19:40:11.407019339Z","level":"DEBUG","fields":{"message":"Starting monero-wallet-rpc","port":"38105"}}
{"timestamp":"2023-07-27T19:40:13.592483312Z","level":"DEBUG","fields":{"message":"Opened Monero wallet","monero_wallet_name":"swap-tool-blockchain-monitoring-wallet"}}
{"timestamp":"2023-07-27T19:40:13.609835155Z","level":"DEBUG","fields":{"message":"Network layer initialized","peer_id":"12D3KooWKvfQjKeLBwGJS1vowcnBmk5sSov1yuoVbGxfdivoACys"}}
{"timestamp":"2023-07-27T19:40:13.609889692Z","level":"DEBUG","fields":{"message":"Requesting quote"}}
{"timestamp":"2023-07-27T19:40:14.859602186Z","level":"INFO","fields":{"message":"Connected to Alice at /dns4/beta.unstoppableswap.net/tcp/9939/p2p/12D3KooWMiriru5viqde3BMFLTqPur8Yrjpp4ULFc76ubQLfuYYX"}}
{"timestamp":"2023-07-27T19:40:15.360539091Z","level":"INFO","fields":{"message":"Received quote","price":"0.00577512 BTC","minimum_amount":"0.0005 BTC","maximum_amount":"0.08758942 BTC"}}
{"timestamp":"2023-07-27T19:40:16.097639058Z","level":"INFO","fields":{"message":"Determined swap amount","amount":"0.00098473 BTC","fees":"0.00003027 BTC"}}
{"timestamp":"2023-07-27T19:40:16.12041947Z","level":"DEBUG","fields":{"message":"Advancing state","state":"quote has been requested"}}
{"timestamp":"2023-07-27T19:40:16.692340714Z","level":"DEBUG","fields":{"message":"Estimated fee for transaction","weight":"548","fee_rate":"15.923999","sats_per_vbyte":"2181.5878630"}}
{"timestamp":"2023-07-27T19:40:17.46199379Z","level":"DEBUG","fields":{"message":"Estimated fee for transaction","weight":"596","fee_rate":"15.923999","sats_per_vbyte":"2372.6758510"}}
{"timestamp":"2023-07-27T19:40:22.073367498Z","level":"INFO","fields":{"message":"Starting new swap","swap_id":"f9471286-f2f2-43a7-a354-519ae98d1a30"}}
{"timestamp":"2023-07-27T19:40:22.095872416Z","level":"DEBUG","fields":{"message":"Advancing state","state":"execution setup done"}}
{"timestamp":"2023-07-27T19:42:34.481774951Z","level":"DEBUG","fields":{"message":"Found relevant Bitcoin transaction","txid":"38ad163b0571912077a5ad2669cb836354cb5c41c8bf44f726af1d3b219069be","status":"unseen"}}
Error: Failed to complete swap

Caused by:
    0: Failed to broadcast Bitcoin lock transaction 38ad163b0571912077a5ad2669cb836354cb5c41c8bf44f726af1d3b219069be
    1: Electrum(AllAttemptsErrored([JSON(Error("EOF while parsing a value", line: 1, column: 0))]))

Possible Solution (Not obligatory)

Don't make the GUI the only way on UnstoppableSwap.net for new users to try to do swaps.

As discussed elsewhere it's now very difficult to do swaps using the regular command line client because rendezvous isn't working

Your Environment

Fedora 37

binarybaron commented 1 year ago

Both of the issues you opened are related to some problem with the connection the cli (not the GUI) is failing to establish to the electrum server. This not related to the GUI.

Did this happen to you multiple times? Is there a way I can reproduce this?

icy-ux commented 1 year ago

Both of the issues you opened are related to some problem with the connection the cli (not the GUI) is failing to establish to the electrum server. This not related to the GUI.

I have not had these issues doing swaps with the swap cli. Possibly there is an issue with the default Electrum servers configured when using the GUI?

Did this happen to you multiple times? Is there a way I can reproduce this?

I posted each issue after encountering the problem. I gave up after the 2nd issue, because that one required me to wait very many blocks until I could refund the Bitcoin back to the wallet.