Skip to content

Gate uniform message padding behind --dev-uniform-padding#8997

Open
sangbida wants to merge 4 commits intoElementsProject:masterfrom
sangbida:sangbida/gate-padded-pings-v2
Open

Gate uniform message padding behind --dev-uniform-padding#8997
sangbida wants to merge 4 commits intoElementsProject:masterfrom
sangbida:sangbida/gate-padded-pings-v2

Conversation

@sangbida
Copy link
Copy Markdown
Collaborator

CLN 26.04rc1 introduced uniform message padding, which pads outgoing pings to prevent traffic analysis. Per BOLT #1, a num_pong_bytes >= 65532 means the recipient must not reply with a pong — it is a valid no-reply ping. However, LND does not comply with this part of the spec (they have very recently fixed this though) so to maintain interoperability between lightning implementations this feature is being gated behind an experimental flag for now.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

This boolean allows lightningd and connectd to be on the same page on whether the uniform padding experimental flag is enabled.
Uniform padding (sending all messages as 1460-byte chunks) breaks
peers running LND-based nodes: LND disconnects on receiving a
ping(num_pong_bytes=65535) with "pong bytes exceeded" instead of
ignoring it as required by BOLT ElementsProject#1.
Gate the feature behind --dev-uniform-padding so it is opt-in rather
than forced on all connections. Nodes that only peer with CLN can
enable it for the traffic analysis defence.
Changelog-Changed: uniform message padding is now opt-in via the --dev-uniform-padding flag.
&daemon->dev_fast_reconnect,
&dev_limit_connections_inflight,
&daemon->dev_keep_nagle)) {
&dev_limit_connections_inflight,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format should be kept for these lines just as the lines above.

Copy link
Copy Markdown
Collaborator

@Lagrang3 Lagrang3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, this solves the issue #8978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants