Revert "lightningd: add dev-uniform-padding flag to lightningd"
What changed, and why it matters
This commit removes a developer-only experimental feature called --dev-uniform-padding that padded peer network messages to fixed 1460-byte chunks. It is a clean revert of an earlier feature addition and does not fix any known security vulnerability. The change simply deletes the option and its wiring; no bug or exploit is present in the diff.
No security action required. Treat as ordinary feature removal. If the revert was motivated by an undisclosed issue, monitor project release notes and mailing lists for follow-up disclosure.
Security signals we found
No security-relevant bug fix present
Removal of an experimental developer-only privacy feature
No changes to authentication, encryption, parsing, or memory handling
Evidence from the diff
The commit reverts 5cb8ac43aaa7d2fb49b8a3eedbb4267b9858ceb3, which had introduced a developer-mode flag dev-uniform-padding intended as a traffic-analysis defence by padding outgoing peer messages to uniform 1460-byte segments. The revert removes the bool field from struct daemon and struct lightningd, removes the command-line option registration, removes the value from the connectd init wire message, and resets default initialization. There is no patch to cryptographic, network, or consensus code and no correction of unsafe behavior.
Changed components
lightningd/options.clightningd/lightningd.clightningd/lightningd.hlightningd/connect_control.cconnectd/connectd.cconnectd/connectd.hInspect captured patch +4 / −18
diff --git a/connectd/connectd.c b/connectd/connectd.c
index eb488ec2..14dbb36b 100644
--- a/connectd/connectd.c
+++ b/connectd/connectd.c
@@ -1689,9 +1689,8 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
&dev_throttle_gossip,
&daemon->dev_no_reconnect,
&daemon->dev_fast_reconnect,
- &dev_limit_connections_inflight,
- &daemon->dev_keep_nagle,
- &daemon->dev_uniform_padding)) {
+ &dev_limit_connections_inflight,
+ &daemon->dev_keep_nagle)) {
/* This is a helper which prints the type expected and the actual
* message, then exits (it should never be called!). */
master_badmsg(WIRE_CONNECTD_INIT, msg);
@@ -2566,7 +2565,6 @@ int main(int argc, char *argv[])
daemon->dev_exhausted_fds = false;
daemon->dev_lightningd_is_slow = false;
daemon->dev_keep_nagle = false;
- daemon->dev_uniform_padding = false;
/* We generally allow 1MB per second per peer, except for dev testing */
daemon->gossip_stream_limit = 1000000;
daemon->scid_htable = new_htable(daemon, scid_htable);
diff --git a/connectd/connectd.h b/connectd/connectd.h
index 7616a185..ea012f6a 100644
--- a/connectd/connectd.h
+++ b/connectd/connectd.h
@@ -309,9 +309,6 @@ struct daemon {
/* Allow localhost to be considered "public", only with --developer */
bool dev_allow_localhost;
- /* Pad outgoing messages to uniform 1460-byte segments (traffic analysis defence) */
- bool dev_uniform_padding;
-
/* How much to gossip allow a peer every 60 seconds (bytes) */
size_t gossip_stream_limit;
diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c
index f13ac32b..e95a04db 100644
--- a/lightningd/connect_control.c
+++ b/lightningd/connect_control.c
@@ -726,9 +726,8 @@ int connectd_init(struct lightningd *ld)
ld->dev_throttle_gossip,
!ld->reconnect,
ld->dev_fast_reconnect,
- ld->dev_limit_connections_inflight,
- ld->dev_keep_nagle,
- ld->dev_uniform_padding);
+ ld->dev_limit_connections_inflight,
+ ld->dev_keep_nagle);
subd_req(ld->connectd, ld->connectd, take(msg), -1, 0,
connect_init_done, NULL);
diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c
index 3a669e1b..0241b992 100644
--- a/lightningd/lightningd.c
+++ b/lightningd/lightningd.c
@@ -150,7 +150,6 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
ld->dev_strict_forwarding = false;
ld->dev_limit_connections_inflight = false;
ld->dev_keep_nagle = false;
- ld->dev_uniform_padding = false;
/*~ We try to ensure enough fds for twice the number of channels
* we start with. We have a developer option to change that factor
diff --git a/lightningd/lightningd.h b/lightningd/lightningd.h
index 3a00f9f3..9edba38d 100644
--- a/lightningd/lightningd.h
+++ b/lightningd/lightningd.h
@@ -369,9 +369,6 @@ struct lightningd {
/* Tell connectd we don't want TCP_NODELAY */
bool dev_keep_nagle;
- /* Pad outgoing messages to uniform 1460-byte segments (traffic analysis defence) */
- bool dev_uniform_padding;
-
/* tor support */
struct wireaddr *proxyaddr;
bool always_use_proxy;
diff --git a/lightningd/options.c b/lightningd/options.c
index 88148f3e..d9ef8e44 100644
--- a/lightningd/options.c
+++ b/lightningd/options.c
@@ -952,10 +952,6 @@ static void dev_register_opts(struct lightningd *ld)
opt_set_bool,
&ld->dev_keep_nagle,
"Tell connectd not to set TCP_NODELAY.");
- clnopt_noarg("--dev-uniform-padding", OPT_DEV,
- opt_set_bool,
- &ld->dev_uniform_padding,
- "Pad all outgoing peer messages to uniform 1460-byte segments");
/* This is handled directly in daemon_developer_mode(), so we ignore it here */
clnopt_noarg("--dev-debug-self", OPT_DEV,
opt_ignore,
Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.