Skip to content

Detect double-spent dual funded channels #371

@t-bast

Description

@t-bast

When using dual funding, we cannot simply forget unconfirmed channels after 2016 blocks if we contributed to the funding amount. There are multiple funding transaction candidates, and any of them may (eventually) confirm. The only case where we can forget such an unconfirmed channel is when we have proof that all funding transaction candidates have been double-spent by a transaction that doesn't belong to the funding candidates set.

However, this is very tedious to implement on top of the electrum protocol: we would likely need to subscribe to every input of every funding transaction candidate, aggregate their status and then run non-trivial logic to verify that funding transactions were all correctly double-spent.

This isn't done right now, which means that a double-spent dual funded channel will not be detected and will stay stuck in the WaitForFundingConfirmed state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions