-
Notifications
You must be signed in to change notification settings - Fork 91
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
client/dcr: restarting dexc mid-trade results in stuck trade #2442
Comments
Is it revoked? Shouldn't be searching for a redemption unless the match is revoked. |
Trade DCR-USDC with self (on testnet) such that DCR swap txn is done as 2nd step, wait until DCR swap txn is broadcasted (show up at dcrdata explorer) and restart dexc (seems like there is no need to even wait before starting it again), now we can navigate to Taker and Maker match cards, both point of view on Taker DCR swap (after restart, same as before restart) is that confirmations are stuck at 0: while dcrdata shows 4 confirmations at this point (and they keep growing over time ofc):
I don't think it's revoked, see Status=settling(Taker Swap Sent), I think it gets revoked eventually and funds are refunded,
To sum up, there seems to be 2 undesirable outcomes from this dexc mid-trade restart:
observing with dcr spv wallet, but haven't tested for other wallets. |
It's not consistent, but I did reproduce it twice. PR just for debugging, with a possible workaround: #2444 |
I'm observing this issue pretty consistently when restarting dexc mid-trade (right after Taker swap): #2042 (comment)
I've looked a bit into it and think it more likely has to do with the following being out of sync than with reorgs, something like:
FindRedemption
methodfindRedemptionQueue
gets filled)monitorBlocks
, it seems to be doing some time-based delays (at least I don't see obvious way it's synched with 1st process from above)so when dexc restarts (perhaps with several minutes delay), it misses the block we are interested in (or a whole range of blocks maybe) would be my guess ... but I give up this investigation, leaving this in case somebody wants to pick it up.
The text was updated successfully, but these errors were encountered: