-
Notifications
You must be signed in to change notification settings - Fork 385
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
Blinded paths with unannounced introduction nodes #3132
Blinded paths with unannounced introduction nodes #3132
Conversation
When creating blinded paths for receiving onion messages, allow using the recipient's only peer as the introduction node when the recipient is unannounced. This allows for sending messages without going through an intermediary, which is useful for testing or when only connected to an LSP with an empty NetworkGraph.
When creating blinded paths for receiving onion payments, allow using the recipient's only peer as the introduction node when the recipient is unannounced. This allows for sending payments without going through an intermediary, which is useful for testing or when only connected to an LSP with an empty NetworkGraph.
When using advance_path_by_one when we are the introduction node, any error will result having the first hop of the input blinded path removed. Instead, only remove the first hop on success. Otherwise, the path will be invalid.
Similar to blinded paths for onion messages, if given a blinded payment path where we are the introduction node, the path must be advanced by one in order to use it.
DefaultRouter will ignore blinded paths where the sender is the introduction node. Similar to message paths, advance such paths by one so that payments may be sent to them.
When creating blinded paths, introduction nodes are limited to peers with at least three channels to prevent easily guessing the recipient. Relax this check when the recipient is unannounced since they won't be in the NetworkGraph.
2046b4a
to
c1eda4b
Compare
.map(|details| details.counterparty.node_id) | ||
.map(|node_id| first_hops | ||
.iter() | ||
.skip(1) |
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: you dont need to skip this its always equal :)
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.
That's why I'm skipping it :)
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
When creating blinded paths for receiving onion messages or payments, allow using the recipient's only peer as the introduction node when the recipient is unannounced. This allows for sending messages or payments without going through an intermediary, which is useful for testing or when only connected to an LSP with an empty
NetworkGraph
.Also add support for paying through a
BlindedPath
where we are the introduction node.Fixes #2952.