18486 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
66077b1722
chainio: demote per-block logging to Debugf 2025-03-24 15:49:21 -07:00
Oliver Gugger
f7b3177483
Merge pull request #9558 from kornpow/fix-listchaintxns-lncli-inputs
Fix input sanitation for listchaintxns lncli cmd
2025-03-24 13:53:29 -06:00
Oliver Gugger
e979538cf9
Merge pull request #9634 from hieblmi/fix-nil-pointer
routerrpc: add nil check for MilliSat
2025-03-24 11:45:30 -06:00
Sam Korn
2d829560a6
docs: update release notes 2025-03-24 10:53:38 -06:00
Sam Korn
bb398456b5
cmd: more input parameters checks for listchaintxns cli command
add a parsing block height function and error when block heights would produce invalid results
2025-03-24 10:53:38 -06:00
Oliver Gugger
6a9ec1065b
Merge pull request #9612 from GustavoStingelin/tests/multimutex
multimutex: add unit tests
2025-03-24 10:14:58 -06:00
Slyghtning
d38ad17478
docs: update release notes 2025-03-24 16:57:42 +01:00
Slyghtning
35c9eecf4e
routerrpc: add nil check for MilliSat 2025-03-24 16:54:05 +01:00
Gustavo Stingelin
a404f34646
multimutex: add unit tests 2025-03-24 00:40:35 -03:00
Olaoluwa Osuntokun
5235f3b24f
Merge pull request #9623 from Roasbeef/size-msg-test-msg
Size msg test msg
2025-03-21 12:18:36 -07:00
Olaoluwa Osuntokun
05a6b6838f
lnwire: add new TestSerializedSize method
This uses all the interfaces and implementations added in the prior test.
2025-03-20 18:28:53 -07:00
Olaoluwa Osuntokun
b2f24789dc
lnwire: revamp TestLightningWireProtocol using new rapid test gen
With what we added in the prior commit, we can significantly shrink the
size of this test. We also make it easier to extend in the future, as
this will fail if a new message is added, that doesn't have the needed
methods, as long as MsgEnd is updated.
2025-03-20 18:28:23 -07:00
Olaoluwa Osuntokun
eb877db2ff
lnwire: add new TestMessage interface for property tests
In this commit, we add a new `TestMessage` interface for use in property
tests. With this, we'll be able to generate a random instance of a given
message, using the rapid byte stream. This can also eventually be useful
for fuzzing.
2025-03-20 18:28:07 -07:00
Olaoluwa Osuntokun
56a100123b
lnwire: add new SerializedSize method to all wire messages
This'll be useful for the bandwidth based rate limiting we'll implement
in the next commit.
2025-03-20 18:27:52 -07:00
Yong
5d921723b1
Merge pull request #9609 from yyforyongyu/fix-listunspent
Fix inaccurate `listunspent` result
2025-03-21 09:22:11 +08:00
yyforyongyu
bdcd980868
docs: update release notes 2025-03-21 08:06:19 +08:00
yyforyongyu
ea66dacc07
itest: skip force close restart in windows 2025-03-21 08:06:19 +08:00
yyforyongyu
feeb9acaa7
itest: document flakeRaceInBitcoinClientNotifications 2025-03-21 08:06:19 +08:00
yyforyongyu
f0300762c0
lnwallet: move btcwallet log under BTWL
So we can focus on debugging `BTWL` without concerning `lnwallet`, which
has a lot of channel-specific loggings.
2025-03-21 08:06:18 +08:00
yyforyongyu
07f60bd910
lnd: enable logging for sqldb 2025-03-21 08:06:18 +08:00
yyforyongyu
9a25d7172e
sweep: improve loggings 2025-03-21 08:06:18 +08:00
yyforyongyu
533aeb8a25
itest: remove flakeFundExtraUTXO 2025-03-21 08:06:18 +08:00
yyforyongyu
07c60c85f9
lnwallet: remove direct walletdb reference
To make sure the db layer is not exposed and is only managed by the
`btcwallet` package.
2025-03-21 08:06:18 +08:00
yyforyongyu
6e1c098923
gomod: update btcwallet 2025-03-21 08:06:18 +08:00
yyforyongyu
16348e61db
sqldb: add trace logs in ExecuteSQLTransactionWithRetry 2025-03-21 08:06:17 +08:00
Olaoluwa Osuntokun
e8875e06fe
Merge pull request #9602 from lightningnetwork/yy-pending-remote-commit
multi: make sure HTLCs are locked in the itest
2025-03-20 18:11:02 -05:00
yyforyongyu
3b7f9e1975
docs: update release notes 2025-03-21 03:25:24 +08:00
yyforyongyu
652d39dcc7
itest: fix flakeSkipPendingSweepsCheckDarwin
Now that we have the new RPC to assert the HTLC state, this flake should
be fixed.
2025-03-21 03:25:24 +08:00
yyforyongyu
5a72d5258f
htlcswitch+itest: catch link quit signal when processing hodlQueue
This commit makes sure when processing resolutions, e.g, settling
invoices, when the link is already broken, the process would exit with
an error. This fixes the issue we found in the itest, where an
unexpected empty remote pending commitment was created although the
remote peer is already offline.
2025-03-21 03:25:24 +08:00
yyforyongyu
0892b595dd
lnrpc+rpcserver: add new field LockedIn for HTLCs
In this commit, we add a new field `LockedIn` on HTLCs so it can be used
to decide whether an HTLC found on the local commitment has been
committed on the remote commitment.
2025-03-21 03:25:23 +08:00
yyforyongyu
be4c4cc8ff
multi: improve logging 2025-03-21 03:24:26 +08:00
yyforyongyu
66c94cf51f
contractcourt: add String to CommitSet for logging 2025-03-21 03:24:26 +08:00
yyforyongyu
c5f17180bc
netann: remove unused param in newMockGraph 2025-03-21 03:24:26 +08:00
Yong
09b6745086
Merge pull request #9600 from lightningnetwork/yy-more-flakes
lntest+itest: document and fix more flakes
2025-03-21 03:23:02 +08:00
Oliver Gugger
b031002aed
Merge pull request #9604 from jjjike2021/fix-dep
fn: remove x/exp/slices dependency
2025-03-20 11:10:18 -06:00
Olaoluwa Osuntokun
ea050d06f0
Merge pull request #9610 from lightningnetwork/rbf-staging
multi: integrate rbf changes from staging branch
2025-03-19 15:01:23 -05:00
Oliver Gugger
de1ed93f52
Merge pull request #9601 from bitromortac/2503-neutrino-maxpeers
lnd: pass through neutrino MaxPeers config
2025-03-18 16:41:39 -06:00
Olaoluwa Osuntokun
42fa83700a docs/release-notes: update release notes for RBF close 2025-03-18 12:48:01 -05:00
bitromortac
a93ec3b01a
lnd: pass through neutrino MaxPeers config
This enables users to set the config. We check that the currently set
value of MaxPeers is non-zero.
2025-03-18 17:55:20 +01:00
Olaoluwa Osuntokun
3681ba6d8b peer: for RBF state machine block req if RBF iterating is outstanding
This fixes an issue in the itests in the restart case. We'd see an error
like:
```
2025-03-12 23:41:10.754 [ERR] PFSM state_machine.go:661: FSM(rbf_chan_closer(2f20725d9004f7fda7ef280f77dd8d419fd6669bda1a5231dd58d6f6597066e0:0)): Unable to apply event err="invalid state transition: received *chancloser.SendOfferEvent while in ClosingNegotiation(local=LocalOfferSent(proposed_fee=0.00000193 BTC), remote=ClosePending(txid=07229915459cb439bdb8ad4f5bf112dc6f42fca0192ea16a7d6dd05e607b92ae, party=Remote, fee_rate=1 sat/vb))"
```

