Update RECONSTRUCT_HTLCS_FROM_CHANS_VERSION 5 -> 2
What changed, and why it matters
This commit changes a single internal version number constant from 5 to 2. It is a cleanup/refactoring change with no security relevance. The constant tracks which serialization format version of a Lightning node manager can reconstruct payment forwarding data from channel data. Lowering the number from 5 to 2 simply reflects that intermediate version bumps turned out not to be needed. There is no bug fix, no vulnerability patch, and no change to cryptographic or network behavior.
No security action required. Treat as normal maintenance/refactoring commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies RECONSTRUCT_HTLCS_FROM_CHANS_VERSION in lightning/src/ln/channelmanager.rs from 5 to 2. This constant is used during serialization/deserialization of ChannelManager to determine whether HTLC state must be reconstructed from per-channel data rather than read from legacy maps. The commit message states the previous value 5 was chosen to reserve version space, but the team later concluded intermediate bumps were unnecessary. The change is cosmetic/versioning only and does not alter parsing logic, bounds checking, or security-sensitive code paths.
Changed components
lightning/src/ln/channelmanager.rs serialization version constantInspect captured patch +1 / −1
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 40342d7..5a4f569 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -16616,7 +16616,7 @@ const MIN_SERIALIZATION_VERSION: u8 = 1;
//
// If 0.3 or 0.4 reads this manager version, it knows that the legacy maps were not written and
// acts accordingly.
-const RECONSTRUCT_HTLCS_FROM_CHANS_VERSION: u8 = 5;
+const RECONSTRUCT_HTLCS_FROM_CHANS_VERSION: u8 = 2;
impl_writeable_tlv_based!(PhantomRouteHints, {
(2, channels, required_vec),
Why this scored 15/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.