-
Notifications
You must be signed in to change notification settings - Fork 2.2k
routing: clean-up & fix blinded path incoming chained channel logic #9925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
routing: clean-up & fix blinded path incoming chained channel logic #9925
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
ffde0e1
to
371d45c
Compare
cc @MPins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice fix 🎉 (just have a question)
if _, ok := channelIDs[node1Vertex]; !ok { | ||
channelIDs[node1Vertex] = map[route.Vertex]uint64{} | ||
} | ||
channelIDs[node1Vertex][node2Vertex] = channelID | ||
|
||
if _, ok := channelIDs[node2Vertex]; !ok { | ||
channelIDs[node2Vertex] = map[route.Vertex]uint64{} | ||
} | ||
channelIDs[node2Vertex][node1Vertex] = channelID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this could be error-prone if parallel channels were added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed - note, however, that this is using a pre-existing map. So i think it's fine for now since this isnt introducing a new helper, it just ensures that the existing helper is populated properly.
If we run into an issue in future, we can update the helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvements 🫡, have two open questions.
@ellemouton, remember to re-request review from reviewers when ready |
Here we add some more comments and a bit of code clean up to the `findBlindedPaths` function. No logic is changed here.
Add a helper so that we can refer to channels by using the aliases of the nodes that own the channel instead of needing to use the raw channel ID.
This is just in preparation for the next commit. The test will be cleaned up more after a bug is fixed.
Improve the readability of the existing test.
Here we fix a bug which would not include the selected incoming blinded path chain from being included in the selected path set if it meets the minimum length requirement. The appropriate unit test and itest is updated to demonstrate the fix.
Cover more cases for the incoming chained channel feature.
371d45c
to
a4459cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🧹
As promised in review of this PR, this PR addresses the remaining
comments I had. It also fixes a bug that was introduced in that PR. See commit messages for details.