Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Funds in unclaimed conditionalTransfer remain locked #1173

Closed
erkarl opened this issue May 27, 2020 · 4 comments · Fixed by #1315
Closed

Funds in unclaimed conditionalTransfer remain locked #1173

erkarl opened this issue May 27, 2020 · 4 comments · Fixed by #1315
Labels
Chore Devops or refactoring task p2: User Shipping Needs Important (but minimal) refactors/enhancements/fixes needed for customers

Comments

@erkarl
Copy link
Contributor

erkarl commented May 27, 2020

Current Behavior

After the locktime has expired the funds remain locked in the app.

Expected Behavior

The client should detect when the conditional transfer has not been claimed within the specified locktime and automatically call uninstallApp.(appInstanceId) to release the funds or dispute on-chain.

@erkarl erkarl added the Needs Triage Needs to be looked at and prioritized. label May 27, 2020
@kilrau
Copy link

kilrau commented May 27, 2020

or dispute on-chain

if the node decides not to cooperate, meaning uninstallApp.(appInstanceId) hits a timeout

@ArjunBhuptani ArjunBhuptani added Chore Devops or refactoring task p2: User Shipping Needs Important (but minimal) refactors/enhancements/fixes needed for customers and removed Needs Triage Needs to be looked at and prioritized. labels May 30, 2020
@ArjunBhuptani
Copy link
Member

Part of this will be solved here: #1101

And then we'll have to think through how the client/node clean up transfers on a schedule

@kilrau
Copy link

kilrau commented Jun 22, 2020

Agreed, connext/rest-api-client#37 was largely the same. Just transferring this small requirement here for clarity: client constantly retries claiming the htlc up to the dispute timeout. Then, as @erkarl described above, automatically calls uninstallApp.(appInstanceId) to release the funds or dispute on-chain if this doesn't work within a certain time period (we discussed one day). It should go on-chain well before htlc timeout.

@rhlsthrm rhlsthrm mentioned this issue Jun 25, 2020
5 tasks
@kilrau
Copy link

kilrau commented Jul 15, 2020

The client should detect when the conditional transfer has not been claimed within the specified locktime and automatically call uninstallApp.(appInstanceId) to release the funds or dispute on-chain.

As per recent discussion, we agreed that the client does not need to schedule htlc cleanups as long as
a) it exposes a simple call that an external service (like xud) could hit to cancel and clean-up unclaimed htlcs (please let us know which one since you mentioned two on the call @ArjunBhuptani @LayneHaber )
b) the node schedules automated uninstalling htlcs after expiry, retries if it fails
c) the client automatically triggers uninstalling expired htlcs on startup since b) can fail because client was offline

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Chore Devops or refactoring task p2: User Shipping Needs Important (but minimal) refactors/enhancements/fixes needed for customers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants