Commit Graph
18378 Commits
Author SHA1 Message Date
Eugene Siegel d5ecad3834 itest: new test to check server access perms 2025-03-11 20:42:35 -04:00
Eugene Siegel 68ec766b61 funding+server.go: modify notifications to pass through server
This modifies the various channelnotifier notification functions
to instead hit the server and then call the notification routine.
This allows us to accurately modify the server's maps.
2025-03-11 20:42:35 -04:00
Eugene Siegel 6eb746fbba server.go+accessman.go: introduce caches for access permissions
Here we introduce the access manager which has caches that will
determine the access control status of our peers. Peers that have
had their funding transaction confirm with us are protected. Peers
that only have pending-open channels with us are temporary access
and can have their access revoked. The rest of the peers are granted
restricted access.
2025-03-11 20:42:34 -04:00
Eugene Siegel 4cfc92f420 channelnotifier: add FundingTimeout and NotifyFundingTimeout
This signal will be used in the server.go code to potentially
demote temporary-access peers to restricted-access peers.
2025-03-11 20:42:34 -04:00
Eugene Siegel 15f17633aa channeldb: FetchPermAndTempPeers to load access perms on startup
We introduce a new func FetchPermAndTempPeers that returns two maps.
The first map indicates the nodes that will have "protected" access
to the server. The second map indicates the nodes that have
"temporary" access to the server. This will be used in a future
commit in the server.go code.
2025-03-11 20:42:34 -04:00
Oliver Gugger 5d8309ea6b Merge pull request #9596 from JoeGruffins/testingbtcwalletchange
deps: Update btcwallet to v0.16.10.
2025-03-11 11:31:25 -06:00
Oliver Gugger 04c76101dd Merge pull request #9595 from yyforyongyu/fix-gossip-syncer
multi: fix flakes and gossip syncer
2025-03-11 09:33:05 -06:00
JoeGruff c8d032afa9 deps: Update btcwallet to v0.16.10. 2025-03-11 11:11:29 +09:00
Oliver Gugger a673826dee Merge pull request #9563 from yyforyongyu/fix-unit-test
chanbackup: fix test flake in `TestUpdateAndSwap`
2025-03-10 16:01:57 -06:00
Oliver Gugger 97bba57520 Merge pull request #9597 from guggero/rebase-fix
contractcourt: fix rebase issue with removed variadic option
2025-03-10 15:46:51 -06:00
Oliver Gugger 0e9b7c5fa2 contractcourt: fix rebase issue with removed variadic option
The optional variadic functional parameters probably got lost during a
rebase.
2025-03-10 21:52:02 +01:00
yyforyongyu faf8ce161a docs: update release notes 2025-03-10 17:03:00 +08:00
yyforyongyu d0abfbbaff itest: remove redundant resume action
Removed a redundant resume action found in
`testForwardInterceptorRestart`, which was put there likely due to a
mistake.
2025-03-10 16:58:16 +08:00
yyforyongyu 51daa13cd7 routerrpc: improve logging in forwardInterceptor 2025-03-10 16:58:16 +08:00
yyforyongyu 37799b95b7 discovery: fix state transition in GossipSyncer
Previously, we would set the state of the syncer after sending the msg,
which has the following flow,

1. In state `queryNewChannels`, we send the msg `QueryShortChanIDs`.
2. Once the msg is sent, we change to state `waitingQueryChanReply`.

But there's no guarantee the remote won't reply back inbetween the two
step. When that happens, our syncer would still be in state
`queryNewChannels`, causing the following error,
```
[ERR] DISC gossiper.go:873: Process query msg from peer [Alice] got unexpected msg *lnwire.ReplyShortChanIDsEnd received in state queryNewChannels
```

