Files
lnd/docs/release-notes/release-notes-0.20.1.md
T
Olaoluwa Osuntokun 56a7f45b99 graphdb: fix backwards-compat for channel edge feature deserialization
This commit fixes a backwards compatibility issue that prevented nodes
from upgrading from v0.19.x to v0.20.x.

In v0.19.x, channel edge features were serialized as raw feature bytes
without a length prefix. In v0.20.x (commit 2f2845dfc), the serialization
changed to use Features.Encode() which adds a 2-byte big-endian length
prefix before the feature bits. The deserialization code was updated to
use Features.Decode() which expects this length prefix.

When v0.20.x reads a database created by v0.19.x, Decode() tries to read
a length prefix that doesn't exist, causing an EOF error:

    unable to decode features: EOF

The fix adds a deserializeChanEdgeFeatures() helper that detects which
format is being read and decodes accordingly:

- New format (v0.20+): First 2 bytes encode the length of the remaining
  bytes. Detected when uint16(bytes[0:2]) == len(bytes)-2.

- Legacy format (pre-v0.20): Raw feature bits without length prefix.
  Uses DecodeBase256 with the known length.

The format detection is safe because in the legacy format, the first byte
always has at least one bit set (the serialization uses minimum bytes),
so the first two bytes can never encode a value equal to len-2.

Fixes #10528.
2026-02-03 09:12:04 -08:00

6.4 KiB

Release Notes

Bug Fixes

New Features

Functional Enhancements

RPC Additions

lncli Additions

Improvements

Functional Updates

  • Added panic recovery to the gossiper's message processing goroutines. This increases the robustness of the gossiper subsystem by allowing it to continue operating even if a logic error causes a panic during message processing. The recovery mechanism ensures dependencies are properly freed and logs the panic trace for debugging.

  • Improved confirmation scaling for cooperative closes to provide better reorg protection. Previously, cooperative closes required a minimum of 3 confirmations. Now, small channels only require 1 confirmation, while larger channels scale proportionally using the standard 0.16 BTC threshold (matching funding confirmation scaling).

RPC Updates

  • The EstimateRouteFee RPC now implements an LSP detection heuristic that probes up to 3 unique Lightning Service Providers when route hints indicate an LSP setup. The implementation returns worst-case (most expensive) fee estimates for conservative budgeting and includes griefing protection by limiting the number of probed LSPs. It enhances the previous LSP design by being more generic and more flexible.

lncli Updates

Breaking Changes

  • Increased MinCLTVDelta from 18 to 24 to provide a larger safety margin above the DefaultFinalCltvRejectDelta (19 blocks). This affects users who create invoices with custom cltv_expiry_delta values between 18-23, which will now require a minimum of 24. The default value of 80 blocks for invoice creation remains unchanged, so most users will not be affected. Existing invoices created before the upgrade will continue to work normally.

Performance Improvements

  • Added new Postgres configuration options db.postgres.channeldb-with-global-lock and db.postgres.walletdb-with-global-lock to allow fine-grained control over database concurrency. The channeldb global lock defaults to false to enable concurrent access, while the wallet global lock defaults to true to maintain safe single-writer behavior until the wallet subsystem is fully concurrent-safe.

  • Modified the query for IsPublicV1Node to use UNION ALL instead of OR conditions in the WHERE clause, improving performance when checking for public nodes especially in large graphs when using SQL backends.

Deprecations

Technical and Architectural Updates

BOLT Spec Updates

  • Enforce non-zero timestamps for channel_update (as required by BOLT 7) and node_announcement messages. Gossip messages with zero timestamps are now rejected. For channel_update messages, remote peers sending such invalid messages will have their ban score incremented.

Testing

Database

Code Health

Tooling and Documentation

Contributors (Alphabetical Order)

  • Abdulkbk
  • bitromortac
  • Olaoluwa Osuntokun
  • Ziggie