ElementsProject / lightning

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

Interop: INVALID_ONION_HMAC #7347

Closed JssDWt closed 4 months ago

JssDWt commented 4 months ago

Background

There is an interop issue with LND that causes INVALID_ONION_HMAC errors. It consistently reproduces with the following setup:

LND sender -> LND routing node -> CLN routing node -> CLN recipient

It does NOT reproduce with

LND issue

I added this issue in the LND repository too, see there for all details, including logs: https://github.com/lightningnetwork/lnd/issues/8785

darioAnongba commented 4 months ago

Hi all, we're the ones getting the bug in production in case I can be of any help. This issue is preventing affected nodes running on Greenlight infrastructure to receive payments from Alby or Blink (only ones tested so far).

endothermicdev commented 4 months ago

It looks like the presence of a route hint in the invoice is leading LND to create a legacy onion payload for the intermediate CLN node... which we removed support for two years ago. @rustyrussell has drafted a patch to convert the legacy payload to a TLV, which will allow the htlc to be processed normally. We'll get this in the 24.05 release. Thanks for the report!

JssDWt commented 4 months ago

Also it looks like the node announcement wasn't seen by the sender, which seems related to https://github.com/ElementsProject/lightning/issues/7276