15457 Commits

Author SHA1 Message Date
Matt Morehouse
0f5e4077ba peer: add missing Close() method to mockMessageConn 2023-11-17 18:05:43 -06:00
Olaoluwa Osuntokun
2988c85479
docs/release-notes: add release notes for v0.17.2 2023-11-16 13:08:15 -08:00
Eugene Siegel
a41833c466 peer: send reestablish, shutdown messages before starting writeHandler
This is to avoid a potential race on WriteMessage and Flush internals.
Because there is no locking on WriteMessage and Flush, if we allow
writeMessage calls in Start after the writeHandler has started,
the writeMessage calls may call WriteMessage/Flush at the same time
that writeMessage calls from the writeHandler does. Since there is
no locking, internals like b.nextHeaderSend can race and cause
panics.
2023-11-16 13:05:16 -08:00
Olaoluwa Osuntokun
744feb04e2
build: bump version to v0.17.1-beta v0.17.1-beta 2023-11-13 11:13:18 -08:00
Olaoluwa Osuntokun
eea15f0952
Merge pull request #8162 from Roasbeef/v0-17-1-branch-rc3
build: create v0.17.1 rc3 release branch
v0.17.1-beta.rc3
2023-11-08 17:10:55 -08:00
Olaoluwa Osuntokun
18a5dda6a9
build: bump version to v0.17.1-beta.rc3 2023-11-08 15:00:20 -08:00
Olaoluwa Osuntokun
31791aadc8 Merge branch 'v0-17-1-branch-rc3-8158' into v0-17-1-branch-rc3 2023-11-08 14:58:41 -08:00
Eugene Siegel
8e8923c251 release-notes: update for 0.17.1 2023-11-08 14:58:41 -08:00
Eugene Siegel
f7e2db9687 peer: send messages in Start via writeMessage to bypass writeHandler
Without this the following could happen:

* InboundPeerConnected is called while we already have an inbound
connection with the peer. This calls removePeer which calls Disconnect.
* If the peer is starting up in Start, it may be sending messages
synchronously via SendMessage(true, ...). This eventually calls the
writeMessage function which will exit if disconnect is set to 1.
* Since Disconnect was called, disconnect will be 1 and writeMessage
will exit, causing writeHandler to exit.
* If there is more than 1 message being sent, later messages will
queue in queueHandler but be unable to get into sendQueue as the
writeHandler goroutine has exited.
* The synchronous sends will be waiting on the errChan indefinitely
and startReady will never get closed meaning Disconnect will never
proceed.

The end result is that the server's mutex will be held until shutdown.

Avoid this by using writeMessage to bypass the writeHandler goroutine.
2023-11-08 14:58:41 -08:00
Olaoluwa Osuntokun
0116d9bd0b
Merge pull request #8155 from Roasbeef/v0-17-1-branch-rc2
release: create v0.17.1 rc2 release branch
v0.17.1-beta.rc2
2023-11-07 16:25:20 -08:00
Olaoluwa Osuntokun
8ffd64b554
build: bump version to v0.17.1-beta.rc2 2023-11-06 16:10:55 -08:00
Olaoluwa Osuntokun
7dffad8e13 Merge branch 'v0-17-1-branch-rc2-8116' into v0-17-1-branch-rc2 2023-11-06 16:09:38 -08:00
Oliver Gugger
30fc8e96be GitHub: bump pinned versions in CI check 2023-11-06 16:09:38 -08:00
dependabot[bot]
cbccf61c7f build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 16:09:38 -08:00
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