Closed TonyGiorgio closed 1 year ago
Yep, we only support zero fee anchors for zero conf channels. Zero fee anchors (as they're much safer) are the future!
2023-04-26 22:37:03.734 [WRN] CHAC: Unhandled commitment type in channel acceptor request: &{map[12:{} 46:{}]} 2023-04-26 22:37:03.735 [ERR] FNDG: channel type negotiation failed: requested channel type not supported
We should improve the logging here though.
Yep, we only support zero fee anchors for zero conf channels. Zero fee anchors (as they're much safer) are the future!
2023-04-26 22:37:03.734 [WRN] CHAC: Unhandled commitment type in channel acceptor request: &{map[12:{} 46:{}]} 2023-04-26 22:37:03.735 [ERR] FNDG: channel type negotiation failed: requested channel type not supported
We should improve the logging here though.
I don't really get it though, because I could open up a zero conf channel with the previous version of CLN. Meaning that LND does support these zero conf channels without anchors. Seems like it's just a channel flagging concern, in which case I'll probably have to go back to CLN to tell them to stop sending over those flags?
And it was my understanding that LND won't open non-anchor channels but should be accepting them from others like the callouts with LDK specify in the original zero conf channel feature PR.
@Roasbeef got this comment:
the spec specifies that zero conf should require scid aliases too, however the CoreLN interpretation was it'd be ok to be optional, which was fixed in the latest release. However lnd seems not to like mandatory scid aliases causing connections to be dropped
I'm struggling to find where the issue is between the two. You were mentioning zero fee anchors but it sounds like this might be more related to flags? Can you help me understand that?
@Roasbeef got this comment:
the spec specifies that zero conf should require scid aliases too, however the CoreLN interpretation was it'd be ok to be optional, which was fixed in the latest release. However lnd seems not to like mandatory scid aliases causing connections to be dropped
I'm struggling to find where the issue is between the two. You were mentioning zero fee anchors but it sounds like this might be more related to flags? Can you help me understand that?
Looks like that's in response to this: https://twitter.com/Snyke/status/1659544009037971456?s=20
I believe he is incorrect. LND will happy acknowledge channels with ScidAliasRequired
, but only if they are at least signaling AnchorsZeroFeeHtlcTxRequired
.
It sounds like it was a bug that CLN was was passing ScidAliasOptional
before, and perhaps a bug that LND was allowing ScidAliasOptional
channels to be opened to it without AnchorsZeroFeeHtlcTxRequired
.
So in order for CLN to open zero conf channels again with LND, then there's a few options:
ScidAliasOptional
instead of ScidAliasRequired
until compatibility is met.AnchorsZeroFeeHtlcTxRequired
for zero conf channelsScidAliasRequired
and StaticRemoteKeyRequired
channel without AnchorsZeroFeeHtlcTxRequired
Between @Roasbeef or @cdecker I'm not sure who will budge here, I don't see any way around this protocol incompatibility between the two implementations.
So just to clarify the current state of things:
lnd
will only accept zero conf channels that also have anchor zero fee tx:
channel_type
is set in the open channel message and feature bit present, we'll employ the same behavior above.
channel_type
is preferable as, then the responder knows exactly what they're getting into. This allows the channel acceptor to screen these channel types and reject them early. Some of the other implementers disagree with this, and don't send the type, instead relying on the remote party to respond with a min depth of zero. channel_type
was used universally as designed, this wouldn't be necessary in most cases. Once again, lnd
's behavior here has not changed.
Also zero conf and scid alias are distinct: you can open a static channel with scid alises np, but not also with zero conf (which also requires scid alias in order to be useable).
Returning to @TonyGiorgio's scenario in the OP: it looks like you're having lnd
accept those channels from CLN. AFAICT, those channels wouldn't actually show up as zero conf from lnd's PoV if you do listchannels
. As the responder, only if lnd
sends min accept depth of zero will it "upgrade". This isn't done by default, and can only be done with a custom channel acceptor. AFAICT, you're doing this and responding with a depth of zero.
You correctly identified above that we don't explicitly support ScidAliasRequired
+ StaticRemoteKeyRequired
, rationale is stated as above: to push people towards the most secure channel type. Support is nearly universal, I think within a few months, we'll be able to flip it to default as we desire.
With all that said, the error you're seeing is a bit further in the chain at: explicitNegotiateCommitmentType
. We have a PR fixing a bug in that area, unrelated to this. I think we'd accept a PR to extend that to add the extra case for alias+static key. As mentioned above, I don't think accepting such channels is wise as you may never be able to close them, but I think y'all understand the risks.
Thanks for the run down @Roasbeef. This is helpful in understanding what's going on here. I hear you on anchor channels and I'm excited for them to be more widespread. Definitely not asking to regress that.
IIUC, to achieve cross compat, y'all have created a side signalling protocol to negotiate up front that the channel will be zero conf
We had previously had something like this but have since removed it.
This isn't done by default, and can only be done with a custom channel acceptor.
That is correct that we run a channel acceptor to facilitate this response of a zero depth.
I appreciate willingness to work with this solution until we're at a fully deployed state of zero fee anchor channels. To make sure I understand, would it be best to open a PR into #7177 or master?
I appreciate willingness to work with this solution until we're at a fully deployed state of zero fee anchor channels. To make sure I understand, would it be best to open a PR into #7177 or master?
I would prefer a separate PR, as this issue seems unrelated to #7177.
@morehouse sounds good. I just opened a new PR for this into master.
@TonyGiorgio @Roasbeef @morehouse - It appears this compatibility issue is fixed in the latest CoreLN Version (https://github.com/ElementsProject/lightning/releases/tag/v23.05.1). See PR (https://github.com/ElementsProject/lightning/pull/6304).
We've tested that this does fix the issue and this version of CoreLN is able to open zero conf channels into LND once again. So that fixes our issue. The question now is; what do we do with #7740? I'm in favor of closing it as the superior solution was reached and this subpar solution is no longer necessary. Do we have any objections to that?
Thanks!
I don't think https://github.com/ElementsProject/lightning/pull/6304 is a "superior solution"; it seems more like a hack to maintain CLN's previous (spec noncompliant) behavior when doing zero-conf between CLN and LND. I think the better solution is to make LND accept the specific channel type when it is explicitly negotiated (via channel_type
), since LND seems to implicitly do SCID aliases anyway.
That said, CLN is working on zero fee anchors, so probably not a big deal if we just wait for that and don't fix things on the LND side. As all implementations start to support modern channel types, we may even want to reduce the channel types we support (to simplify code and protect users).
@morehouse Yeah I probably used words improperly there, haha. I was mainly meaning not supporting a less-ideal channel type in LND and instead wait for everyone to support the more preferred channel type.
@gkrizek based on the comments above, I cleared the milestone and closed this issue. Feel free to reopen if you think otherwise.
Issue and Steps to Reproduce
Sometime since CLN 12.0, CLN no longer opens zero conf channels to LND.
I have a CLN pinned to that commit and I have one that's on the v23.05rc2.
Both CLN's can open up zero conf channels just fine to LDK and CLN nodes. However, I'm trying to understand what might be the issue on LND's side. Odds are there's some issue on one side or another that I need to get to the bottom of, I have cross posted this to CLN here: https://github.com/ElementsProject/lightning/issues/6208
CLN 12.0
LND v0.16.1 (working):
CLN v23.05rc2
LND (not working):
CLN logs:
The thing that stands out is:
When I look at the LND switch case that handles that, I do not see one that just handles those two channel type features: https://github.com/lightningnetwork/lnd/blob/fdc1ae9d57326cc82899e4c76d5069b14a764b96/chanacceptor/rpcacceptor.go#L274-L346
Being just
StaticRemoteKeyRequired
&ScidAliasRequired
.Question for LND:
StaticRemoteKeyRequired
&ScidAliasRequired
?