Skip to content

[bug]: LND bumps sweep-tx while a self-payment timeout is delayed, causing FC TX overpayment #9188

@TrezorHannes

Description

@TrezorHannes

Background

My pending self-payment rebalancing attempt with a peer going offline due to emergency didn't immediately FC when the self-payment maturity hit < 0. Then LND determined a day later to FC the channel, but causing an overpayment of 12x. Assumption is, that the sweep bumper continued to increase the commit-fee, while payments-expiration-grace-period=10000h in lnd.conf kept the channel from force-closing.

Your environment

  • version of lnd: lnd version 0.18.2-beta commit=v0.18.2-beta
  • which operating system (uname -a on *Nix): Linux debian-nuc 6.1.0-18-amd64 Fix name typo in README #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
  • version of btcd, bitcoind, or other backend: Bitcoin Core RPC client version v26.0.0
  • any other relevant environment details: payments-expiration-grace-period=10000h

Steps to reproduce

Logs attached where we can reproduce it.
I would assume to reproduce, we would need a peer, send a self-payment, peer goes offline, and observe LND logs behaviour handling the sweeper fees

Expected behaviour

When within the self-payment grace period, the sweeper should not bump the fee but steady state until leaving the period window.

Actual behaviour

https://mempool.space/tx/abc65c90a8b00ab6418a0ddb304269fa694cc2b4bf62c95aa1e286abc52a9e65
Fee rate 59.5 sat/vB where a Fee rate of 4 sat/vB would have been sufficient.

PinsLNN_01_fc-2024-10-15.log

        {
            "channel":  {
                "remote_node_pub":  "0236333aacf54604abf218af6ab116d4fe6f16e527502e0019123d0cc3c7a8a194",
                "channel_point":  "c97045b99e6ef5f45a26086037536f6639251f5477616760e5ab47c437569ffe:0",
                "capacity":  "6000000",
                "local_balance":  "4893716",
                "remote_balance":  "1060927",
                "local_chan_reserve_sat":  "0",
                "remote_chan_reserve_sat":  "0",
                "initiator":  "INITIATOR_LOCAL",
                "commitment_type":  "ANCHORS",
                "num_forwarding_packages":  "0",
                "chan_status_flags":  "",
                "private":  false,
                "memo":  ""
            },
            "closing_txid":  "abc65c90a8b00ab6418a0ddb304269fa694cc2b4bf62c95aa1e286abc52a9e65",
            "limbo_balance":  "4919632",
            "maturity_height":  865734,
            "blocks_til_maturity":  -6,
            "recovered_balance":  "0",
            "pending_htlcs":  [
                {
                    "incoming":  true,
                    "amount":  "25586",
                    "outpoint":  "abc65c90a8b00ab6418a0ddb304269fa694cc2b4bf62c95aa1e286abc52a9e65:2",
                    "maturity_height":  865539,
                    "blocks_til_maturity":  -201,
                    "stage":  1
                }
            ],
            "anchor":  "LIMBO"
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions