UnstoppableSwap / core

Bitcoin–Monero Cross-chain Atomic Swap (+ GUI)
GNU General Public License v3.0
17 stars 5 forks source link

Retry sending transfer proof #101

Open binarybaron opened 1 week ago

binarybaron commented 1 week ago

Currently if Alice fails to send the transfer proof due to any error (e.g "request timed out"), she'll not attempt to send it again.

2024-09-27T13:36:22.268247Z  INFO swap{id=c9746005-1bb4-411c-b9a9-a2fc3129e5cb}: Waiting for Monero transaction finality txid=54033349e1457e87eee9688d5f612ed49fa25a34ebad5996c9ecc826a99df637 target_confirmations=1
2024-09-27T13:39:35.534341Z  INFO swap{id=c9746005-1bb4-411c-b9a9-a2fc3129e5cb}: Received new confirmation for Monero lock tx txid=54033349e1457e87eee9688d5f612ed49fa25a34ebad5996c9ecc826a99df637 seen_confirmations=1 needed_confirmations=1
2024-09-27T13:39:35.557507Z  INFO swap{id=c9746005-1bb4-411c-b9a9-a2fc3129e5cb}: Advancing state state=xmr is locked rate=0.002489 BTC
2024-09-27T13:39:35.559283Z  WARN No active connection to peer, buffering transfer proof peer=12D3KooWFAkfB1qMdLPKwitCAY6gMx1DQtmGxJfHgoJRwwMWR1oi
2024-09-27T13:39:57.153333Z ERROR swap{id=c9746005-1bb4-411c-b9a9-a2fc3129e5cb}: error=Failed to send transfer proof
2024-09-27T13:39:57.154843Z ERROR Swap failed: Failed to send transfer proof: request timed out swap_id=c9746005-1bb4-411c-b9a9-a2fc3129e5cb

What we need to do to fix this:

https://github.com/comit-network/xmr-btc-swap/blob/bfb0053919f695ed5bc1b832f48c9a06a5cf6555/swap/src/protocol/alice/swap.rs#L211-L229

binarybaron commented 2 days ago

We should also merge this fix upstream.