-
Notifications
You must be signed in to change notification settings - Fork 421
Invoice chanman utility #895
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
Invoice chanman utility #895
Conversation
Codecov Report
@@ Coverage Diff @@
## main #895 +/- ##
==========================================
- Coverage 90.38% 90.36% -0.02%
==========================================
Files 57 58 +1
Lines 29500 29505 +5
==========================================
- Hits 26663 26662 -1
- Misses 2837 2843 +6
Continue to review full report at Codecov.
|
TheBlueMatt
left a comment
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.
Looks good.
fec5fa5 to
7d5ebb2
Compare
78b8298 to
4d5f112
Compare
|
Can now be rebased after the merge of #893. |
b3d0434 to
5dfb86a
Compare
8cd714c to
5a478c7
Compare
lightning-invoice/src/lib.rs
Outdated
| L::Target: Logger, | ||
| { | ||
| // Marshall route hints. | ||
| let our_channels = channelmanager.list_usable_channels(); |
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.
IIUC this utility returns as routing hints the complete set of our channels, including the non-announced subset one ?
Sounds pretty harmful for privacy, maybe the utility should have a boolean all or otherwise a Vec<short_channel_id> to precise which ones to disclose ?
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.
I think this is the right default to this - in most cases if we're a "client" node we only have one or two channels anyway (and in non-"client" cases we have several channels that are public), and the "real" fix is to generate random short channel ids.
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.
Agree for the "client" node but for a big hub you will disclose all your private channels with spoke if you're also a merchant which is quite the case of a bunch of such nodes. Though opening an issue for now, we'll adjust in function of users feedback.
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.
Right, we ultimately need some heuristic of "we have > 5 public channels, we shouldn't include any route hints at all", probably.
ariard
left a comment
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.
Otherwise sounds good to me :)
5dd106d to
9ab3a9c
Compare
|
Oops, need to switch |
1e34c16 to
e2f81e3
Compare
3c58411 to
fbdb7a1
Compare
|
Gonna have lunch then come back to this |
c1f9f87 to
50c0a99
Compare
7794708 to
a614b9b
Compare
TheBlueMatt
left a comment
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.
Aside from Jeff's comments and #895 (comment) this LGTM.
a614b9b to
6173c2c
Compare
6173c2c to
a6a6130
Compare
a6a6130 to
8385915
Compare
|
Gah my bad, fixed |
This also allows the ChannelManager to track information for inbound payments to check the PaymentSecret on receive.
8385915 to
4c7be7e
Compare
TODO: testsBased on #893