funding: require explicit channel type in all negotiations - #11064
funding: require explicit channel type in all negotiations #11064NishantBansal2003 wants to merge 1 commit into
Conversation
🔴 PR Severity: CRITICAL
🔴 Critical (1 file)
🟢 Low (1 file)
AnalysisThis PR changes To override, add a |
|
We should remove implicit channel-type negotiation instead of gating this validation on Please require |
|
When removing the implicit negotiation paths, we should keep the backward-compatibility implications in mind. In particular, removing implicit negotiation should be separate from removing the Continuing to advertise bit 44 allows older LND versions that understand explicit channel types to enter their explicit path and send/echo I suggest always requiring, sending, and echoing |
Move from optional implicit negotiation to mandatory explicit channel type in OpenChannel and AcceptChannel. The returned ChannelType is now always non-nil. Channel type is required in all negotiations now. We only fallback to a default channel type when the RPC caller does not explicitly specify one. Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
686650d to
f781d03
Compare
Wanted to do that in the first place, since all the other implementations currently do this, but I was unsure why it wasn’t done in: #9637. Anyway, in the latest commit, I did the following:
|
LND allows `open_channel` with an omitted `channel_type`, violating BOLT 2 even though it signals the required `option_channel_type` feature bit. This will be tracked upstream and will be suppressed until fixed. see: lightningnetwork/lnd#11064 Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
LND allows `open_channel` with an omitted `channel_type`, violating BOLT 2 even though it signals the required `option_channel_type` feature bit. This will be tracked upstream and will be suppressed until fixed. see: lightningnetwork/lnd#11064 Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
Currently, BOLT assumes
ExplicitChannelType, and LND sends it as required (#9637). However, when receiving anOpenChannelfrom peer, LND doesn’t enforce an explicitChannelTypeand falls back to implicit negotiation, even though both peers have negotiatedExplicitChannelType. According to BOLT 2, I think we should fail the funding flow ifChannelTypeis omitted when both peers have negotiatedExplicitChannelType.