495 Commits
Author SHA1 Message Date
ziggie f518931cf0 itest: fix list_payments accuracy edge case 2026-02-25 08:02:18 +01:00
bitromortac fa5722355f itest: test channel update subscription 2026-02-20 10:47:04 +01:00
Elle Mouton bc76383e15 graph/db: rename V1Store to Store
The underling store will store gossip messages across gossip versions
and we will instead expose version parameters on many of the methods. So
this interface really just abstracts the underlying store/schema type.
2026-02-13 07:21:20 +02:00
Slyghtning b8693bea33 itest: add wallet_synced field integration test
In this commit, we add an integration test that verifies the
wallet_synced field in GetInfoResponse correctly reflects the wallet's
sync state.

The test creates a node, verifies wallet_synced becomes true after
initial sync, then stops the node and mines blocks while it's offline.
After restart, the test polls GetInfo to observe the wallet catching up,
ideally capturing the transition from wallet_synced=false to true.

The test is registered in the "wallet sync" test case group.
2026-02-05 08:58:33 +01:00
Olaoluwa Osuntokun 3fb59b1b6b multi: increase min cltv delta to 24 2026-01-16 13:06:30 -08:00
Olaoluwa Osuntokun bb781bbe84 itest: add new coop close rbf itest
This ensures that during the RBF process, if one confirms, a re-org
occurs, then another confirms, that we'll properly detect this case.
2026-01-15 16:22:26 -08:00
Yash Bhutwala 73e7708f15 itest: add fundMax with maxChanSize test
Add integration test to verify that fundMax uses the protocol-level
maximum channel size instead of the user-configured maxChanSize. The
test uses a table-driven approach to cover both non-wumbo and wumbo
scenarios, creating nodes with restrictive maxChanSize (5M sats) and
verifying that fundMax still creates channels at the protocol maximum.
2026-01-13 10:54:55 -05:00
Slyghtning 422aa7d182 itest: estimate on-chain fee with selected inputs 2026-01-07 10:30:03 +01:00
elnosh 6f49bea52b server: remove accountability signal experiment period
In the previous iteration with endorsement
signaling, the recommendation was for the sender to
set it to 1 and that could have had privacy concerns
when first deploying given that the default was to
downgrade the signal to 0. In the latest proposal
the recommended default for both sending and
forwarding nodes is to set `accountable` to 0.
As a result, the dates have been removed given
that there are no privacy risks associated
with relaying the signal with zero values.
2026-01-06 09:12:34 -05:00
elnosh 34329c684e multi: rename experimental endorsement signal to accountable
Renames the endorsement signal to accountable to
match the latest proposal https://github.com/lightning/blips/pull/67
2026-01-06 09:12:31 -05:00
ziggie 5f30797738 itest: fix endorsement itests
Due to the signaling period expiring tests had to be adopted bc
they were not taking the activation time period into account.
2026-01-05 14:28:14 +01:00
ziggie c493f7d9dd itest: accept NO_ROUTE or TIMEOUT in testLocalClaimOutgoingHTLC
Fix flaky test due to race between channel closure propagation and
payment timeout. Both failure reasons are correct depending on timing.
2025-12-19 00:27:20 +01:00
Elle Mouton fb48697ffa itest+lntest: add coordinator pattern test for combined nonce
Add integration test for MuSig2RegisterCombinedNonce and
MuSig2GetCombinedNonce RPCs to verify the coordinator pattern workflow.

The test:
- Creates three signing sessions without initial nonce exchange
- Manually aggregates nonces using the coordinator pattern (btcec musig2)
- Tests v0.4.0 returns unsupported errors (as expected)
- Tests v1.0.0rc2 successfully registers and retrieves combined nonces
- Verifies mutual exclusivity (error: already have all nonces)
- Completes a full signing flow to ensure signatures are valid

Also adds the required RPC harness wrapper methods to lntest/rpc/signer.go for
the new RPCs and adds MuSig2RegisterNoncesErr wrapper for error testing.
2025-12-10 07:19:04 +02:00
ziggie 0e6bab1730 itest: enhance testEstimateRouteFee with multi-LSP scenarios
This commit enhances the integration test to validate the LSP heuristic
end-to-end with real network topology and payment probing.

Network topology additions:
- Added Frank node as a private destination
- Created multi-LSP test scenario with Bob, Eve, and Dave as LSPs

New test cases:

