15447 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
6cbe5172d6 Merge branch 'v0-17-4-branch-8428' into v0-17-4-branch 2024-01-29 17:58:17 -08:00
ziggie
b02bbd5e95 docs: update release-notes. 2024-01-29 17:58:08 -08:00
ziggie
f9a2818d95 mod: update btcwallet version.
Update the btcwallet version to fix a case where fetching of
already pruned blocks from our peers was not garbage collected
when the request failed.
2024-01-29 17:57:14 -08:00
Olaoluwa Osuntokun
08cb77c415
build: bump version to v0.17.4-beta.rc1 2024-01-24 16:52:01 -08:00
Olaoluwa Osuntokun
2859a5a16d Merge branch 'v0-17-4-branch-8401' into v0-17-4-branch 2024-01-24 16:51:00 -08:00
yyforyongyu
a6fc5a901a chainreg: satisfy chain.Interface in NoChainSource 2024-01-24 16:50:52 -08:00
yyforyongyu
6d566068df docs: update release notes for mem leak fix 2024-01-24 16:50:51 -08:00
yyforyongyu
033292f2c2 blockcache: fix heap escape in GetBlock
This commit fixes a heap escape found in `GetBlock`. This happens
because the `msgBlock` is a pointer returned from `getBlockImpl`, and
the whole `getBlockImpl` escapes to the heap because it's referenced in
two places,
- in the `Cache`, it's used as a reference type to create the new block.
- this pointer is also returned and now needs to stay on the heap.

The fix is simple, we now make a copy of the block and use the copy
instead, freeing `getBlockImpl` from the heap.
2024-01-24 16:48:32 -08:00
yyforyongyu
68c24831df gomod: update btcd version to fix mem leak 2024-01-24 16:48:30 -08:00
Olaoluwa Osuntokun
599ff50fd4 Merge branch 'v0-17-4-branch-8406' into v0-17-4-branch 2024-01-24 16:46:48 -08:00
ziggie
a258ff74e9 docs: add release-notes. 2024-01-24 16:46:40 -08:00
ziggie
8a825a4687 multi: Add itest for a failed funding flow.
This adds an itest for a failed funding flow by our peer.
2024-01-24 16:46:38 -08:00
ziggie
192c35b2c7 peer: add unit test.
Add a unit test for the removal of a pending channel.
2024-01-24 16:46:02 -08:00
ziggie
39206a96fb funding: initialize remove channel. 2024-01-24 16:46:02 -08:00
Olaoluwa Osuntokun
0d5deef407 Merge branch 'v0-17-4-branch-8413' into v0-17-4-branch 2024-01-24 16:45:41 -08:00
Elle Mouton
c2a597747d docs: add template for 0.17.4 2024-01-24 16:45:41 -08:00
Olaoluwa Osuntokun
13aa7f9924
build: bump version to v0.17.3-beta v0.17.3-beta 2023-12-05 16:37:53 -08:00
Olaoluwa Osuntokun
d5b05d6930
Merge pull request #8241 from Roasbeef/v0-17-3-branch
release: create v0.17.3-beta.rc1 release branch
v0.17.3-beta.rc1
2023-12-01 14:17:21 -08:00
Olaoluwa Osuntokun
937fe6fda6
build: bump version to v0.17.3-beta.rc1 2023-11-30 15:08:20 -08:00
Olaoluwa Osuntokun
f550d04c7d Merge branch 'v0-17-3-branch-8232' into v0-17-3-branch 2023-11-30 15:06:14 -08:00
yyforyongyu
01eb7e539a gomod: update btcwallet version 2023-11-30 15:06:14 -08:00
Olaoluwa Osuntokun
b4425f6eea Merge branch 'v0-17-3-branch-8151' into v0-17-3-branch 2023-11-30 15:05:52 -08:00
Eugene Siegel
41e251b0d7 release-notes: update for 0.17.3 2023-11-30 15:05:52 -08:00
Eugene Siegel
dd2ead1022 routing: launch fetchFundingTx in goroutine so router can exit
This commit introduces a wrapper function fetchFundingTxWrapper
which calls fetchFundingTx in a goroutine. This is to avoid an issue
with pruned nodes where the router is attempting to stop, but the
prunedBlockDispatcher is waiting to connect to peers that can serve
the block. This can cause the shutdown process to hang until we
connect to a peer that can send us the block.
2023-11-30 15:05:52 -08:00
Olaoluwa Osuntokun
5565dffbd1 Merge branch 'v0-17-3-branch-8220' into v0-17-3-branch 2023-11-30 15:01:15 -08:00
yyforyongyu
87b4749d60 docs: add release notes for v0.17.3 2023-11-30 15:01:15 -08:00
yyforyongyu
bb27135477 lnwallet: make sure loop var is properly referenced 2023-11-30 15:01:15 -08:00
yyforyongyu
c6d52147e8 lnwallet: add unit test for extractPayDescs 2023-11-30 15:01:15 -08:00
yyforyongyu
8ac3480942 multi: enhance logging around channel reestablishment 2023-11-30 15:01:15 -08:00
Olaoluwa Osuntokun
97975098b9 Merge branch 'v0-17-3-branch-8224' into v0-17-3-branch 2023-11-30 14:58:52 -08:00
yyforyongyu
c6836d777e docs: add release notes for v0.17.3 2023-11-30 14:58:52 -08:00
yyforyongyu
dd8be9fc87 lntest: add verbose logging when node fails to shutdown 2023-11-30 14:58:52 -08:00
yyforyongyu
23e177514f input: use lnutils.SyncMap to store musig2 sessions 2023-11-30 14:58:52 -08:00
Olaoluwa Osuntokun
6744c64e62
build: bump version to v0.17.2-beta v0.17.2-beta 2023-11-20 14:31:32 -06:00
Olaoluwa Osuntokun
ceb8e8a109
Merge pull request #8187 from Roasbeef/v0-17-2-branch
release: create v0.17.2-beta release branch
v0.17.2-beta.rc1
2023-11-17 16:10:27 -08:00
Olaoluwa Osuntokun
0aaf144b76
build: bump version to v0.17.2-beta.rc2 2023-11-17 18:09:34 -06:00
Olaoluwa Osuntokun
01761ab99b
docs/release-notes: update release notes for v0.17.2 2023-11-17 18:09:17 -06:00
Olaoluwa Osuntokun
04e0c9bc39 Merge branch 'v0-17-2-branch-8198' into v0-17-2-branch 2023-11-17 18:05:43 -06:00
Matt Morehouse
a331308a02 peer: add test for startup race on writeMessage
The test reliably detects
https://github.com/lightningnetwork/lnd/issues/8184.
2023-11-17 18:05:43 -06:00
Matt Morehouse
a283fc62fa peer: enable mockMessageConn to detect data races
We use unsynchronized counters to trigger a report under the race
detector if multiple reads or writes happen concurrently.
2023-11-17 18:05:43 -06:00
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