15430 Commits

Author SHA1 Message Date
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
Oliver Gugger
ebf98c6d51
chanacceptor: add simple taproot channels 2023-09-26 21:45:16 +02:00
Oliver Gugger
3821baa0c8
Merge pull request #8024 from Roasbeef/htlc-resolver-c-queue
contractcourt: modify the incoming contest resolver to use concurrent…
2023-09-26 16:03:10 +00:00
Olaoluwa Osuntokun
abe888f719
contractcourt: modify the incoming contest resolver to use concurrent queue
In this commit, we modify the incoming contest resolver to use a
concurrent queue. This is meant to ensure that the invoice registry
subscription loop never blocks. This change is meant to be minimal and
implements option `5` as outlined here:
https://github.com/lightningnetwork/lnd/issues/8023.

With this change, the inner loop of the subscription dispatch method in
the invoice registry will no longer block, as the concurrent queue uses
a fixed buffer of a queue, then overflows into another queue when that
gets full.

Fixes https://github.com/lightningnetwork/lnd/issues/7917
2023-09-25 18:48:30 -05:00
Oliver Gugger
a1b0a7eb02
Merge pull request #8021 from petertodd/2023-09-fix-ots-name
Fix capitalization of OpenTimestamps in release notes
2023-09-21 10:56:46 +00:00
Peter Todd
d5b88dde72
Fix capitalization of OpenTimestamps in release notes 2023-09-21 02:10:14 -04:00
Olaoluwa Osuntokun
ec585431a9
Merge pull request #8004 from Roasbeef/0-17-rc4
build: bump version to v0.17.0 rc4
v0.17.0-beta.rc4
2023-09-18 18:44:29 -07:00
Olaoluwa Osuntokun
8948dfa113
build: bump version to v0.17.0 rc4 2023-09-18 13:58:41 -07:00
Olaoluwa Osuntokun
9f4a8836db
Merge pull request #7981 from ellemouton/handleRogueUpdates
watchtower: handle rogue updates
2023-09-18 13:56:52 -07:00
Olaoluwa Osuntokun
12be6a37a7
Merge branch 'master' into handleRogueUpdates 2023-09-18 13:55:41 -07:00
Olaoluwa Osuntokun
7412482406
Merge pull request #7994 from Roasbeef/remote-signer-musig2-nonces
multi: add ability to specify local nonces for musig2 signer rpc, add itest for remote signer taproot chans
2023-09-18 13:54:14 -07:00
Olaoluwa Osuntokun
2359481226
Merge pull request #7983 from Roasbeef/blocking-and-mutex-profile
lnd+config: add ability to obtain blocking and mutex profiles
2023-09-18 11:45:40 -07:00
Olaoluwa Osuntokun
23a153abae
lnd+config: add ability to obtain blocking and mutex profiles
In this commit, we add the ability to obtain blocking and mutex
profiles. The blocking profile will show which goroutines are
consistently blocked on synchronization primitives like channels, or
I/O. The mutex profile will show which mutexes are very contested.

The blocking profile can be enabled with a new arg: `--blockingprofile`.
The mutex profile can be enabled with a new arg: `--mutexprofile`. These
are both ignored if the profile port isn't set.

Activating these profiles requires the caller to pass in a sampling
rate. For now I've set it just to `1` to test things out. Unfortunately
documentation is rather scarce, so there aren't any good guides re what
these values should be set to. AFAICT, these add more overhead than the
other prowling options, so they shouldn't necessarily be enabled
persistently in production.
2023-09-18 11:44:49 -07:00
Olaoluwa Osuntokun
6c3a55d89c
itest: add remote signer test case for taproot chans
This ensures that taproot chans can be used with the remote signer
configuration.
2023-09-18 11:42:20 -07:00