Update static inv server OM TLVs to not conflict
What changed, and why it matters
This commit changes internal numeric identifiers (called TLV types) used by a new experimental Lightning feature called async payments. The old numbers accidentally overlapped with another feature's numbers, which only caused test failures when a specific configuration flag was enabled. The fix simply picks new, non-overlapping numbers. There is no evidence this caused real-world fund loss or could be exploited by an attacker.
No immediate security action required. Treat as a normal bug fix. If deploying async-payments code, ensure all nodes use a consistent version that includes this commit to avoid message-parsing ambiguity. Monitor the eventual bLIP that documents the final TLV numbers.
Security signals we found
TLV type collision between experimental async-payments messages and DNS resolver messages
Collision manifested as test failures, not as a runtime protocol vulnerability
Fix is a numeric reassignment with no cryptographic or logic changes
Commit message explicitly frames issue as a test failure, not a security flaw
Evidence from the diff
The patch updates four onionmsg_tlv type constants in lightning/src/onion_message/async_payments.rs from the 65538-65544 range to the 75540-75546 range. The previous values conflicted with DNS resolver onion-message TLVs, breaking tests under --cfg=async_payments. The new values are temporary placeholders (bumped by 10,000) until they can be formally documented in a bLIP. Other related constants (HELD_HTLC_AVAILABLE_TLV_TYPE, RELEASE_HELD_HTLC_TLV_TYPE) are left unchanged, indicating the conflict was limited to the static invoice-server path.
Changed components
lightning/src/onion_message/async_payments.rsStatic invoice server onion message TLV typesExperimental async payments feature (behind cfg=async_payments)Inspect captured patch +4 / −4
diff --git a/lightning/src/onion_message/async_payments.rs b/lightning/src/onion_message/async_payments.rs
index 1f13e68..52badd7 100644
--- a/lightning/src/onion_message/async_payments.rs
+++ b/lightning/src/onion_message/async_payments.rs
@@ -19,10 +19,10 @@ use crate::prelude::*;
use crate::util::ser::{Readable, ReadableArgs, Writeable, Writer};
// TLV record types for the `onionmsg_tlv` TLV stream as defined in BOLT 4.
-const OFFER_PATHS_REQ_TLV_TYPE: u64 = 65538;
-const OFFER_PATHS_TLV_TYPE: u64 = 65540;
-const SERVE_INVOICE_TLV_TYPE: u64 = 65542;
-const INVOICE_PERSISTED_TLV_TYPE: u64 = 65544;
+const OFFER_PATHS_REQ_TLV_TYPE: u64 = 75540;
+const OFFER_PATHS_TLV_TYPE: u64 = 75542;
+const SERVE_INVOICE_TLV_TYPE: u64 = 75544;
+const INVOICE_PERSISTED_TLV_TYPE: u64 = 75546;
const HELD_HTLC_AVAILABLE_TLV_TYPE: u64 = 72;
const RELEASE_HELD_HTLC_TLV_TYPE: u64 = 74;
Why this scored 18/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.