-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
This may be an old bug, I saw it while testing against the testnet.yalls.org node:
INFO [lightning::ln::peer_handler : /home/matt/.cargo/git/checkouts/rust-lightning-61cf011b3b289b3b/7d6b98f/lightning/src/ln/peer_handler.rs, 629] Received peer Init message: data_loss_protect: supported, initial_routing_sync: not requested, upfront_shutdown_script: supported, unkown local flags: present, unknown global flags: present
...
TRACE [lightning::ln::peer_handler : /home/matt/.cargo/git/checkouts/rust-lightning-61cf011b3b289b3b/7d6b98f/lightning/src/ln/peer_handler.rs, 605] Received message of type 36 from 027455aef8453d92f4706b560b61527cc217ddf14da41770e8ed6607190a1851b8
TRACE [lightning::ln::channelmanager : /home/matt/.cargo/git/checkouts/rust-lightning-61cf011b3b289b3b/7d6b98f/lightning/src/ln/channelmanager.rs, 2225] Closing channel 51eb6695576cac1e3fb3a829b6b93e86f61d121dc59a5952da048138df33a34a due to Close-required error: Peer sent funding_locked when we needed a channel_reestablish
...
TRACE [lightning::ln::peer_handler : /home/matt/.cargo/git/checkouts/rust-lightning-61cf011b3b289b3b/7d6b98f/lightning/src/ln/peer_handler.rs, 605] Received message of type 136 from 027455aef8453d92f4706b560b61527cc217ddf14da41770e8ed6607190a1851b8
While the spec doesn't call it out explicitly, its somewhat nonsensical to send the funding_locked before the channel_reestablish:
if next_commitment_number is 1 in both the channel_reestablish it sent and received:
MUST retransmit funding_locked.
otherwise:
MUST NOT retransmit funding_locked.
as the first text there refers to the channel_reestablish in the past tense, and, really, why would you send a message about a channel before reestablishing the channel.
arik-so, valentinewallace and OvertormentOvertorment