18492 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
8c3c53f63b
docs/release-notes: add release notes for gossip rate limit 2025-03-24 19:21:46 -07:00
Olaoluwa Osuntokun
c7ed5d65c6
multi: add new config options to tune gossip msg allocated bandwidth
We go with the defaults of if no values are set.
2025-03-24 19:21:45 -07:00
Olaoluwa Osuntokun
05702d48b2
discovery: switch to bytes based rate limiting for outbound msgs
In this commit, we revamp the old message based rate limiting. First, we
move to meter by bytes/s instead of messages/s. The old logic had an
error in that it limited groups of message replies, instead of each
message. With this new approach, we'll use the newly added
SerializedSize method to implement fine grained bandwidth metering.

We need to pick two values, the burst rate, and the msg bytes rate. The
burst rate is the max amt that can be sent in a given period of time. We
need to set this above 65 KB, or the max msg limit, otherwise no
messages can be sent. The bucket starts with this many tokens (bytes).
As those are depleted, the amount of tokens is refilled at the msg
bytes rate.

As conservative values, we've chosen 200 KB as the burst rate, and 100
KB/s as the limit.
2025-03-24 19:21:45 -07:00
Olaoluwa Osuntokun
67d2eac437
Merge pull request #9620 from guggero/testnet4
chain: add testnet4 support
2025-03-24 15:48:26 -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
d757bb51ee
docs: add release notes 2025-03-24 11:53:23 -05:00
Oliver Gugger
0aea482b51
multi: add testnet4 support 2025-03-24 11:53:23 -05:00
Oliver Gugger
e5b9d9684a
mod: bump btcwallet and neutrino to latest version 2025-03-24 11:53:23 -05: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