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

[Client, node] Resolve htlc apps onchain if counterparty is unresponsive #1254

Open
ArjunBhuptani opened this issue Jun 17, 2020 · 3 comments
Labels
p1 Bugs/Tests/Blockers Bugs that break things but no loss of funds + Test improvements + PRIORITY blockers for customers.

Comments

@ArjunBhuptani
Copy link
Member

Relies on other watcher work to be completed first.

We need to explicitly dispute htlc apps in client and node if they are close to (or past) expiring but the counterparty has not resolved them offchain.

If the client is receiving an htlc transfer, they should dispute shortly before the timeout -- note that because we allow "shortcutting" the dispute for transfers, this actually only needs to happen a few (perhaps we can go with 100?) blocks before expiry.

If the client is ending an htlc transfer and the transfer is never resolved, they should dispute shortly after the timeout (perhaps 1 day after?).

Note that disputing will totally end the channel and make it unusable in the future, requiring that users withdraw ALL funds and rotate keys.

@ArjunBhuptani ArjunBhuptani added the p1 Bugs/Tests/Blockers Bugs that break things but no loss of funds + Test improvements + PRIORITY blockers for customers. label Jun 17, 2020
@kilrau
Copy link

kilrau commented Jun 17, 2020

Small addon:

If the client is ending an htlc transfer and the transfer is never resolved, they should dispute shortly after the timeout (perhaps 1 day after?).

The same way should the node dispute an unresolved transfer to a client after expiry.

@kilrau
Copy link

kilrau commented Jun 17, 2020

Assuming an htlc timeout of 7 days.

Proposal for client dispute timeout: 1 day. If a node doesn't respond/is offline for longer than 24h something is seriously wrong and the client should go and dispute on-chain. Also the client might be offline itself for an extended time. This creates a buffer of 6 days (7 days htlc timeout) for the client to come online and broadcast this tx.

Proposal for node dispute timeout: 4 days. Clients can be offline for some time, but the node should limit the amount of funds that are locked in htlcs that it can't claim and could lead to it running dry. (EDITED from previously 6 days).

@kilrau
Copy link

kilrau commented Jun 17, 2020

Related: retry unlocking an incoming htlc up to dispute timeout (connext/rest-api-client#37). The node should do the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p1 Bugs/Tests/Blockers Bugs that break things but no loss of funds + Test improvements + PRIORITY blockers for customers.
Projects
None yet
Development

No branches or pull requests

2 participants