-
Notifications
You must be signed in to change notification settings - Fork 43
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
Order is not returned back to order book of taker after no route err #1816
Labels
Comments
sangaman
added a commit
that referenced
this issue
Aug 18, 2020
This monitors all swap client payments until their resolution without putting deals into `SwapRecovery`. Previously, if a call to send payment failed but the payment was still in pending status (as has been the case with Connext), then we would fail the swap deal and monitor the payment in `SwapRecovery`. This had several downsides, namely: 1. Since the deal is marked as having failed in the database, if xud restarts while payment monitoring is ongoing, it won't resume monitoring because it sees the swap as having failed in the database. We only recover swaps that were "active" at the time xud shut down. See #1799. 2. When a deal is failed, the maker order it attempted to swap re-enters the order book and is available to be matched again. However, since the payment for the original deal is still pending, it may still go through, meaning that the order can be "double filled" in such a case. See #1816. By monitoring all pending payments to their resolution, we ensure that we don't fail deals that wind up completing. Fixes #1799. Fixes #1816.
sangaman
added a commit
that referenced
this issue
Aug 19, 2020
This monitors all swap client payments until their resolution without putting deals into `SwapRecovery`. Previously, if a call to send payment failed but the payment was still in pending status (as has been the case with Connext), then we would fail the swap deal and monitor the payment in `SwapRecovery`. This had several downsides, namely: 1. Since the deal is marked as having failed in the database, if xud restarts while payment monitoring is ongoing, it won't resume monitoring because it sees the swap as having failed in the database. We only recover swaps that were "active" at the time xud shut down. See #1799. 2. When a deal is failed, the maker order it attempted to swap re-enters the order book and is available to be matched again. However, since the payment for the original deal is still pending, it may still go through, meaning that the order can be "double filled" in such a case. See #1816. By monitoring all pending payments to their resolution, we ensure that we don't fail deals that wind up completing. Fixes #1799. Fixes #1816.
sangaman
added a commit
that referenced
this issue
Aug 19, 2020
This monitors all swap client payments until their resolution without putting deals into `SwapRecovery`. Previously, if a call to send payment failed but the payment was still in pending status (as has been the case with Connext), then we would fail the swap deal and monitor the payment in `SwapRecovery`. This had several downsides, namely: 1. Since the deal is marked as having failed in the database, if xud restarts while payment monitoring is ongoing, it won't resume monitoring because it sees the swap as having failed in the database. We only recover swaps that were "active" at the time xud shut down. See #1799. 2. When a deal is failed, the maker order it attempted to swap re-enters the order book and is available to be matched again. However, since the payment for the original deal is still pending, it may still go through, meaning that the order can be "double filled" in such a case. See #1816. By monitoring all pending payments to their resolution, we ensure that we don't fail deals that wind up completing. Fixes #1799. Fixes #1816.
sangaman
added a commit
that referenced
this issue
Aug 19, 2020
This monitors all swap client payments until their resolution without putting deals into `SwapRecovery`. Previously, if a call to send payment failed but the payment was still in pending status (as has been the case with Connext), then we would fail the swap deal and monitor the payment in `SwapRecovery`. This had several downsides, namely: 1. Since the deal is marked as having failed in the database, if xud restarts while payment monitoring is ongoing, it won't resume monitoring because it sees the swap as having failed in the database. We only recover swaps that were "active" at the time xud shut down. See #1799. 2. When a deal is failed, the maker order it attempted to swap re-enters the order book and is available to be matched again. However, since the payment for the original deal is still pending, it may still go through, meaning that the order can be "double filled" in such a case. See #1816. By monitoring all pending payments to their resolution, we ensure that we don't fail deals that wind up completing. Fixes #1799. Fixes #1816.
sangaman
added a commit
that referenced
this issue
Aug 19, 2020
This monitors all swap client payments until their resolution without putting deals into `SwapRecovery`. Previously, if a call to send payment failed but the payment was still in pending status (as has been the case with Connext), then we would fail the swap deal and monitor the payment in `SwapRecovery`. This had several downsides, namely: 1. Since the deal is marked as having failed in the database, if xud restarts while payment monitoring is ongoing, it won't resume monitoring because it sees the swap as having failed in the database. We only recover swaps that were "active" at the time xud shut down. See #1799. 2. When a deal is failed, the maker order it attempted to swap re-enters the order book and is available to be matched again. However, since the payment for the original deal is still pending, it may still go through, meaning that the order can be "double filled" in such a case. See #1816. By monitoring all pending payments to their resolution, we ensure that we don't fail deals that wind up completing. Fixes #1799. Fixes #1816.
I had this issue confused with another one at first, I have been looking into this and I think I just found the root cause. I'll have a PR soon. |
sangaman
added a commit
that referenced
this issue
Aug 23, 2020
This fixes the functionality of non-strict mode to add peer orders back to the order book after they were matched but failed to swap. Previously we would only add back orders that were partially matched, by removing the remaining order from the order book, adding the partially matched quantity back to it, and then adding it back to the order book. This also adds back orders that were fully matched and removed from the order book during matching after they fail to swap. Closes #1816.
sangaman
added a commit
that referenced
this issue
Aug 24, 2020
This fixes the functionality of non-strict mode to add peer orders back to the order book after they were matched but failed to swap. Previously we would only add back orders that were partially matched, by removing the remaining order from the order book, adding the partially matched quantity back to it, and then adding it back to the order book. This also adds back orders that were fully matched and removed from the order book during matching after they fail to swap. Closes #1816.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps:
Actual result:
Maker's order is not returned back to Taker's orderbook
Expected result:
Maker's order is returned back to Taker's orderbook after some time
Logs:
The text was updated successfully, but these errors were encountered: