Commit Graph
380 Commits
Author SHA1 Message Date
Oliver Gugger 1227eb1cce Merge pull request #9491 from ziggie1984/closechannel-rpc
Allow coop closing a channel with HTLCs on it via lncli
2025-02-21 05:05:53 -06:00
ziggie f458844412 lnd: add max fee rate check to closechannel rpc 2025-02-20 17:43:18 +01:00
ziggie 59443faa36 multi: coop close with active HTLCs on the channel
For the lncli cmd we now always initiate the coop close even if
there are active HTLCs on the channel. In case HTLCs are on the
channel and the coop close is initiated LND handles the closing
flow in the background and the lncli cmd will block until the
transaction is broadcasted to the mempool. In the background LND
disallows any new HTLCs and waits until all HTLCs are resolved
before kicking of the negotiation process.
Moreover if active HTLCs are present and the no_wait param is not
set the error msg is now highlightning it so the user can react
accordingly.
2025-02-20 17:43:18 +01:00
yyforyongyu c61f781be7 itest: split up force close tests
So we can focus on testing normal flow vs persistence flow.
2025-02-20 14:40:54 +08:00
yyforyongyu 388183e173 itest: add fee replacement test 2025-02-20 14:40:52 +08:00
Olaoluwa Osuntokun 7b294311bc Merge pull request #9150 from yyforyongyu/fix-stuck-payment
routing+htlcswitch: fix stuck inflight payments
2025-02-11 18:02:02 -08:00
yyforyongyu e45e1f2b0e itest: fix flake in testForwardInterceptorRestart
We need to make sure the links are recreated before calling the
interceptor, otherwise we'd get the following error, causing the test to
fail.
```
2025-02-07 15:01:38.991 [ERR] RPCS interceptor.go:624: [/routerrpc.Router/HtlcInterceptor]: fwd (Chan ID=487:3:0, HTLC ID=0) not found
```
2025-02-10 12:24:23 +08:00
yyforyongyu ca10707b26 itest+lntest: assert payment is failed once the htlc times out 2025-02-10 11:31:51 +08:00
Olaoluwa Osuntokun ce8cde6911 Merge pull request #9470 from ziggie1984/fix-sweepInput-bug
CI / Sqlc check (push) Has been cancelled
CI / RPC and mobile compilation check (push) Has been cancelled
CI / check commits (push) Has been cancelled
CI / lint code (push) Has been cancelled
CI / cross compilation (amd64, darwin-amd64 freebsd-amd64 linux-amd64 netbsd-amd64 openbsd-amd64 windows-amd64) (push) Has been cancelled
CI / cross compilation (arm, darwin-arm64 freebsd-arm linux-armv6 linux-armv7 linux-arm64 windows-arm) (push) Has been cancelled
CI / cross compilation (i386, freebsd-386 linux-386 windows-386) (push) Has been cancelled
CI / sample configuration check (push) Has been cancelled
CI / run unit tests (btcd unit-cover) (push) Has been cancelled
CI / run unit tests (btcd unit-race) (push) Has been cancelled
CI / run unit tests (unit tags="kvdb_etcd") (push) Has been cancelled
CI / run unit tests (unit tags="kvdb_postgres") (push) Has been cancelled
CI / run unit tests (unit tags="kvdb_sqlite") (push) Has been cancelled
CI / run unit tests (unit-module) (push) Has been cancelled
CI / basic itests (backend="bitcoind notxindex", bitcoind-notxindex) (push) Has been cancelled
CI / basic itests (backend=bitcoind cover=1, bitcoind) (push) Has been cancelled
CI / basic itests (backend=btcd cover=1, btcd) (push) Has been cancelled
CI / basic itests (backend=neutrino cover=1, neutrino) (push) Has been cancelled
CI / itests (backend="bitcoind rpcpolling", bitcoind-rpcpolling) (push) Has been cancelled
CI / itests (backend=bitcoind dbbackend=etcd, bitcoind-etcd) (push) Has been cancelled
CI / itests (backend=bitcoind dbbackend=postgres nativesql=true, bitcoind-postgres-nativesql) (push) Has been cancelled
CI / itests (backend=bitcoind dbbackend=postgres, bitcoind-postgres) (push) Has been cancelled
CI / itests (backend=bitcoind dbbackend=sqlite nativesql=true, bitcoind-sqlite-nativesql) (push) Has been cancelled
CI / itests (backend=bitcoind dbbackend=sqlite, bitcoind-sqlite) (push) Has been cancelled
CI / windows itest (push) Has been cancelled
CI / macOS itest (push) Has been cancelled
CI / check pinned dependencies (github.com/golang/protobuf v1.5.3) (push) Has been cancelled
CI / check pinned dependencies (google.golang.org/grpc v1.59.0) (push) Has been cancelled
CI / check release notes updated (push) Has been cancelled
CI / finish (push) Has been cancelled
Docker image build / main (push) Has been cancelled
Make BumpFee RPC user inputs more stricter.
2025-02-07 14:39:31 -08:00
ziggie 34c4d12c71 walletrpc: add new deadline-delta param to bumpfee rpc
Add new parameter deadline-delta to the bumpfee request and only
allow it to be used when the budget value is used as well.
2025-02-07 11:28:41 +01:00
András Bánki-Horváth 327eb8d8ca Merge pull request #9438 from bhandras/invoice-bucket-tombstone
channeldb+lnd: set invoice bucket tombstone after migration
2025-02-01 10:59:51 +01:00
ziggie 17e37bd7c2 multi: introduce new traffic shaper method.
We introduce a new specific fail resolution error when the
external HTLC interceptor denies the incoming HTLC. Moreover
we introduce a new traffic shaper method which moves the
implementation of asset HTLC to the external layers.
Moreover itests are adopted to reflect this new change.
2025-01-29 09:59:02 +01:00
ziggie 9ee12ee029 invoices: treat replayed HTLCs beforehand.
We make sure that HTLCs which have already been decided upon
are resolved before before allowing the external interceptor to
potentially cancel them back. This makes the implementation for
the external HTLC interceptor more streamlined.
2025-01-29 09:59:02 +01:00
yyforyongyu bc8c1643c6 itest: move channel force closes into one sub test var 2025-01-26 09:16:02 +08:00
yyforyongyu e4b205cd90 itest: fix flake in testAnchorThirdPartySpend
When mining lots of blocks in the itest, the subsystems can be out of
sync in terms of the best block height. We now assert the num of pending
sweeps on Alice's node to give her more time to sync the blocks,
essentially behaving like a `time.Sleep` as in reality, the blocks would
never be generated this fast.
2025-01-26 09:15:36 +08:00
Andras Banki-Horvath 444524a762 channeldb+lnd: set invoice bucket tombstone after migration
This commit introduces the functionality to set a tombstone key
in the invoice bucket after the migration to the native SQL
database. The tombstone prevents the user from switching back
to the KV invoice database, ensuring data consistency and
avoiding potential issues like lingering invoices or partial
state in KV tables. The tombstone is checked on startup to
block any manual overrides that attempt to revert the migration.
2025-01-23 15:06:09 +01:00
Oliver Gugger 6cabc74c20 Merge pull request #8831 from bhandras/sql-invoice-migration
invoices: migrate KV invoices to native SQL for users of KV SQL backends
2025-01-23 05:48:25 -06:00
Andras Banki-Horvath 0839d4ba7b itest: remove obsolete itest 2025-01-23 09:11:02 +01:00
Andras Banki-Horvath a29f2430c1 itest: add integration test for invoice migration 2025-01-23 09:11:01 +01:00
Oliver Gugger baa3b0dea3 Merge pull request #9425 from yyforyongyu/flake-fix
itest: fix flake in `testSweepHTLCs`
2025-01-17 10:36:55 -06:00
Oliver Gugger 27df4af53e Merge pull request #9359 from NishantBansal2003/fix-timeout
routerrpc: add a default value for timeout_seconds in SendPaymentV2
2025-01-17 09:43:38 -06:00
yyforyongyu c24f839fbe itest: fix flake in testSweepHTLCs
We need to make sure Caarol finishes settling her invoice with Bob
before shutting down, so we make sure `AssertHTLCNotActive` on Bob
happens before shutting node Carol.
2025-01-17 22:58:37 +08:00
yyforyongyu e576d661ef itest: fix docs 2025-01-16 23:00:21 +08:00
yyforyongyu 848f42ea1d itest: fix flake in graph_topology_notifications
We need to make sure to wait for the `ListPeers` to give us the latest
response.
2025-01-16 16:19:37 +08:00
Nishant Bansal 23efbef946 itest: update tests with timeout_seconds
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-01-15 19:46:09 +05:30
Elle e9dd01b60d Merge pull request #9274 from ziggie1984/remove-2x-value
The sweeper subsystem uses now also the configured budget values for HTLCs
2025-01-13 19:09:11 +02:00
ziggie 5cd88f7e48 contractcourt: remove 2xamount requirement for the sweeper. 2025-01-08 08:57:50 +01:00
chloefeal 852a8d8746 chore: fix typo 2025-01-05 20:45:35 +08:00
yyforyongyu 2913f6e4c9 itest: fix flake in testCoopCloseWithExternalDeliveryImpl
The response from `ClosedChannels` may not be up-to-date, so we wrap it
inside a wait closure.
2024-12-20 19:38:15 +08:00
yyforyongyu 76eeae32d6 itest: document and fix wallet UTXO flake 2024-12-20 19:38:14 +08:00
yyforyongyu 33b07be8c3 itest: even out num of tests per tranche
Previous splitting logic simply put all the remainder in the last
tranche, which could make the last tranche run significantly more test
cases. We now change it so the remainder is evened out across tranches.
2024-12-20 19:38:14 +08:00
yyforyongyu c536bc220f itest: add a prefix before appending a subtest case 2024-12-20 19:38:13 +08:00
yyforyongyu 5236c05dc6 itest+lntest: add new method FundNumCoins
Most of the time we only need to fund the node with given number of
UTXOs without concerning the amount, so we add the more efficient
funding method as it mines a single block in the end.
2024-12-20 19:38:13 +08:00
yyforyongyu efe81f2d3c itest: track and skip flaky tests for windows
To make the CI indicative, we now starting tracking the flaky tests
found when running on Windows. As a starting point, rather than ignore
the windows CI entirely, we now identify there are cases where lnd can
be buggy when running in windows.

We should fix the tests in the future, otherwise the windows build
should be deleted.
2024-12-20 19:38:12 +08:00
yyforyongyu e79ad6e5aa itest: further reduce block mined in tests 2024-12-20 19:38:12 +08:00
yyforyongyu 6f2e7feb94 itest: breakdown testSendDirectPayment
Also fixes a wrong usage of `ht.Subtest`.
2024-12-20 19:38:12 +08:00
yyforyongyu c7b8379602 itest: break down channel fundmax tests 2024-12-20 19:38:12 +08:00
yyforyongyu 37b8210f37 itest: break down taproot tests 2024-12-20 19:38:12 +08:00
yyforyongyu efae8ea56f itest: break down single hop send to route
Also removed the duplicate test cases.
2024-12-20 19:38:11 +08:00
yyforyongyu c029f0a84f itest: break down basic funding flow tests 2024-12-20 19:38:11 +08:00
yyforyongyu c58fa01a66 itest: break down wallet import account tests 2024-12-20 19:38:11 +08:00
yyforyongyu 31aada65a4 itest: break down channel backup restore tests 2024-12-20 19:38:11 +08:00
yyforyongyu 7b1427a565 itest: break down payment failed tests 2024-12-20 19:38:11 +08:00
yyforyongyu 3319d0d983 itest: break down open channel fee policy 2024-12-20 19:38:11 +08:00
yyforyongyu 21c5d36812 itest: break down scid alias channel update tests 2024-12-20 19:38:10 +08:00
yyforyongyu 04a15039d7 itest: break all multihop test cases 2024-12-20 19:38:10 +08:00
yyforyongyu a76ff79adc itest: break down utxo selection funding tests 2024-12-20 19:38:10 +08:00
yyforyongyu b1cb819f07 itest: break down channel restore commit types cases 2024-12-20 19:38:10 +08:00
yyforyongyu 5663edfc2f itest: break remote signer into independent cases
So the test can run faster.
2024-12-20 19:38:10 +08:00
yyforyongyu cca2364097 itest: optimize blocks mined in testGarbageCollectLinkNodes
There's no need to mine 80ish blocks here.
2024-12-20 19:38:10 +08:00