To fix it, we now make sure the state is updated before sending the msg.
2025-03-10 16:58:16 +08:00
yyforyongyu 4d05730c79 tor: fix msg order in TestReconnectSucceed 2025-03-10 16:58:16 +08:00
yyforyongyu 76ade177af chanbackup: fix test flake in TestUpdateAndSwap
To make it easier to debug, we break the old test into smaller ones and
fix a flake caused by uncleaned test dir.
2025-03-09 13:41:22 +08:00
Olaoluwa Osuntokun b21b1e3acb Merge pull request #9592 from guggero/tor-update
mod: bump tor submodule to v1.1.5 to fix flake
2025-03-07 16:21:03 -08:00
Oliver Gugger 342a75891c mod: bump tor submodule to v1.1.5 to fix flake
After merging #9581, the flake in the coverage unit test should be gone.
All we have to do is update the submodule version to the fixed one
(since during unit tests the module is used not the physical directory
on disk).
2025-03-07 19:39:00 +01:00
Oliver Gugger d5a7e8957f Merge pull request #9581 from yyforyongyu/fix-TestReconnectSucceed
tor: fix `TestReconnectSucceed`
2025-03-07 12:37:19 -06:00
Oliver Gugger 115b452abe Merge pull request #9562 from NishantBansal2003/test-num-block-fund
Make MaxWaitNumBlocksFundingConf Configurable for itest
2025-03-07 12:35:30 -06:00
Oliver Gugger ab2dc09eb7 Merge pull request #9582 from yyforyongyu/flake-doc
itest: properly document the known flakes
2025-03-07 10:37:14 -06:00
Nishant Bansal 9a9086b26f docs: add release notes.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-03-07 21:33:15 +05:30
Nishant Bansal 4569c07e08 multi: Add itest for funding timeout
This commit adds an integration test that
verifies the funding timeout behavior in the
funding manager, in dev/integration test.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-03-07 21:32:38 +05:30
Oliver Gugger a5f54d1d6b Merge pull request #9573 from ellemouton/checkUpdateStalenessBeforeRateLimit
discovery: obtain channelMtx before doing any DB calls in `handleChannelUpdate`
2025-03-07 04:17:00 -06:00
Oliver Gugger 76808a81a0 Merge pull request #9587 from guggero/mining-block-limit-configurable
lntest: make mining block limit configurable
2025-03-07 02:57:29 -06:00
Oliver Gugger 25c83104b7 lntest: make mining block limit configurable
Nudging test authors towards not mining too many blocks makes sense,
especially in lnd where we have a lot of integration tests.
But the lntest package is also used in other projects where this
restriction might lead to large refactors.
To be able to stage those refactors we also want to allow this limit to
be configurable if lntest is used as a library.
2025-03-07 09:22:51 +01:00
Oliver Gugger 72b570320a Merge pull request #9586 from ellemouton/logConfig
config: only create a sub-log manager if one doesnt already exist
2025-03-07 01:30:02 -06:00
Elle Mouton 090e687144 config: only create a sub-log manager if one doesnt already exist
The ValidateConfig method needs to account for the caller already having
an initialised build.SubLoggerManager and then should not override it.
2025-03-06 18:02:25 +02:00
Oliver Gugger 7d7e1872c8 Merge pull request #9574 from ellemouton/fixWatcherPanic
lntest: wait for ChanUpdate req to be fully processed before sending another
2025-03-06 09:21:35 -06:00
yyforyongyu 95569df92e itest: document a flake found on macOS 2025-03-06 22:46:31 +08:00
yyforyongyu 0f8f092ddd itest: document a flake from TxNotifier 2025-03-06 09:11:30 +08:00
yyforyongyu 2f545717c9 itest: remove old TODOs
As they are fixed now.
2025-03-06 09:11:30 +08:00
yyforyongyu f349323923 itest: move test testDisconnectingTargetPeer
Hence finish an old TODO.
2025-03-06 09:11:30 +08:00
yyforyongyu 4755eff0a8 itest: remove time.Sleep before closing channels
Remove an old TODO, which has been fixed with the `NoWait` flag for coop
close.
2025-03-06 09:11:13 +08:00
Elle Mouton 95277bbc35 docs: update release notes 2025-03-05 14:12:56 +02:00
Elle Mouton 2e85e08556 discovery: grab channel mutex before any DB calls
In `handleChanUpdate`, make sure to grab the `channelMtx` lock before
making any DB calls so that the logic remains consistent.
2025-03-05 14:12:55 +02:00
Elle Mouton 5e35bd8328 discovery: demonstrate channel update rate limiting bug
This commit adds a test to demonstrate that if we receive two identical
updates (which can happen if we get the same update from two peers in
quick succession), then our rate limiting logic will be hit early as
both updates might be counted towards the rate limit. This will be fixed
in an upcoming commit.
2025-03-05 14:12:23 +02:00
yyforyongyu a116eef5eb tor: fix TestReconnectSucceed
We now make sure the proxy server is running on a unique port. In
addition, we close the old conn before making a new conn.
2025-03-05 19:09:15 +08:00
yyforyongyu ec7c36fd6a itest: document missing wallet UTXO 2025-03-05 18:54:13 +08:00
yyforyongyu 061b7abf76 itest: document the flake found in preimage extraction
We now use dedicated methods to properly document the flakes in *one*
place.
2025-03-05 18:54:13 +08:00
Oliver Gugger 9feb761b4e Merge pull request #9576 from ellemouton/logConfYamlTags
build: add yaml tags to some LogConfig fields
2025-03-04 13:27:11 -06:00
Elle Mouton 1dec8ab985 build: add yaml tags to embedded LogConfig structs
For any embedded struct, the `yaml:",inline"` tag is required.
2025-03-04 13:32:22 +02:00
Elle Mouton 57c6c236d8 lntest: wait for ChanUpdate req to be fully processed before sending another
Before this commit, it was possible for a request to be sent on the
`chanWatchRequests` channel in `WaitForChannelPolicyUpdate` and then for
the `ticker.C` case to select _before_ the `eventChan` select gets
triggered when the `topologyWatcher` closes the `eventChan` in its call
to `handlePolicyUpdateWatchRequest`. This could lead to a "close of a
closed channel" panic.

To fix this, this commit ensures that we only move on to the next
iteration of the select statement in `WaitForChannelPolicyUpdate` once
the request sent on `chanWatchRequests` has been fully handled.
2025-03-03 17:53:15 +02:00
Olaoluwa Osuntokun f744a5477f Merge pull request #9565 from guggero/bot-typo-fix-spam
GitHub+docs: no longer accept typo fixes to fight PR spam
2025-02-28 16:18:17 -08:00
Oliver Gugger f1182e4338 Merge pull request #9521 from guggero/coverage-fixes
unit: remove GOACC, use Go 1.20 native coverage functionality
2025-02-28 09:54:12 -06:00
Oliver Gugger 7761e37522 GitHub: remove generated files from coverage 2025-02-28 14:55:34 +01:00
Oliver Gugger 124137e31a GitHub+make: debug failing test, use official coveralls action 2025-02-28 14:55:34 +01:00
Oliver Gugger 576da75a07 multi: remove unneeded env variables
With Go 1.23 we don't need to set any of these variables anymore, as
they're the default values now.
2025-02-28 14:55:34 +01:00
Oliver Gugger 70ac201cb8 make+tools: remove goacc, use Go 1.20 builtin functionality
Starting with Go 1.20 the -coverprofile flag does the same that GOACC
did before.
2025-02-28 14:55:33 +01:00