Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch(maker): allow maker to continue after failed swapcoin recovery #412

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rishkwal
Copy link
Collaborator

@rishkwal rishkwal commented Feb 9, 2025

Temporary fix to start the maker after #406

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 11.11111% with 16 lines in your changes missing coverage. Please review.

Project coverage is 70.11%. Comparing base (a00d05a) to head (07910fe).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
src/maker/api.rs 0.00% 12 Missing ⚠️
src/maker/handlers.rs 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
- Coverage   70.26%   70.11%   -0.16%     
==========================================
  Files          34       34              
  Lines        4261     4263       +2     
==========================================
- Hits         2994     2989       -5     
- Misses       1267     1274       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/maker/api.rs Outdated Show resolved Hide resolved
src/maker/api.rs Outdated Show resolved Hide resolved
src/maker/api.rs Outdated
Comment on lines 618 to 620
Err(ProtocolError::General(msg)) => {
log::error!("SOMETHING WENT WRONG: {}", msg);
continue;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we just continue it will get stuck in the same loop. We need to remove the swapcoin from the wallet.

Also log something like "Please open an issue reporting this with logs at ".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not get stuck in the recovery loop because the recovery_from_swap is called with empty vectors of outgoing and incoming contracts so it exits the recovery loop. I am able to fetch an offer and initiate a coinswap with this maker but the swap enters recovery. Trying to figure out what's going on.

2025-02-09T21:19:23.564764+05:30 ERROR coinswap::maker::api - SOMETHING WENT WRONG: Other's contract signature not known
2025-02-09T21:19:23.881322+05:30 INFO coinswap::maker::server - Total available balance for swaps: 4999700 sats | Listening for incoming swap requests
2025-02-09T21:19:24.157209+05:30 INFO coinswap::maker::api - Wallet file synced and saved to disk.
2025-02-09T21:19:24.157225+05:30 INFO coinswap::maker::api - 0 outgoing contracts detected | 0 timelock txs broadcasted.
2025-02-09T21:19:24.157234+05:30 INFO coinswap::maker::api - All outgoing transactions claimed back via timelock. Recovery loop exiting.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its doing this because you still have that og-swapcoin in the wallet, which is marked as unfinished and doesn't have signature data. So it will always catch that and try to recover, and then shoot this log.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted the swapcoins. The swap with this maker is still failing. I have pushed a commit that deletes the swapcoins. I'm not sure yet, there might be something else wrong with the maker I'm running. Maybe you can checkout to this PR and attempt a swap with the affected maker.

@rishkwal rishkwal requested a review from mojoX911 February 10, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants