Skip to content
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

Cancel back outgoing dust htlcs before commitment is confirmed. #9068

Merged
merged 9 commits into from
Nov 8, 2024

Commits on Nov 7, 2024

  1. Configuration menu
    Copy the full SHA
    98a270b View commit details
    Browse the repository at this point in the history
  2. contratcourt: refactor resolving htlc logic

    Refactor the part where we are failing back the incoming htlc
    when the channel of the corresponding outgoing htlc is force
    closed. We do this because in furture commits we separate the
    logic when we fail back the incoming htlc (abandonForward).
    Right now we fail abandon dust forwards and non-dust forwards
    only when the commitment transaction is confirmed. Later we will
    move the canceling of the upstream htlc when the commitment
    transaction is broadcasted instead of waiting until the commitment
    tx is confirmed. The reason for that is that dust cannot be enforced
    onchain anyways so there is no reason to wait.
    ziggie1984 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    8890f83 View commit details
    Browse the repository at this point in the history
  3. contractcourt: enhance chainAction type

    We distinguish between dangling and dust htlcs. This does not
    change any logic but only introduces new types to later act on them
    differently when we begin to fail dust htlcs earlier in a later
    commit.
    ziggie1984 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    328a711 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    20dc7f2 View commit details
    Browse the repository at this point in the history
  5. contractcourt: Cancel dust htlcs prematurely

    We will now cancel dust htlcs on the local/remote commits after
    we decided to go onchain. This can be done because dust cannot
    be enforced onchain and therefore there is no way to also reveil
    the preimage onchain.
    ziggie1984 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    8ed8665 View commit details
    Browse the repository at this point in the history
  6. contratcourt: dont consider dust htlc for anchor sweep

    Now that we cancel dust htlcs prematurely even before the
    commitment tx is confirmed we don't consider dust htlcs when
    creating the cpfp transaction.
    ziggie1984 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7aa9ade View commit details
    Browse the repository at this point in the history
  7. itest: adopt itests for the new behavior

    Now outgoing dust-htlcs are canceled back before the commitment
    is confirmed onchain.
    ziggie1984 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    50d6864 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d5e8df7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    59f3268 View commit details
    Browse the repository at this point in the history