* lnwallet: fix log output msg The log message is off by one. * htlcswitch: fail channel when revoking it fails. When the revocation of a channel state fails after receiving a new CommitmentSigned msg we have to fail the channel otherwise we continue with an unclean state. * docs: update release-docs * htlcswitch: tear down connection if revocation processing fails If we couldn't revoke due to a DB error, then we want to also tear down the connection, as we don't want the other party to continue to send updates. That may lead to de-sync'd state an eventual force close. Otherwise, the database might be able to recover come the next reconnection attempt. * kvdb: use sql.LevelSerializable for all backends In this commit, we modify the default isolation level to be `sql.LevelSerializable. This is the strictness isolation type for postgres. For sqlite, there's only ever a single writer, so this doesn't apply directly. * kvdb/sqlbase: add randomized exponential backoff for serialization failures In this commit, we add randomized exponential backoff for serialization failures. For postgres, we''ll his this any time a transaction set fails to be linearized. For sqlite, we'll his this if we have many writers trying to grab the write lock at time same time, manifesting as a `SQLITE_BUSY` error code. As is, we'll retry up to 10 times, waiting a minimum of 50 miliseconds between each attempt, up to 5 seconds without any delay at all. For sqlite, this is also bounded by the busy timeout set, which applies on top of this retry logic (block for busy timeout seconds, then apply this back off logic). * docs/release-notes: add entry for sqlite/postgres tx retry --------- Co-authored-by: ziggie <ziggie1984@protonmail.com>
14 KiB
Release Notes
Bug Fixes
-
Make sure payment stream returns all the events by subscribing it before sending.
-
Fixed a memory leak found in mempool management handled by
btcwallet
. -
Make sure lnd starts up as normal in case a transaction does not meet min mempool fee requirements. Handle min mempool fee backend error when a transaction fails to be broadcasted by the bitcoind backend.
-
Updated bbolt to v1.3.7 in order to address mmap issues affecting certain older iPhone devices.
-
Stop rejecting payments that overpay or over-timelock the final hop.
-
Fix an issue where IPv6 couldn't be dialed when using Tor, even when
tor.skip-proxy-for-clearnet-targets=true
was set. -
Fix a concurrency issue related to rapid peer teardown and creation that can arise under rare scenarios.
-
A race condition found between
channel_ready
and link updates is now fixed. -
Remove rebroadcasting of the last sweep-tx. Now at startup of the sweeper we do not rebroadcast the last sweep-tx anymore. The "sweeper-last-tx" top level bucket in the channel.db is removed (new migration version 31 of the db). The main reason is that neutrino backends do not fail broadcasting invalid transactions because BIP157 supporting bitcoin core nodes do not reply with the reject msg anymore. So we have to make sure to not broadcast outdated transactions which can lead to locked up wallet funds indefinitely in the worst case.
-
Remove nil value from variadic parameter list.
-
Make sure to fail a channel if revoking the old channel state fails.
-
Failed
sqlite
orpostgres
transactions due to a serialization error will now be automatically retried with an exponential back off.
New Features
Functional Enhancements
Protocol Features
- This release marks the first release that includes the new musig2-based
taproot channel type. As
new protocol feature hasn't yet been finalized, users must enable taproot
channels with a new flag:
--protocol.simple-taproot-chans
. Once enabled, user MUST use the explicit channel type to request the taproot channel type (pending support by the remote peer). Forlncli openchannel
,--channel_type=taproot
should be used.
RPC Additions
None
lncli Additions
None
Improvements
Functional Updates
Watchtowers
-
Let the task pipeline only carry wtdb.BackupIDs instead of the entire retribution struct. This reduces the amount of data that needs to be held in memory.
-
Replay pending and un-acked updates onto the main task pipeline if a tower is being removed.
-
Add defaults to the wtclient and watchtower config structs and use these to populate the defaults of the main LND config struct so that the defaults appear in the
lnd --help
command output. -
The deprecated
wtclient.private-tower-uris
option has also been removed. This field was deprecated in v0.8.0-beta.
Neutrino
- The Neutrino version is updated so that LND can take advantage of the latest filter fetching performance improvements.
Misc
-
Ensure that both the byte and string form of a TXID is populated in the lnrpc.Outpoint message.
-
HTLC serialization updated to allow storing extra data transmitted in TLVs.
-
Generate default macaroons independently on wallet unlock or create.
-
Restore support for
PKCS8
-encoded cert private keys. -
Cleanup of defaults mentioned in sample-lnd.conf. It is possible to distinguish between defaults and examples now. A check script has been developed and integrated into the building process to compare the default values between lnd and sample-lnd.conf.
-
Cancel rebroadcasting of a transaction when abandoning a channel.
-
Fixed a validation bug in
channel_type
negotiation. -
The
lightning-onion
repo version was updated in preparation for work to be done on route blinding in LND.
RPC Updates
-
SendOutputs now adheres to the anchor channel reserve requirement.
-
Enforce provided fee rate is no less than the relay or minimum mempool fee when calling
OpenChannel
,CloseChannel
,SendCoins
, andSendMany
. -
The UpdateNodeAnnouncement API can no longer be used to set/unset protocol features that are defined by LND.
-
The
neutrinorpc
GetBlockHash
has been deprecated. Endpoint has been moved to thechainrpc
sub-server. -
Custom node announcement feature bits can also be specified in config using the
dev
build tag and--protocol.custom-nodeann
,--protocol.custom-init
and--protocol.custom-invoice
flags to set feature bits for various feature "sets", as defined in BOLT 9. -
OpenChannel
now accepts an optionalmemo
argument for specifying a helpful note-to-self containing arbitrary useful information about the channel. -
PendingOpenChannel
now has the fieldfunding_expiry_blocks
that indicates the number of blocks until the funding transaction is considered expired. -
gRPC keepalive parameters can now be set in the configuration. The
lnd
configuration settingsgrpc.server-ping-time
andgrpc.server-ping-timeout
configure how oftenlnd
pings its clients and how long a pong response is allowed to take. The default values for there settings are improved over the gRPC protocol internal default values, so most users won't need to change those. Thegrpc.client-ping-min-wait
setting defines how often a client is allowed to pinglnd
to check for connection healthiness. Thelnd
default value of 5 seconds is much lower than the previously used protocol internal value, which means clients can now check connection health more often. For this to be activated on the client side, gRPC clients are encouraged to set the keepalive setting on their end as well (using thegrpc.keepalive_time_ms
option in JavaScript or Python, or the equivalent setting in the gRPC library they are using, might be an environment variable or a different syntax depending on the programming language used) when creating long open streams over a network topology that might silently fail connections. A value ofgrpc.keepalive_time_ms=5100
is recommended on the client side (adding 100ms to account for slightly different clock speeds). -
Fixed a bug where we didn't check for correct networks when submitting onchain transactions.
-
Fix non-deterministic behaviour in RPC calls for custom accounts. In theory, it should be only one custom account with a given name. However, due to a lack of check, users could have created custom accounts with various key scopes. The non-deterministic behaviours linked to this case are fixed, and users can no longer create two custom accounts with the same name.
-
OpenChannel
adds a newutxo
flag that allows the specification of multiple UTXOs as a basis for funding a channel opening. -
The BatchOpenChannel message now supports all fields that are present in the
OpenChannel
message, except for thefunding_shim
andfundmax
fields. -
The WalletBalance RPC (lncli walletbalance) now supports showing the balance for a specific account.
lncli Updates
-
Added ability to use environment variables to override
lncli
global flags. Flags will have preference over environment variables. -
The
lncli sendcoins
command now asks for manual confirmation when invoked on the command line. This can be skipped by adding the--force
(or-f
) flag, similar to howlncli payinvoice
works. To not break any existing scripts the confirmation is also skipped ifstdout
is not a terminal/tty (e.g. when capturing the output in a shell script variable or piping the output to another program). -
Add
--unused
tolncli newaddr
command.
Code Health
Neutrino
- The Neutrino version is updated so that LND can take advantage of the latest filter fetching performance improvements.
Breaking Changes
None
Performance Improvements
None
Technical and Architectural Updates
BOLT Spec Updates
None
Testing
-
Started running fuzz tests in CI.
-
Derandomized the BOLT 8 fuzz tests.
-
Improved invoice fuzz tests.
-
Added fuzz tests for signature parsing and conversion.
-
Added a fuzz test for watchtower address iterators.
-
Simplify fuzz tests using the
require
package. -
Removed need for an active internet connection for the network connection itest.
-
Fix Benchmark Test (BenchmarkReadMessage/Channel_Ready) in the lnwire package.
Database
-
Split channeldb
UpdateInvoice
implementation logic in different update types. -
Add new sqldb package.
Code Health
Tooling and Documentation
-
Add support for custom
RPCHOST
andRPCCRTPATH
to thelnd
Docker image main script (/start-lnd.sh
). -
Fix bug in
scripts/verify-install.sh
that caused the release binary signature verification script to not properly import signing keys when being run with new version ofgpg
(which is the case in the latest Docker image).
Contributors (Alphabetical Order)
- Aljaz Ceru
- BhhagBoseDK
- Carla Kirk-Cohen
- Daniel McNally
- Elle Mouton
- Erik Arvstedt
- ErikEk
- feelancer21
- gabbyprecious
- Guillermo Caracuel
- Hampus Sjöberg
- hieblmi
- Jordi Montes
- Keagan McClelland
- Konstantin Nick
- Lele Calo
- Matt Morehouse
- Maxwell Sayles
- Michael Street
- MG-ng
- Olaoluwa Osuntokun
- Oliver Gugger
- Pierre Beugnet
- Satarupa Deb
- Shaurya Arora
- Suheb
- Torkel Rogstad
- Yong Yu
- ziggie1984
- zx9r