Skip to content

[bug]: cooperative closure stuck after failed fee negotiation #9224

@xmrk-btc

Description

@xmrk-btc

Background

I tried to cooperatively close a channel with this command
bin/lncli closechannel --sat_per_vbyte 3 --max_fee_rate 5 --delivery_addr bc1ppz3xa7efg3559qjgfw9ufhgt5z0e7yanr5yzgsjagh8cel6e377q248e6y 0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67 4
They start negotiating (see below), but the peer offers rather large fee, so my node ends the negotiation.

2024-10-26 17:59:50.179 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): initiating shutdown
2024-10-26 17:59:56.997 [INF] NANN: Announcing channel(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4) disabled [requested]
2024-10-26 17:59:59.704 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): sending shutdown message
2024-10-26 17:59:59.866 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): shutdown response received, entering fee negotiation
2024-10-26 17:59:59.866 [INF] CHCL: Ideal fee for closure of ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4) is: 450 sat (max_fee=750 sat)
2024-10-26 17:59:59.866 [INF] HSWC: ChannelLink(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): stopping
2024-10-26 17:59:59.879 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): proposing fee of 450 sat to close chan
2024-10-26 17:59:59.879 [INF] HSWC: ChannelLink(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): exited
2024-10-26 17:59:59.942 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): computing fee compromise, ideal=450, last_sent=450, remote_offer=8845
2024-10-26 17:59:59.942 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): proposing fee of 495 sat to close chan
2024-10-26 18:00:00.007 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): computing fee compromise, ideal=450, last_sent=495, remote_offer=7961
2024-10-26 18:00:00.008 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): proposing fee of 544 sat to close chan
2024-10-26 18:00:00.069 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): computing fee compromise, ideal=450, last_sent=544, remote_offer=7165
2024-10-26 18:00:00.070 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): proposing fee of 598 sat to close chan
2024-10-26 18:00:00.129 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): computing fee compromise, ideal=450, last_sent=598, remote_offer=6449
2024-10-26 18:00:00.129 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): proposing fee of 657 sat to close chan
2024-10-26 18:00:00.189 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): computing fee compromise, ideal=450, last_sent=657, remote_offer=5805
2024-10-26 18:00:00.190 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): proposing fee of 722 sat to close chan
2024-10-26 18:00:00.250 [INF] CHCL: ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): computing fee compromise, ideal=450, last_sent=722, remote_offer=5225
2024-10-26 18:00:00.250 [ERR] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): unable to process close msg: latest fee proposal exceeds max fee: 0.00000794 BTC > 0.00000750 BTC
2024-10-26 18:00:00.250 [INF] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): disconnecting 020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00@159.69.32.62:23252, reason: unable to process close msg: latest fee proposal exceeds max fee: 0.00000794 BTC > 0.00000750 BTC
2024-10-26 18:00:00.250 [ERR] RPCS: [closechannel] unable to close ChannelPoint(0f8c769434265108924bf2b48f4cc9ebd113836114477877076aac97e402bb67:4): unable to process close msg: latest fee proposal exceeds max fee: 0.00000794 BTC > 0.00000750 BTC
2024-10-26 18:00:00.250 [INF] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): unable to read message from peer: read next header: read tcp 192.168.1.161:53712->159.69.32.62:23252: use of closed network connection
2024-10-26 18:00:00.250 [ERR] RPCS: [/lnrpc.Lightning/CloseChannel]: unable to process close msg: latest fee proposal exceeds max fee: 0.00000794 BTC > 0.00000750 BTC

When the two nodes connect again, they again try to negotiate, with slightly higher fee, but not enough, so they fail again:

2024-10-26 18:00:02.390 [ERR] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): unable to process close msg: latest fee proposal exceeds max fee: 0.00000893 BTC > 0.00000864 BTC
2024-10-26 18:00:11.333 [ERR] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): unable to process close msg: latest fee proposal exceeds max fee: 0.00000893 BTC > 0.00000864 BTC
2024-10-26 18:00:21.793 [ERR] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): unable to process close msg: latest fee proposal exceeds max fee: 0.00000893 BTC > 0.00000864 BTC
2024-10-26 18:17:41.860 [ERR] PEER: Peer(020d0fdcc9cfca39aebc7b6fd5657cef4bd5287e571afd6317f0b0a8b4430e3c00): unable to process close msg: latest fee proposal exceeds max fee: 0.00000893 BTC > 0.00000864 BTC

Your environment

  • version of lnd: 0.18.3
  • which operating system (uname -a on *Nix): Debian 12
  • version of btcd, bitcoind, or other backend: bitcoind 0.28.0, mempool=300m
  • lnd.conf: coop-close-target-confs=24
  • bitcoind.estimatemode=ECONOMICAL

Expected behaviour

I'd like to change the bounds when the negotiation starts again. Ideally, I would be able to run lncli closechannel again for the same channel, with say --max_fee_rate 10, and the maximum of 10 sats/vB would be used in the next negotiation.

Although I wonder why the peer wants so high fee, whether it is misconfigured.

This happened to me twice today already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnintended code behaviourchannel closingRelated to the closing of channels cooperatively and uncooperatively

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions