15393 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
710545b829
Merge pull request #8138 from Roasbeef/v0-17-1-branch-rc1
build: create v0.17.1-rc1 branch
2023-11-01 15:27:51 -07:00
Olaoluwa Osuntokun
155f66b16f Merge branch 'v0-17-1-branch-rc1-8063' into v0-17-1-branch-rc1 v0.17.1-beta.rc1 2023-11-01 11:17:04 -07:00
Oliver Gugger
464ddb4206 cmd/lncli: fix linter complaint by running make fmt 2023-11-01 11:17:04 -07:00
Olaoluwa Osuntokun
c8409575bb
build: bump version to v0.17.1-beta.rc1 2023-10-31 16:49:13 -07:00
Olaoluwa Osuntokun
2c2ba34537 Merge branch 'v0-17-1-branch-rc1-8132' into v0-17-1-branch-rc1 2023-10-31 16:44:35 -07:00
Olaoluwa Osuntokun
76862ed10b macaroons: reject unknown macaroon versions
We've only ever made macaroons with the v2 versions, so we should
explicitly reject those that aren't actually v2. We add a basic test
along the way, and also add a similar check for the version encoded in
the macaroon ID.
2023-10-31 16:44:35 -07:00
Olaoluwa Osuntokun
948f8732d6 Merge branch 'v0-17-1-branch-rc1-8104' into v0-17-1-branch-rc1 2023-10-31 16:44:17 -07:00
Olaoluwa Osuntokun
6c7bca2a17 docs/release-notes: add entry for nonce init fix 2023-10-31 16:44:17 -07:00
Slyghtning
9fa2057cd4 itest: simple taproot channel status 2023-10-31 16:44:17 -07:00
Slyghtning
b2a5368846 itest: assertions to check channel status 2023-10-31 16:44:17 -07:00
Eugene Siegel
280a97cbaa multi: skip InitRemoteMusigNonces if we've already called it
Prior to this commit, taproot channels had a bug:

- If a disconnect happened before peer.AddNewChannel was called,
  then the subsequent reconnect would call peer.AddNewChannel and
  attempt the ChannelReestablish dance.

- peer.AddNewChannel would call NewLightningChannel with
  populated nonce ChannelOpts. This in turn would call
  InitRemoteMusigNonces which would create a new musig pair session
  and set the channel's pendingVerificationNonce to nil.

- During the reestablish dance, ProcessChanSyncMsg would be called.
  This would also call InitRemoteMusigNonces, except it would fail
  since pendingVerificationNonce was set to nil in the previous
  invocation.