We resolve this by waiting to send in the new request unil the old one
has been completed.
2025-03-18 11:44:59 -05:00
Olaoluwa Osuntokun
8df58a984c lnwallet/chancloser: add docs for new rbf chan closer 2025-03-18 11:44:59 -05:00
Olaoluwa Osuntokun
720d98cc15 msgmux: fix arg expectation for mock in unit test 2025-03-18 11:44:59 -05:00
Olaoluwa Osuntokun
8d9ed0ca73 docs/release-notes: add rbf coop close section 2025-03-18 11:44:59 -05:00
Olaoluwa Osuntokun
fccd984ac1 multi: extract new DeriveHeightHint() function, use for new rbf closer
With this commit, we make sure we set the right height hint, even if the
channel is a zero conf channel.
2025-03-18 11:44:59 -05:00
Olaoluwa Osuntokun
971ac5a14d itest: add new RBF coop close itest
The itest has both sides try to close multiple times, each time with
increasing fee rates. We also test the reconnection case, bad RBF
updates, and instances where the local party can't actually pay for
fees.
2025-03-18 11:44:57 -05:00
Olaoluwa Osuntokun
3a18bf088c multi: enable RBF co-op bumps after reconnection
In this commit, we alter the existing co-op close flow to enable RBF
bumps after re connection. With the new RBF close flow, it's possible
that after a success round _and_ a re connection, either side wants to do
another fee bump. Typically we route these requests through the switch,
but in this case, the link no longer exists in the switch, so any
requests to fee bump again would find that the link doesn't exist.

In this commit, we implement a work around wherein if we have an RBF
chan closer active, and the link isn't in the switch, then we just route
the request directly to the chan closer via the peer. Once we have the
chan closer, we can use the exact same flow as prior.
2025-03-18 11:44:21 -05:00
Olaoluwa Osuntokun
80b48fb49b peer: update rbf close client logic w/ error and iteration awareness
We'll properly handle a protocol error due to user input by halting, and
sending the error back to the user.

When a user goes to issue a new update, based on which state we're in,
we'll either kick off the shutdown, or attempt a new offer. This matches
the new spec update where we'll only send `Shutdown` once per
connection.
2025-03-18 11:44:21 -05:00
Olaoluwa Osuntokun
fbc67f7610 lntest+itest: extend CloseChannelAssertPending
In this commit, we extend `CloseChannelAssertPending` with new args that
returns the raw close status update (as we have more things we'd like to
assert), and also allows us to pass in a custom fee rate.
2025-03-18 11:44:21 -05:00
Olaoluwa Osuntokun
2899a757c4 lntest: fix error message in WaitForChannelCloseEvent
Resp is always nil, so we actually need to log event.Update here.
2025-03-18 11:44:21 -05:00
Olaoluwa Osuntokun
81d34c4ac2 peer+rpc: set new rbf coop close rbf update fields 2025-03-18 11:44:20 -05:00