/ docs / release-notes / release-notes-0.20.0.md
release-notes-0.20.0.md
  1  # Release Notes
  2  - [Bug Fixes](#bug-fixes)
  3  - [New Features](#new-features)
  4      - [Functional Enhancements](#functional-enhancements)
  5      - [RPC Additions](#rpc-additions)
  6      - [lncli Additions](#lncli-additions)
  7  - [Improvements](#improvements)
  8      - [Functional Updates](#functional-updates)
  9      - [RPC Updates](#rpc-updates)
 10      - [lncli Updates](#lncli-updates)
 11      - [Breaking Changes](#breaking-changes)
 12      - [Performance Improvements](#performance-improvements)
 13      - [Deprecations](#deprecations)
 14  - [Technical and Architectural Updates](#technical-and-architectural-updates)
 15      - [BOLT Spec Updates](#bolt-spec-updates)
 16      - [Testing](#testing)
 17      - [Database](#database)
 18      - [Code Health](#code-health)
 19      - [Tooling and Documentation](#tooling-and-documentation)
 20  
 21  # Bug Fixes
 22  
 23  - [Fixed premature wallet
 24    rescanning](https://github.com/lightningnetwork/lnd/pull/10280) that occurred
 25    when a wallet was created during header sync. This issue primarily affected
 26    neutrino chain backends. The fix ensures headers are fully synced before
 27    starting the chain notifier backend.
 28  
 29  - Fixed potential update inconsistencies in node announcements [by creating
 30    a shallow copy before modifications](
 31    https://github.com/lightningnetwork/lnd/pull/9815). This ensures the original
 32    announcement remains unchanged until the new one is fully signed and
 33    validated.
 34  
 35  - Fixed [shutdown deadlock](https://github.com/lightningnetwork/lnd/pull/10042)
 36    when we fail starting up LND before we startup the chanbackup sub-server.
 37  
 38  - Fixed BOLT-11 invoice parsing behavior: [now errors](
 39    https://github.com/lightningnetwork/lnd/pull/9993) are returned when receiving
 40    empty route hints or a non-UTF-8-encoded description.
 41  
 42  - [Fixed](https://github.com/lightningnetwork/lnd/pull/10027) an issue where
 43    known TLV fields were incorrectly encoded into the `ExtraData` field of
 44    messages in the dynamic commitment set.
 45  
 46  
 47  - [Fixed](https://github.com/lightningnetwork/lnd/pull/10102) a case that we may
 48    send unnecessary `channel_announcement` and `node_announcement` messages when
 49    replying to a `gossip_timestamp_filter` query.
 50  
 51  - [Fixed](https://github.com/lightningnetwork/lnd/pull/10189) a case in the
 52    sweeper where some outputs would not be resolved due to an error string
 53    mismatch.
 54  
 55  - [Fixed](https://github.com/lightningnetwork/lnd/pull/10273) a case in the
 56    utxonursery (the legacy sweeper) where htlcs with a locktime of 0 would not
 57    be swept.
 58  
 59  - [Fixed a bug](https://github.com/lightningnetwork/lnd/pull/10330) to ensure that goroutine resources are properly freed in the case
 60    of a disconnection or other failure event.
 61  
 62  # New Features
 63   
 64  * Use persisted [nodeannouncement](https://github.com/lightningnetwork/lnd/pull/8825) 
 65    settings across restart. Before this change we always go back to the default
 66    settings when the node restarts.
 67  
 68  - Added [NoOp HTLCs](https://github.com/lightningnetwork/lnd/pull/9871). This
 69  allows sending HTLCs to the remote party without shifting the balances of the
 70  channel. This is currently only possible to use with custom channels, and only
 71  when the appropriate TLV flag is set. This allows for HTLCs carrying metadata to
 72  reflect their state on the channel commitment without having to send or receive
 73  a certain amount of msats.
 74  
 75  - Added support for [P2TR Fallback Addresses](
 76    https://github.com/lightningnetwork/lnd/pull/9975) in BOLT-11 invoices.
 77  
 78  - A new experimental RPC endpoint
 79    [XFindBaseLocalChanAlias](https://github.com/lightningnetwork/lnd/pull/10133)
 80    was added for looking up the base scid for an scid alias. Aliases that were
 81    manually created via the `XAddLocalChanAliases` endpoint will get lost on
 82    restart.
 83  
 84  ## Functional Enhancements
 85  * [Add](https://github.com/lightningnetwork/lnd/pull/9677)
 86    `ConfirmationsUntilActive` and `ConfirmationHeight` field to the
 87    `PendingChannelsResponse_PendingChannel` message, providing users with the
 88    number of confirmations remaining before a pending channel becomes active and 
 89    the block height at which the funding transaction was first confirmed.
 90    This change also persists the channel's confirmation height in the database 
 91    once its funding transaction receives one confirmation, allowing tracking of 
 92    confirmation progress before the channel becomes active.
 93  
 94  * RPCs `walletrpc.EstimateFee` and `walletrpc.FundPsbt` now
 95     [allow](https://github.com/lightningnetwork/lnd/pull/10087)
 96    `conf_target=1`. Previously they required `conf_target >= 2`.
 97  
 98  * A new AuxComponent was added named AuxChannelNegotiator. This component aids
 99    with custom data communication for aux channels, by injecting and handling
100    data in channel related wire messages. See
101    [PR](https://github.com/lightningnetwork/lnd/pull/10182) for more info.
102  
103  ## RPC Additions
104  * When querying [`ForwardingEvents`](https://github.com/lightningnetwork/lnd/pull/9813)
105  logs, the response now include the incoming and outgoing htlc indices of the payment 
106  circuit. The indices are only available for forwarding events saved after v0.20.
107  
108  
109  * The `lncli addinvoice --blind` command now has the option to include a
110    chained channels [1](https://github.com/lightningnetwork/lnd/pull/9127)
111    [2](https://github.com/lightningnetwork/lnd/pull/9925)
112    incoming list `--blinded_path_incoming_channel_list` which gives users the 
113    control of specifying the channels they prefer to receive the payment on. With
114    the option to specify multiple channels this control can be extended to
115    multiple hops leading to the node.
116  
117  
118  * The `lnrpc.ForwardingHistory` RPC method now supports filtering by 
119    [`incoming_chan_ids` and `outgoing_chan_ids`](https://github.com/lightningnetwork/lnd/pull/9356). 
120    This allows to retrieve forwarding events for specific channels.
121  
122  
123  * `DescribeGraph`, `GetNodeInfo`, `GetChanInfo` and the corresponding lncli
124     commands [now have flag](https://github.com/lightningnetwork/lnd/pull/9950)
125    `include_auth_proof`. With the flag, these APIs add AuthProof (signatures from
126    the channel announcement) to the returned ChannelEdge.
127  
128  * A [new config](https://github.com/lightningnetwork/lnd/pull/10001) value
129    `--htlcswitch.quiescencetimeout` is added to allow specifying the max duration
130    the channel can be quiescent. A minimal value of 30s is enforced, and a
131    default value of 60s is used. This value is used to limit the dependent
132    protocols like dynamic commitments by restricting that the operation must
133    finish under this timeout value. Consider using a larger timeout value if you
134    have a slow network.
135  
136  * The default value for `gossip.msg-rate-bytes` has been
137    [increased](https://github.com/lightningnetwork/lnd/pull/10096) from 100KB to
138    1MB, and `gossip.msg-burst-bytes` has been increased from 200KB to 2MB.
139  
140  * Added [`deletecanceledinvoices`](
141    https://github.com/lightningnetwork/lnd/pull/9625) RPC to allow the removal of
142    a canceled invoice. Supports deleting a canceled invoice by providing its
143    payment hash.
144  
145  * A [new config](https://github.com/lightningnetwork/lnd/pull/10102)
146    `gossip.ban-threshold` is added to allow users to configure the ban score
147    threshold for peers. When a peer's ban score exceeds this value, they will be
148    disconnected and banned. Setting the value to 0 effectively disables banning
149    by setting the threshold to the maximum possible value. 
150  
151  * A [new config](https://github.com/lightningnetwork/lnd/pull/10103) value
152    `gossip.peer-msg-rate-bytes=102400` is introduced to allow limiting the
153    outgoing bandwidth used by each peer when processing gossip-related messages.
154    Note this is different from `gossip.msg-rate-bytes`, as this new config
155    controls the bandwidth per peer, while `msg-rate-bytes` controls the gossip as
156    a whole. This new config prevents a single misbehaving peer from using up all
157    the bandwidth.
158  
159  ## lncli Additions
160  
161  * [`lncli sendpayment` and `lncli queryroutes` now support the
162    `--route_hints` flag](https://github.com/lightningnetwork/lnd/pull/9721) to
163    support routing through private channels.
164  
165  
166  * The `lncli fwdinghistory` command now supports two new flags:
167    [`--incoming_chan_ids` and `--outgoing_chan_ids`](https://github.com/lightningnetwork/lnd/pull/9356).
168    These filters allows to query forwarding events for specific channels.
169  
170  # Improvements
171  ## Functional Updates
172  
173  * Graph Store SQL implementation and migration project:
174    * Introduce an [abstract graph 
175      store](https://github.com/lightningnetwork/lnd/pull/9791) interface. 
176    * Start [validating](https://github.com/lightningnetwork/lnd/pull/9787) that 
177      byte blobs at the end of gossip messages are valid TLV streams.
178    * Various [preparations](https://github.com/lightningnetwork/lnd/pull/9692) 
179      of the graph code before the SQL implementation is added.
180    * Only [fetch required 
181      fields](https://github.com/lightningnetwork/lnd/pull/9923) during graph 
182      cache population. 
183    * Add graph schemas, queries and CRUD: 
184     [[1](https://github.com/lightningnetwork/lnd/pull/9866),
185      [2](https://github.com/lightningnetwork/lnd/pull/9869),
186      [3](https://github.com/lightningnetwork/lnd/pull/9887),
187      [4](https://github.com/lightningnetwork/lnd/pull/9931),
188      [5](https://github.com/lightningnetwork/lnd/pull/9935),
189      [6](https://github.com/lightningnetwork/lnd/pull/9936),
190      [7](https://github.com/lightningnetwork/lnd/pull/9937),
191      [8](https://github.com/lightningnetwork/lnd/pull/9938),
192      [9](https://github.com/lightningnetwork/lnd/pull/9939),
193      [10](https://github.com/lightningnetwork/lnd/pull/9971),
194      [11](https://github.com/lightningnetwork/lnd/pull/9972)]
195    * Add graph SQL migration logic:
196      [[1](https://github.com/lightningnetwork/lnd/pull/10036),
197       [2](https://github.com/lightningnetwork/lnd/pull/10050),
198       [3](https://github.com/lightningnetwork/lnd/pull/10038)]
199  
200  ## RPC Updates
201  * Previously the `RoutingPolicy` would return the inbound fee record in its
202    `CustomRecords` field, which is duplicated info as it's already presented in
203    fields `InboundFeeBaseMsat` and `InboundFeeRateMilliMsat`. This is now
204    [fixed](https://github.com/lightningnetwork/lnd/pull/9572), the affected RPCs
205    are `SubscribeChannelGraph`, `GetChanInfo`, `GetNodeInfo` and `DescribeGraph`.
206  
207  * [Fix a bug](https://github.com/lightningnetwork/lnd/pull/10064) where the
208    `GetChanInfo` was not returning the correct gRPC status code in the cases 
209    where the channel is unknown to the node. The same is done for `LookupInvoice`
210    for the case where the DB is kvdb backed and no invoices have yet been added
211    to the database.
212  
213  * The `FlapCount` and `LastFlapNs` have been
214    [changed](https://github.com/lightningnetwork/lnd/pull/10211) to track
215    exclusively for peers that have channels with us.
216  
217  ## lncli Updates
218  * Previously, users could only specify one `outgoing_chan_id` when calling the 
219    `lncli queryroutes` or the QueryRoutes RPC. With this change, multiple 
220    `outgoing_chan_id` can be passed during the call.
221  
222  
223  ## Code Health
224  
225  - [Increase itest coverage](https://github.com/lightningnetwork/lnd/pull/9990)
226  for payments. Now the payment address is mandatory for the writer and
227  reader of a payment request.
228  
229  - [Refactored](https://github.com/lightningnetwork/lnd/pull/10018) `channelLink`
230    to improve readability and maintainability of the code.
231  
232  - [Introduced](https://github.com/lightningnetwork/lnd/pull/10136) a wallet
233    interface to decouple the relationship between `lnd` and `btcwallet`.
234  
235  - [Refactored](https://github.com/lightningnetwork/lnd/pull/10128) channel graph
236    update iterators to use Go's `iter.Seq2` pattern. The `UpdatesInHorizon`,
237    `NodeUpdatesInHorizon`, and `ChanUpdatesInHorizon` methods now return lazy
238    iterators instead of materializing all updates in memory at once, improving
239    memory efficiency for large graph operations.
240  
241  ## Breaking Changes
242  ## Performance Improvements
243  
244  ## Deprecations
245  
246  ### ⚠️ **Warning:** The following RPCs will be removed in release version **0.21**:
247  
248  | Deprecated RPC Method | REST Equivalent | HTTP Method | Path | Replaced By |
249  |----------------------|----------------|-------------|------------------------------|------------------|
250  | [`lnrpc.SendToRoute`](https://lightning.engineering/api-docs/api/lnd/lightning/send-to-route/index.html) <br> [`routerrpc.SendToRoute`](https://lightning.engineering/api-docs/api/lnd/router/send-to-route/) | ❌ (No direct REST equivalent) | — | — | [`routerrpc.SendToRouteV2`](https://lightning.engineering/api-docs/api/lnd/router/send-to-route-v2/) |
251  | [`lnrpc.SendPayment`](https://lightning.engineering/api-docs/api/lnd/lightning/send-payment/) <br> [`routerrpc.SendPayment`](https://lightning.engineering/api-docs/api/lnd/router/send-payment/) | ✅ | `POST` | `/v1/channels/transaction-stream` | [`routerrpc.SendPaymentV2`](https://lightning.engineering/api-docs/api/lnd/router/send-payment-v2/index.html) |
252  | [`lnrpc.SendToRouteSync`](https://lightning.engineering/api-docs/api/lnd/lightning/send-to-route-sync/index.html) | ✅ | `POST` | `/v1/channels/transactions/route` | [`routerrpc.SendToRouteV2`](https://lightning.engineering/api-docs/api/lnd/router/send-to-route-v2/) |
253  | [`lnrpc.SendPaymentSync`](https://lightning.engineering/api-docs/api/lnd/lightning/send-payment-sync/index.html) | ✅ | `POST` | `/v1/channels/transactions` | [`routerrpc.SendPaymentV2`](https://lightning.engineering/api-docs/api/lnd/router/send-payment-v2/index.html) |
254  | [`router.TrackPayment`](https://lightning.engineering/api-docs/api/lnd/router/track-payment/index.html) | ❌ (No direct REST equivalent) | — | — | [`routerrpc.TrackPaymentV2`](https://lightning.engineering/api-docs/api/lnd/router/track-payment-v2/) |
255  
256  🚨 **Users are strongly encouraged** to transition to the new **V2 methods** before release **0.21** to ensure compatibility:
257  
258  | New RPC Method | REST Equivalent | HTTP Method | Path |
259  |---------------|----------------|-------------|------------------------|
260  | [`routerrpc.SendToRouteV2`](https://lightning.engineering/api-docs/api/lnd/router/send-to-route-v2/) | ✅ | `POST` | `/v2/router/route/send` |
261  | [`routerrpc.SendPaymentV2`](https://lightning.engineering/api-docs/api/lnd/router/send-payment-v2/index.html) | ✅ | `POST` | `/v2/router/send` |
262  | [`routerrpc.TrackPaymentV2`](https://lightning.engineering/api-docs/api/lnd/router/track-payment-v2/) | ✅ | `GET` | `/v2/router/track/{payment_hash}` |
263  
264  * We are deprecating `OutgoingChanId` in favour of `OutgoingChanIds` in the
265    `QueryRoutes` RPC. This [transition](https://github.com/lightningnetwork/lnd/pull/10057) allows us to specify more than one outgoing channel
266    the pathfinder should use when finding a route.
267  
268  * Support for Tor v2 onion services is deprecated and will be removed in
269    v0.21.0. The `--tor.v2` configuration option is now
270    [hidden](https://github.com/lightningnetwork/lnd/pull/10254).
271  
272  # Technical and Architectural Updates
273  ## BOLT Spec Updates
274  
275  * Explicitly define the [inbound fee TLV 
276    record](https://github.com/lightningnetwork/lnd/pull/9897) on the 
277    `channel_update` message and handle it explicitly throughout the code base 
278    instead of extracting it from the TLV stream at various call-sites.
279  * [Don't error out](https://github.com/lightningnetwork/lnd/pull/9884) if an 
280    invoice's feature vector contain both the required and optional versions of a 
281    feature bit. In those cases, just treat the feature as mandatory. 
282  
283  * [Require invoices to include a payment address or blinded paths](https://github.com/lightningnetwork/lnd/pull/9752) 
284    to comply with updated BOLT 11 specifications before sending payments.
285  
286  * [LND can now recognize DNS address type in node
287    announcement msg](https://github.com/lightningnetwork/lnd/pull/9455). This
288    allows users to forward node announcement with valid DNS address types. The
289    validity aligns with Bolt 07 DNS constraints.
290  
291  ## Testing
292  
293  * Previously, automatic peer bootstrapping was disabled for simnet, signet and
294    regtest networks even if the `--nobootstrap` flag was not set. This automatic
295    disabling has now been 
296    [removed](https://github.com/lightningnetwork/lnd/pull/9967) meaning that any 
297    test network scripts that rely on bootstrapping being disabled will need to 
298    explicitly define the `--nobootstrap` flag. Bootstrapping will now also be
299    [deterministic](https://github.com/lightningnetwork/lnd/pull/10003) on local 
300    test networks so that bootstrapping behaviour can be tested for.
301  
302  ## Database
303  
304  * Add missing [sql index](https://github.com/lightningnetwork/lnd/pull/10155)
305    for settled invoices to increase query speed.
306  
307  * [Migrate the KV graph store to native 
308    SQL](https://github.com/lightningnetwork/lnd/pull/10163). For this migration 
309    to take place, the db backend must already be either `postgres` or `sqlite` 
310    and the `--use-native-sql` flag must be set.
311  
312  ## Code Health
313  
314  ## Tooling and Documentation
315  
316  * lntest: [enable neutrino testing with bitcoind](https://github.com/lightningnetwork/lnd/pull/9977)
317  
318  # Contributors (Alphabetical Order)
319  
320  * Abdulkbk
321  * Boris Nagaev
322  * Elle Mouton
323  * Erick Cestari
324  * Funyug
325  * Mohamed Awnallah
326  * Olaoluwa Osuntokun
327  * Pins
328  * Torkel Rogstad
329  * Yong Yu
330  * Ziggie