To fix this, we add a new functional option to signal to the init logic
that it doesn't need to call InitRemoteMusigNonces in   in
ProcessChanSyncMsg.
2023-10-31 16:44:17 -07:00
Olaoluwa Osuntokun
db6acec141 Merge branch 'v0-17-1-branch-rc1-8111' into v0-17-1-branch-rc1 2023-10-31 16:43:15 -07:00
Jonathan Harvey-Buschel
452af8ffa1 doc: add release notes for 8111 2023-10-31 16:43:15 -07:00
Jonathan Harvey-Buschel
6ea7d92c2e itest: add GetBlockHeader to ChainKit tests 2023-10-31 16:43:15 -07:00
Jonathan Harvey-Buschel
6a4dabc684 chainrpc+lncli: expose GetBlockHeader + add to CLI 2023-10-31 16:43:15 -07:00
Jonathan Harvey-Buschel
b04927f688 multi: add GetBlockHeader to BlockChainIO 2023-10-31 16:43:15 -07:00
Jonathan Harvey-Buschel
35bfd27467 chainrpc: update proto to expose GetBlockHeader 2023-10-31 16:43:15 -07:00
Olaoluwa Osuntokun
c0b14c7c39 Merge branch 'v0-17-0-branch-rc1-8094' into v0-17-0-branch-rc1 2023-10-31 16:24:16 -07:00
yyforyongyu
52fdf7086c gomod: update btcwallet re rescan race fix 2023-10-31 16:24:16 -07:00
Olaoluwa Osuntokun
6806a13f68 Merge branch 'v0-17-0-branch-rc1-8090' into v0-17-0-branch-rc1 2023-10-31 16:23:00 -07:00
ziggie
42dd0fa912 multi: clarify co-op closure failures. 2023-10-31 16:23:00 -07:00
Olaoluwa Osuntokun
58193ef18c Merge branch 'v0-17-0-branch-rc1-8019' into v0-17-0-branch-rc1 2023-10-31 16:22:29 -07:00
yyforyongyu
a0448eb14a gomod: update btcwallet version 2023-10-31 16:22:29 -07:00
Olaoluwa Osuntokun
5c4f2c129f Merge branch 'v0-17-0-branch-rc1-7965' into v0-17-0-branch-rc1 2023-10-31 16:21:57 -07:00
yyforyongyu
7be54096b6 itest: update related tests to reflect anchor sweeping
This commit updates all related tests to reflect the latest anchor
sweeping behavior. Previously, anchor sweeping is always attempted as
CPFP when a force close is broadcast, while now it only happens when the
deadline is less than 144. For non-CPFP purpose sweeping, it will happen
after one block is mined after the force close transaction is confirmed
as the anchor will be resent to the sweeper with a floor fee rate, hence
making it economical to sweep.
2023-10-31 16:21:57 -07:00
yyforyongyu
b8464ddd7e itest: fix testMultiHopRemoteForceCloseOnChainHtlcTimeout 2023-10-31 16:21:57 -07:00
yyforyongyu
0cb9ccd066 itest: update test testMultiHopHtlcLocalChainClaim to skip CPFP
Since we now only perform CPFP when both the fee rate is higher and the
deadline is less than 144, we need to update the test to reflect that
Bob will not CPFP the force close tx for the channle Alice->Bob.
2023-10-31 16:21:57 -07:00
yyforyongyu
2cb208e97c docs: update release notes 2023-10-31 16:21:57 -07:00
yyforyongyu
91719b0f49 contractcourt+itest: relax anchor sweeping for CPFP purpose
This commit changes from always sweeping anchor for a local force close
to only do so when there is an actual time pressure. After this change,
a forced anchor sweeping will only be attempted when the deadline is
less than 144 blocks.
2023-10-31 16:21:57 -07:00
yyforyongyu
c2148ad757 sweep: prioritize smaller inputs when adding wallet UTXOs
This commit sorts wallet UTXOs by their values when using them for
sweeping inputs. This way we'd avoid locking large UTXOs when sweeping
inputs and also provide an opportunity to aggregate wallet UTXOs.
2023-10-31 16:21:57 -07:00
yyforyongyu
dde605d375 sweeper: add more docs and debug logs 2023-10-31 16:21:57 -07:00
yyforyongyu
7ebc538c10 sweep: use longer variable name for clarity in addToState 2023-10-31 16:21:57 -07:00
Olaoluwa Osuntokun
738e0c64ec Merge branch 'v0-17-0-branch-rc1-7937' into v0-17-0-branch-rc1 2023-10-31 16:21:19 -07:00
eugene
28c260e4ea release-notes: update for 0.17.1 2023-10-31 16:21:19 -07:00
eugene
75406d177b htlcswitch/hop: use InvalidOnionVersion for replayed packets
The link will send an update_fail_malformed_htlc, so we need to set
the BADONION bit. Since there isn't a replay-specific error, we
set the failure code to InvalidOnionVersion which has the BADONION bit.
2023-10-31 16:21:19 -07:00
Olaoluwa Osuntokun
3c605dbff5 Merge branch 'v0-17-0-branch-rc1-8053' into v0-17-0-branch-rc1 2023-10-31 16:20:50 -07:00
Kilian
6521576f42 lncli: fix description of connect/disconnect peer 2023-10-31 16:20:50 -07:00
Olaoluwa Osuntokun
2fb150c8fe
build: bump version to v0.17.0 v0.17.0-beta 2023-10-03 10:20:31 -07:00
Olaoluwa Osuntokun
caa9bf9222
Merge pull request #8043 from Roasbeef/0-17-rc6
build: bump version to v0.17.0 rc6
v0.17.0-beta.rc6
2023-09-28 13:45:52 -05:00
Olaoluwa Osuntokun
4e6bb71c0f
build: bump version to v0.17.0 rc6 2023-09-28 12:00:41 -05:00
Olaoluwa Osuntokun
bb7a257359
Merge pull request #8037 from yyforyongyu/fix-weight-calc
lnwallet+rpcserver: fix weight calculation for taproot channels
2023-09-28 11:21:29 -05:00
Olaoluwa Osuntokun
edeb0d7db5
Merge pull request #8041 from Roasbeef/background-peer-prune
peer: launch persistent peer pruning in background goroutine
2023-09-28 11:18:10 -05:00
yyforyongyu
522518922f
lnwallet+rpcserver: fix weight calculation for taproot channels 2023-09-28 19:42:13 +08:00
yyforyongyu
62d240bba1
itest: add testSendDirectPayment
Adds a new test to check direct payments between two nodes. The fee rate
is tuned to 1 sat/vb to catch edge cases.
2023-09-28 19:42:11 +08:00
Olaoluwa Osuntokun
eae9dd07f0
peer: launch persistent peer pruning in background goroutine
This PR is a follow up, to a [follow
up](https://github.com/lightningnetwork/lnd/pull/7938) of an [initial
concurrency issue](https://github.com/lightningnetwork/lnd/pull/7856)
fixed in the peer goroutine.

In #7938, we noticed that the introduction of `p.startReady` can cause
`Disconnect` to block. This happens as `Disconnect` cannot be called
until `p.startReady` has been closed. `Disconnect` is also called from
`InboundPeerConnected` (the case of concurrent peers, so we need to
remove one of the connections) while the main server mutex is held. If
`p.Start` blocks for any reason, then this leads to the deadlock as: we
can't disconnect until we've finished starting, and we can't finish
starting as we need the disconnect caller to exit as it has the mutex.

In this commit, we now make the call to `prunePersistentPeerConnection`
async. The call to `prunePersistentPeerConnection` eventually wants to
grab the server mutex, which triggers the circular waiting scenario
above.

The main learning here is that no calls to the main server mutex path
can block from `p.Start`. This is more or less a stop gap to resolve the
issue initially introduced in v0.16.4. Assuming we want to move forward
with this fix, we should reexamine `p.startReady` all together, and also
revisit attempt to refactor this section of the code to eliminate the
mega mutex in the server in favor of a dedicated event loop.
2023-09-27 21:24:50 -05:00
Olaoluwa Osuntokun
1ebfe95772
Merge pull request #8035 from Roasbeef/0-17-rc5
build: bump version to v0.17.0 rc5
v0.17.0-beta.rc5
2023-09-26 18:21:07 -05:00
Olaoluwa Osuntokun
f63a2b9507
build: bump version to v0.17.0 rc5 2023-09-26 16:11:45 -05:00
Olaoluwa Osuntokun
01a05fdea7
Merge pull request #8031 from guggero/chan-acceptor-taproot-chan
chanacceptor+lnrpc: add simple taproot channel support
2023-09-26 16:08:19 -05:00
Oliver Gugger
d16e7a5eef
itest: add itest for externally funded taproot chans 2023-09-26 21:45:17 +02:00
Oliver Gugger
d94ae3f509
lnrpc+rpcserver: add musig2 to ChanPointShim 2023-09-26 21:45:17 +02:00