lnd/docs/release-notes/release-notes-0.22.0.md
Elle Mouton fb58ee0e7d
channeldb: recover missing db version
Use strict metadata reads during migration selection so a metadata bucket with a
missing metadata/dbp key is not interpreted as the latest DB version.

Recover this state from mandatory DB version 33, the last mandatory version
before the v0.20.x releases that could initialize a DB without writing the DB
version key. This runs migration 35 without replaying migrations 0 through 33
against a DB that was already created by a modern schema/code path.

After the selected migrations complete, syncVersions writes the latest DB
version as usual.
2026-07-21 18:24:49 -07:00

6.2 KiB

Release Notes

Bug Fixes

  • Bitcoind outbound peer health checks now use getnetworkinfo.connections_out instead of getpeerinfo. The same PR also clarifies the ZMQ port-mismatch warnings so they no longer suggest that the connection failed.

  • Fixed a bug that could be encountered during co-op closes whereby ChanStatusCoopBroadcasted was set before a close transaction actually existed. As a side effect, channels in shutdown negotiation now remain in ListChannels (as inactive) until the close transaction is actually broadcast, and WaitingCloseChannel.ClosingTx is never empty.

  • Fixed a bug where ListChannels reported 100% uptime for channels whose peer was offline. The channel fitness store assumed a peer was online when it first started tracking it, but channels are loaded on startup regardless of peer connectivity. Uptime is now seeded from the peer's actual connection state.

  • Fixed a bug in the sweeper whereby inputs that receive an extra budget from an aux sweeper (such as custom channel outputs, whose value is mostly carried off-chain) were filtered against their own budget alone. This could permanently exclude such inputs from sweeping even though their input set could comfortably pay its fees.

  • Fixed a bug in GetNetworkInfo where encountering an already-seen channel skipped the rest of that node's channels instead of just that channel, undercounting the reported network statistics such as total network capacity, channel count and max out degree.

  • Fixed a channeldb migration bug where databases initialized without a persisted metadata/dbp version key could skip later mandatory migrations. This recovers such databases from the last known v0.20-era mandatory version so the v0.21 waiting proof migration runs without replaying older migrations against an already-initialized database.

New Features

Functional Enhancements

RPC Additions

lncli Additions

Improvements

Functional Updates

RPC Updates

lncli Updates

Breaking Changes

Performance Improvements

Deprecations

Technical and Architectural Updates

BOLT Spec Updates

  • The fundee now enforces the BOLT-02 bound on push_msat, rejecting incoming open_channel messages where push_msat exceeds 1000 * funding_satoshis. Oversized pushes were previously caught later in the reservation flow as a funder-balance-dust error; they now surface a clearer, spec-aligned error string up front.

BOLT 12 (Offers)

  • Initial BOLT 12 Offer codec: add a new bolt12/ package with the BOLT 12 offer TLV codec and full reader/writer validation, plus a typed lnwire.BlindedPath introduction-node codec shared by HTLC routing and onion messaging.

  • BOLT 12 invoice request codec: add the invoice_request TLV message to the bolt12/ package with structural reader/writer validation. This includes an observable RPC behavior change in SubscribeOnionMessages, ensuring a nil reply path remains nil in the RPC response rather than being emitted as an empty struct.

Testing

Database

Code Health

Tooling and Documentation

  • dev.Dockerfile now uses cache mounts to cache the GOMODCACHE and GOCACHE directories so that dependencies don't need to be re-downloaded and re-built every time the image is re-created. As a result of this change, dev.Dockerfile now requires BuildKit to build. When using docker build, this can be enabled by setting the environmental variable DOCKER_BUILDKIT=1. BuildKit also does not unnecessarily rebuild images when the build context is a remote git repository because COPY layers are more smartly compared to cache.

Contributors (Alphabetical Order)

  • bitromortac
  • Boris Nagaev
  • Erick Cestari
  • Jared Tobin