1. "probe based estimate, public target with public hop hints"
   - Validates Rule 1: public invoice target routes directly
   - Even with public hop hints, direct routing is used
   - Expected: standard single-hop fees

2. "probe based estimate, multiple different public LSPs"
   - Validates multi-LSP worst-case selection
   - Frank has routes through Bob (low fee), Eve (HIGH fee), Dave (medium)
   - Expected: Eve's worst-case fees (most expensive)
   - Tests griefing protection (max 3 LSP probes)
2025-12-01 18:07:56 +01:00
Nishant Bansal 4c3cff14f2 itest: add itest for upfront-shutdown-address config
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-11-13 19:32:51 +05:30
Gijs van Dam 07dc74e198 multi: endpoints for onion messages
This commit creates the necessary endpoints for onion messages.
Specifically, it adds the following:

- `SendOnionMessage` endpoint to send onion messages.
- `SubscribeOnionMessages` endpoint to subscribe to incoming onion
  messages.

It uses the `msgmux` package to handle the onion messages.
2025-11-12 22:54:04 +08:00
ziggie cbfc0e0dc2 mulit: don't set customData on the lnrpc route level
We now make sure we only set the custom channel data in the
lnrpc.Route only if it contains relevant data.
2025-11-12 22:54:03 +08:00
ziggie d2d56f2968 linter: remove unsupported linters from the codebase 2025-11-12 22:54:02 +08:00
Abdullahi Yunus 141cc571ab itest: check for config addrs precedence
In this commit, we update the itest to check for precedence of the
config addresses over the persisted addresses.

We did not check for address persistence after restart (without the
extraArgs `--externalip`) because in `lntest/node/config.goL300`,
`GenArg` by default sets the `--externalip` flag, which makes
the config addrs to always take precedence over the persisted
addrs, for the tests.
2025-09-24 10:51:19 +01:00
yyforyongyu 2d59976e16 rpcserver+itest: skip err from FlapCount
We need to make sure the `ListPeers` to be robust against errors from
the `FlapCount` so this RPC won't fail due to no flap count info. Also
updated the itest to check this field.
2025-09-18 22:29:40 +08:00
Yong 5082566ed7 Merge pull request #9677 from NishantBansal2003/conf-count
Expose confirmation count for pending 'channel open' transactions
2025-09-11 22:36:05 +08:00
Nishant Bansal 8f62efb1fa itest: add test for ConfirmationsUntilActive and ConfirmationHeight
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-09-11 18:27:38 +05:30
Elle Mouton 9ce14371e1 multi: switch on graph SQL migration
In this commit, the graph SQL migration is added to the production
build.
2025-09-04 18:52:00 +02:00
Boris Nagaev dee8ad3754 multi: context.Background() -> t.Context()
Use the new feature of Go 1.24, fix linter warnings.

This change was produced by:
 - running golangci-lint run --fix
 - sed 's/context.Background/t.Context/' -i `git grep -l context.Background | grep test.go`
 - manually fixing broken tests
 - itest, lntest: use ht.Context() where ht or hn is available
 - in HarnessNode.Stop() we keep using context.Background(), because it is
   called from a cleanup handler in which t.Context() is canceled already.
2025-08-30 14:13:44 -03:00
Abdullahi Yunus 2dc9ca43f3 itest: test for node ann persistence
This commit adds an itest that verify the behaviour of correctly
reusing persisted node ann configs across restarts. It also ensures
that the node ann configs are applied using the correct hierarchy.
2025-08-16 16:39:53 +01:00
Elle Mouton b1deddec44 multi: remove DefaultQueryConfig
And always make use of either the new DefaultSQLiteConfig or
DefaultPostgresConfig.
2025-08-13 14:43:31 +02:00
Oliver Gugger 74b327ba9c Merge pull request #10127 from ellemouton/graphPerf8
[7] graph/db+autopilot: improve efficiency of autopilot methods that use the ForEachNode/ForEachChannel pattern
2025-08-06 07:05:25 -06:00
Elle Mouton 15e17e1270 graph/db: remove NodeRTx ForEachChannel method 2025-08-06 09:52:10 +02:00
ziggie 5c22e5eb25 itest: add payment test with max htlc restriction 2025-08-06 09:37:09 +02:00
Oliver Gugger cce2df9018 itest: run FundPsbt test with imported account
This demonstrates that the "imported" account behaves differently for a
wallet that's watch-only vs. normal. The testTaprootImportTapscriptFullKeyFundPsbt
test case succeeds in a normal run but fails in a remote-signing setup.

