Skip to content

Dual-funding can leave peers unable to reconnect #8822

@rustyrussell

Description

@rustyrussell

This comes from a test flake in tests/test_connection.py::test_disconnect_opener.

l1's dualopend sends the final TX_COMPLETE, but l2 never gets it:

lightningd-d DEBUG   0266e...-lightningd: peer_disconnected
lightningd-2 INFO    0266e...-dualopend-chan#6: Peer connection lost
lightningd-2 INFO    0266e...-chan#6: Unsaved peer failed. Deleting channel.
lightningd-1 DEBUG   022d...-connectd: dev_disconnect: -WIRE_TX_COMPLETE (WIRE_TX_COMPLETE)
lightningd-1 DEBUG   022d...-lightningd: peer_disconnected
lightningd-1 DEBUG   022d...-dualopend-chan#7: peer_out WIRE_TX_COMPLETE
lightningd-1 DEBUG   022d...-hsmd: Got WIRE_HSMD_SETUP_CHANNEL
lightningd-1 DEBUG   hsmd: Client: Received message 31 from client
lightningd-1 DEBUG   022d...-hsmd: Got WIRE_HSMD_SIGN_REMOTE_COMMITMENT_TX
lightningd-1 DEBUG   hsmd: Client: Received message 19 from client
lightningd-2 DEBUG   hsmd: Client: Received message 34 from client
lightningd-2 DEBUG   plugin-funder: Cleaning up inflights for peer id 0266e...
lightningd-1 DEBUG   plugin-funder: Cleaning up inflights for peer id 022d...
lightningd-2 DEBUG   plugin-funder: Cleaning up inflight for channel_id fb2019cd9d0aea6efbf4b04ea7e45c28a7672f3b49c1897bde3dc99902b04cb6
lightningd-1 DEBUG   022d...-dualopend-chan#7: signature 3044022028d44889ad8c19bb414f15508641f8702d7b2763d25f191da0f29e0463ee2884022042c0b568f3fe0844521920377da3ff26e968485496b9c602b74aab151b17c2ed01 on tx 02000000014727a12e5631ea1bc9bc8409da7d21ca82998f205d8af46175fe2e7acca615b401000000008d320d80024a010000000000002200208e6510028e2e5646687cb835a6426185f041f97fdc1af9641bec49500b74b35c45b0000000000000220020d7742bbf56789f78631e99e0d90a08d3e039992c099c147b3d0eb090ca5eb24614a9f820 using key 02195f7b6a1012ea8948664019d7430fb4050329064a0ba6803ec55408ee9f10cb
lightningd-1 DEBUG   022d...-dualopend-chan#7: billboard: channel open: commitment ready to send, sending channel to lightningd to save

On every successive reconnect, l1 tries to REESTABLISH the channel, l2 hangs up:

lightningd-1 2026-01-07T04:44:37.367Z DEBUG   022d...-dualopend-chan#7: peer_out WIRE_CHANNEL_REESTABLISH
lightningd-1 2026-01-07T04:44:37.367Z DEBUG   022d...-dualopend-chan#7: billboard: Sent reestablish, waiting for theirs
lightningd-2 2026-01-07T04:44:37.377Z DEBUG   0266e...-connectd: Activating for message WIRE_CHANNEL_REESTABLISH
lightningd-2 2026-01-07T04:44:37.377Z UNUSUAL 0266e...-lightningd: Unknown channel fb2019cd9d0aea6efbf4b04ea7e45c28a7672f3b49c1897bde3dc99902b04cb6 for WIRE_CHANNEL_REESTABLISH
lightningd-2 2026-01-07T04:44:37.377Z DEBUG   0266e...-lightningd: Telling connectd to send error 0011fb2019cd9d0aea6efbf4b04ea7e45c28a7672f3b49c1897bde3dc99902b04cb6002c556e6b6e6f776e206368616e6e656c20666f7220574952455f4348414e4e454c5f524545535441424c495348

One fix would be not to hang up after sending an error for a channel. But a real fix would be nice!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions