Return local channel alias in payment failures#2323
Conversation
pm47
left a comment
There was a problem hiding this comment.
Good catch!
I think I would have addressed this differently:
- always generate our
channel_updatewith our local alias or real scid depending on channel params (this is the fix to the present bug) - re-sign the
channel_updatewith remote alias in theonTransitionwithin theif (sendToPeer) {...}so we make it clear that using remote alias is the exception not the rule
That makes sense, it feels more consistent this way, I'll try it out. |
d65dad1 to
aa3fbc7
Compare
|
I've updated the PR to:
|
0cb89e3 to
416efb5
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2323 +/- ##
==========================================
- Coverage 84.71% 84.70% -0.02%
==========================================
Files 194 194
Lines 14633 14641 +8
Branches 612 589 -23
==========================================
+ Hits 12397 12402 +5
- Misses 2236 2239 +3
🚀 New features to boost your workflow:
|
We now use either our local alias or the real scid in the channel update that we store internally. When we send that channel update directly to our peer, we override it to use the remote alias when it makes sense.
There are multiple valid scids for public channels depending on the confirmation status of the funding tx. A payer may use either of these scids, and we must return the one they used in case of error.
416efb5 to
18ff971
Compare
c1c25ed to
794a287
Compare
We shouldn't need them since we don't add the real scid to the routing table when scid_alias is negotiated.
pm47
left a comment
There was a problem hiding this comment.
The router is left unchanged despite us using localAlias instead of remoteAlias for our own channel_update, because we resolve based on the channelId or the realScid:
https://github.com/ACINQ/eclair/blob/master/eclair-core/src/main/scala/fr/acinq/eclair/router/Validation.scala#L300
* Revert change to makeChannelUpdate * Improve zero-conf tests
The release introduces a few API changes: - channelbalances retrieves information about the balances of all local channels (#2196) - channelbalances and usablebalances return a shortIds object instead of a single shortChannelId (#2323) - stop stops eclair: please note that the recommended way of stopping eclair is simply to kill its process (#2233) - rbfopen lets the initiator of a dual-funded channel RBF the funding transaction (#2275) - listinvoices and listpendinginvoices now accept --count and --skip parameters to limit the number of retrieved items (#2474)
When using
option_scid_alias, we must be careful not to expose the real scid to remote payers. We never generate achannel_updatewith the real scid so this isn't a risk, but we're incorrectly returning the remote alias instead of the returning the local one (which should match the invoice).