For some reason, an imported tapscript address ends up in the "default"
account when remote-signing but in the "imported" account for a normal
wallet.
2025-08-05 16:41:01 +02:00
Oliver Gugger c214575de1 itest: run normal FundPsbt test case in remote-signer mode
This makes sure there is no general issue with running the pay-join
FundPsbt test case in a remote signer setup.
2025-08-05 16:41:00 +02:00
Yong 3db93f5b29 Merge pull request #10117 from yyforyongyu/keep-exclusive
contractcourt+sweep: make anchor inputs exclusive
2025-08-05 14:57:26 +08:00
Oliver Gugger 7152224b22 Merge pull request #10118 from ellemouton/graphPerf5
[4] sqldb+graph/db: add and use new pagination helper
2025-08-04 05:04:50 -06:00
yyforyongyu 3da4093012 itest: fix tests re the new anchor behavior 2025-08-04 16:50:31 +08:00
Boris Nagaev c22768283c walletrpc: allow conf_target=1 in FundPsbt
Modified 'fund_psbt' itest to test this scenario.
2025-08-01 17:16:02 -03:00
Boris Nagaev cd6e648a7f itest: add test for walletrpc.EstimateFee
Make sure conf_target=1 is accepted, but conf_target=0 is not.
2025-08-01 17:16:00 -03:00
Elle Mouton a6248872cb sqldb: rename ExecutePagedQuery to ExecuteBatchQuery
We rename this helper along the config types & helper types for it
because the word "page" is used more often in the context of paging
through results using an offset and limit whereas this helper is
specifically used to split up the slice in queries of the form
"WHERE x in []slice". We do this rename so that there is mimimal
confusion in contexts where we use batching along with actual paging.

The config struct is also renamed to QueryConfig in preparation for it
holding more config options.
2025-07-31 15:32:53 +02:00
Oliver Gugger f7efc15a9e Merge pull request #9625 from MPins/issue-8161
Add deletecanceledinvoice RPC call
2025-07-30 09:14:06 -06:00
MPins 1a9f591b2b itest: add the test for DeleteCanceledInvoice 2025-07-29 13:55:17 -03:00
Boris Nagaev 8723113d27 itest: RegisterSpendNtfn detects reorgs
Added itest "reorg_notifications" which tests that RegisterSpendNtfn behaves as
expected during a reorg. A reorg notification is produced after a reorg affects
the block which has produced a spending notification for this registration.
2025-07-28 20:18:09 -03:00
Elle 90e2116842 Merge pull request #10081 from ellemouton/graphSQLSlices
graph/db: use `/*SLICE:<field_name>*/` to optimise various graph queries
2025-07-22 18:27:10 +02:00
Elle Mouton 2fa30e8735 graph+config: add sql pagination config to ChannelGraph 2025-07-22 17:16:41 +02:00
Oliver Gugger 6b1c85265f lnrpc+rpcserver: add QoL flag for permission check
To make it even more obvious that by default the permissions to check
aren't taken from the full method provided, we add a new flag that does
that on request.
2025-07-21 13:07:43 +02:00
Elle Mouton 21ac7ef6f4 multi: add reset to ForEachNode 2025-07-15 11:25:09 +02:00
Elle Mouton a2ffa74684 itest: graph sql migration itest
This commit adds a basic itest that is run under the `test_native_sql`
flag. It tests that the migration is idempotent and that the node cant
be restarted without the `db.use-native-sql` flag once the graph
migration has been run.
2025-07-15 06:40:22 +02:00
Elle Mouton f5b50afb92 itest: make invoice mig helpers re-usable
Refactor to make some of the invoice migration helpers re-usable so that
we can use them for the graph migration itests.
2025-07-15 06:35:24 +02:00
Elle Mouton 223cec442b itest: use random hash gen helper 2025-07-15 06:31:51 +02:00
Elle add81f1388 Merge pull request #10064 from ellemouton/getChanInfoGrpcErr
rpcserver: return consistent grpc NotFound error for GetChaninfo & LookupInvoice
2025-07-14 08:34:46 +02:00
Oliver Gugger 63609b0801 Merge pull request #10061 from yyforyongyu/fix-listsweep-itest
itest+lntest: fix flake in `testListSweeps`
2025-07-11 00:25:48 -06:00
Torkel Rogstad c8b04d03f5 itest+lntest: add grpc NotFound error code test 2025-07-10 11:36:20 +02:00