ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.85k stars 901 forks source link

`fundchannel_cancel` hangs indefinitely on a peer's RBF'd second channel in `CHANNELD_AWAITING_LOCKIN` state with first channel in `CHANNELD_NORMAL` state #7785

Open whitslack opened 4 hours ago

whitslack commented 4 hours ago

Issue and Steps to Reproduce

  1. Have one channel in CHANNELD_NORMAL state with a peer.
  2. Propose to fund a second channel with that same peer using fundchannel_start.
  3. Establish the second channel using fundchannel_complete.
  4. Broadcast the signed funding transaction with a low fee rate.
  5. Propose to fund a channel with some other peer using fundchannel_start.
  6. Construct a transaction to fund the channel with the second peer, spending the same coin(s) as would be spent by the transaction of step 3 but using a higher fee rate.
  7. Establish the channel with the second peer using fundchannel_complete.
  8. Broadcast the second signed funding transaction, which replaces the first transaction.
  9. Wait for confirmation of the second transaction.
  10. Attempt to cancel the funding of the channel with the first peer using fundchannel_cancel.
  11. fundchannel_cancel never returns.

getinfo output

This is with CLN 24.08.2.

whitslack commented 3 hours ago

Might be a red herring. The first peer was connected inbound to me via a Tor exit node. (I have no Tor service.) I disconnected the peer, and it has yet to reconnect, so maybe it went offline but the Tor exit node didn't. Still, I suspect something might not be plumbed up quite right if fundchannel_cancel never notices that the peer isn't responding.