-
Notifications
You must be signed in to change notification settings - Fork 492
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
Drop the required channel_update
in failure onions
#1163
Drop the required channel_update
in failure onions
#1163
Conversation
As noted previously, `channel_update`s in the onion failure packets are massive gaping fingerprintign vulnerabilities - if a node applies them in a publicly-visible way the err'ing node can easily identify the sender of an HTLC. While the updates are still arguably marginally useful for nodes to use in their pathfinding local to retires of the same payment, this too will eventually become an issue with PTLCs. Further, we shouldn't be letting nodes get away with delaying payments by failing to announce the latest channel parameters or enforcing new parameters too soon, so treating the node as having indicated insufficient liquidity (or other general failure) is appropriate in the general case. Thus, here, we begin phasing out the `channel_update` field, requiring nodes ignore it entirely and making it optional (though obviously nodes should still provide it for some time).
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.
ACK. Note that there are already nodes out there that haven't been setting the channel_update
in temporary_channel_failure
(for years...), so implementations are already supposed to be somewhat resilient to this.
lightning/bolts#1163 makes the channel update in onion failures optional. One reason for this change is that it can be a privacy issue: by applying a `channel_update` received from an payment attempt, you may reveal that you are the sender. Another reason is that some nodes have been omitting that field for years (which was arguably a bug), and it's better to be able to correctly handle such failures.
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.
ACK e40ecff
I was completely missing this privacy leak
@@ -1080,12 +1080,7 @@ The top byte of `failure_code` can be read as a set of flags: | |||
* 0x8000 (BADONION): unparsable onion encrypted by sending peer | |||
* 0x4000 (PERM): permanent failure (otherwise transient) | |||
* 0x2000 (NODE): node failure (otherwise channel) | |||
* 0x1000 (UPDATE): new channel update enclosed |
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.
+1 for this section, it's already optional today, but the spec still states it as being mandatory.
- MAY treat the `channel_update` as invalid. | ||
- otherwise: | ||
- SHOULD apply the `channel_update`. | ||
- MAY queue the `channel_update` for broadcast. |
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.
We can also remove just this line.
- if `channel_update` should NOT have caused the failure: | ||
- MAY treat the `channel_update` as invalid. | ||
- otherwise: | ||
- SHOULD apply the `channel_update`. |
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.
This can also be a MAY
.
lightning/bolts#1163 makes the channel update in onion failures optional. One reason for this change is that it can be a privacy issue: by applying a `channel_update` received from an payment attempt, you may reveal that you are the sender. Another reason is that some nodes have been omitting that field for years (which was arguably a bug), and it's better to be able to correctly handle such failures.
Closing in favor of #1173 |
As noted previously,
channel_update
s in the onion failure packets are massive gaping fingerprintign vulnerabilities - if a node applies them in a publicly-visible way the err'ing node can easily identify the sender of an HTLC.While the updates are still arguably marginally useful for nodes to use in their pathfinding local to retires of the same payment, this too will eventually become an issue with PTLCs. Further, we shouldn't be letting nodes get away with delaying payments by failing to announce the latest channel parameters or enforcing new parameters too soon, so treating the node as having indicated insufficient liquidity (or other general failure) is appropriate in the general case.
Thus, here, we begin phasing out the
channel_update
field, requiring nodes ignore it entirely and making it optional (though obviously nodes should still provide it for some time).