Yong
dd7b186622
Merge pull request #8426 from breez/expose-closing-tx
...
Expose closing tx in waiting_close_channels
2024-01-30 09:13:17 +08:00
Jesse de Wit
b6616bc040
itest: assert closing tx is set in waiting_close_channels
2024-01-29 14:16:51 +01:00
Yong
59feec44ca
Merge pull request #7976 from w3irdrobot/serialize-deserialize-amp
...
Serialize/deserialize AMP struct in hop
2024-01-29 09:48:05 +08:00
Alex Sears
0767a2cbc0
routerrpc: unmarshal AMP record in route hop marshalling
2024-01-26 15:21:43 -05:00
Keagan McClelland
07277172f8
itest+lntest: remove temporary hacks around broken coop close in itests
2024-01-23 14:31:51 -08:00
Keagan McClelland
9e58ebd0fb
itest: test that we can close with in-flight htlcs
2024-01-23 12:25:06 -08:00
ziggie
ccac5c349c
multi: Add itest for a failed funding flow.
...
This adds an itest for a failed funding flow by our peer.
2024-01-22 16:45:38 +00:00
Elle Mouton
55ee01a6ca
itest: add taproot tower itest
2024-01-19 15:33:07 +02:00
Keagan McClelland
109265c77a
multi: make static remote key compulsory
2024-01-11 13:58:01 -08:00
ziggie
a1678fa9b7
itest: multi part payments test fix.
...
Because we need to account for an addtional fee buffer we need to
increase channel capacities for the multi payment tests.
2024-01-08 16:47:47 +01:00
ziggie
1ca3732f25
itest: add an itest for the removal of a tx.
2023-12-12 14:18:16 +01:00
erik
16f05105c1
itest: add gettransactiondetails
2023-12-10 22:14:18 +01:00
Yong
9f42459036
Merge pull request #8177 from yyforyongyu/payment-status
...
routerrpc: optionally return the new payment status
2023-11-30 17:15:23 +08:00
yyforyongyu
ded9fe6a84
itest: fix flake in multi_hop_htlc_remote_chain_claim
2023-11-17 17:29:53 +08:00
yyforyongyu
99354313d5
routerrpc+itest: make sure TrackPayments
is compatible
...
This commit adds an itest case to make sure when the flag
`routerrpc.usestatusinitiated` is not set, the new status is not sent.
2023-11-15 20:18:21 +08:00
yyforyongyu
816a70e08c
multi: add new config usestatusinitiated
for the new payment status
...
This commit adds a new config value to signal that the user understands
the new payment status `StatusInitiated`.
2023-11-15 20:18:17 +08:00
yyforyongyu
5168af55a9
itest: fix flake in max_htlc_pathfind
...
```
lnd_max_htlcs_test.go:149:
Error Trace: /home/runner/work/lnd/lnd/itest/lnd_max_htlcs_test.go:149
/home/runner/work/lnd/lnd/itest/lnd_max_htlcs_test.go:40
/home/runner/work/lnd/lnd/lntest/harness.go:286
/home/runner/work/lnd/lnd/itest/lnd_test.go:136
Error: Not equal:
expected: 3
actual : 0
Test: TestLightningNetworkDaemon/tranche01/60-of-134/btcd/max_htlc_pathfind
Messages: expected accepted
```
2023-11-13 16:11:07 +08:00
Olaoluwa Osuntokun
dacb86fdbc
Merge pull request #8106 from orbitalturtle/sign-tagged-hash-rpc
...
lnrpc: add tagged hash option to signer.SignMessage/VerifyMessage rpcs
2023-11-06 17:05:35 -08:00
Olaoluwa Osuntokun
9287b755d8
macaroons: reject unknown macaroon versions
...
We've only ever made macaroons with the v2 versions, so we should
explicitly reject those that aren't actually v2. We add a basic test
along the way, and also add a similar check for the version encoded in
the macaroon ID.
2023-10-31 13:23:50 -07:00
Olaoluwa Osuntokun
c382268201
Merge pull request #8104 from Roasbeef/taproot-chans-nonce-double-init
...
multi: skip InitRemoteMusigNonces if we've already called it
2023-10-31 13:02:54 -07:00
Slyghtning
12f23d2352
itest: simple taproot channel status
2023-10-31 10:10:43 -07:00
yyforyongyu
fc52a01055
itest: fix test flake in testHtlcTimeoutResolverExtractPreimageRemote
...
From the build,
```
harness_miner.go:218:
Error Trace: /home/runner/work/lnd/lnd/lntest/harness_miner.go:218
/home/runner/work/lnd/lnd/lntest/harness.go:1641
/home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:2207
/home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:152
Error: Received unexpected error:
want 2, got 3 in mempool: [a7cbb5724e39579cfc75d0469270f691988cb67fcc51a332256cafb193cf40bd b12a03a0622a3cf7d53867f060a6de8166e564a1a3109bc2be1ec0b720f305da 073d66885ccded1a770dc9aa5f1d44c8e10ac4e916e5ab50ef5149a5649ec8ba]
Test: TestLightningNetworkDaemon/tranche03/130-of-135/neutrino/htlc_timeout_resolver_extract_preimage_remote/zeroconf=false/committype=SIMPLE_TAPROOT
Messages: assert tx in mempool timeout
harness.go:339: finished test: htlc_timeout_resolver_extract_preimage_remote, start height=1312, end height=1347, mined blocks=35
```
2023-10-31 23:49:31 +08:00
Orbital
aa6f13e524
itest: test SignMessage/VerifyMessage tag option
2023-10-30 21:39:39 -05:00
Jonathan Harvey-Buschel
c5d041f2f4
itest: add GetBlockHeader to ChainKit tests
2023-10-27 11:05:28 -04:00
yyforyongyu
0816f9124c
itest: update itest to reflect new sweeper behavior
2023-10-23 13:01:50 +08:00
Yong
939375f1a5
sweeper: relax anchor sweeping when there's no deadline pressure ( #7965 )
...
* sweep: use longer variable name for clarity in `addToState`
* sweeper: add more docs and debug logs
* sweep: prioritize smaller inputs when adding wallet UTXOs
This commit sorts wallet UTXOs by their values when using them for
sweeping inputs. This way we'd avoid locking large UTXOs when sweeping
inputs and also provide an opportunity to aggregate wallet UTXOs.
* contractcourt+itest: relax anchor sweeping for CPFP purpose
This commit changes from always sweeping anchor for a local force close
to only do so when there is an actual time pressure. After this change,
a forced anchor sweeping will only be attempted when the deadline is
less than 144 blocks.
* docs: update release notes
* itest: update test `testMultiHopHtlcLocalChainClaim` to skip CPFP
Since we now only perform CPFP when both the fee rate is higher and the
deadline is less than 144, we need to update the test to reflect that
Bob will not CPFP the force close tx for the channle Alice->Bob.
* itest: fix `testMultiHopRemoteForceCloseOnChainHtlcTimeout`
* itest: update related tests to reflect anchor sweeping
This commit updates all related tests to reflect the latest anchor
sweeping behavior. Previously, anchor sweeping is always attempted as
CPFP when a force close is broadcast, while now it only happens when the
deadline is less than 144. For non-CPFP purpose sweeping, it will happen
after one block is mined after the force close transaction is confirmed
as the anchor will be resent to the sweeper with a floor fee rate, hence
making it economical to sweep.
2023-10-12 17:18:59 +02:00
Eugene
9478b85e59
htlcswitch/hop: use InvalidOnionVersion for replayed packets ( #7937 )
...
* htlcswitch/hop: use InvalidOnionVersion for replayed packets
The link will send an update_fail_malformed_htlc, so we need to set
the BADONION bit. Since there isn't a replay-specific error, we
set the failure code to InvalidOnionVersion which has the BADONION bit.
* release-notes: update for 0.17.1
2023-10-11 10:08:43 +02:00
Carla Kirk-Cohen
b42a621438
lntest: add coverage for single hop blinded route query routes
2023-10-06 16:38:33 -07:00
Carla Kirk-Cohen
eb31ff553b
lntest/itest: add coverage for querying routes to blinded paths
2023-10-06 16:38:33 -07:00
yyforyongyu
24fa35ec80
multi: make sure CPFP won't exceed max allowed fee rate
...
This commit updates the `fee()` method in `weightEstimator` to make sure
when doing CPFP we are not exceeding the max allowed fee rate. In order
to use the max fee rate, we need to modify several methods to pass the
configured value to the estimator.
2023-10-06 16:34:47 -07:00
yyforyongyu
258fe7999b
sweep+itest: change MaxFeeRate
to use SatPerVbyte
2023-10-06 16:34:47 -07:00
yyforyongyu
17a0a8de06
cmd+lntest: use the new rpc field Payment_INITIATED
2023-10-06 16:34:47 -07:00
Olaoluwa Osuntokun
bb7a257359
Merge pull request #8037 from yyforyongyu/fix-weight-calc
...
lnwallet+rpcserver: fix weight calculation for taproot channels
2023-09-28 11:21:29 -05:00
yyforyongyu
62d240bba1
itest: add testSendDirectPayment
...
Adds a new test to check direct payments between two nodes. The fee rate
is tuned to 1 sat/vb to catch edge cases.
2023-09-28 19:42:11 +08:00
Oliver Gugger
d16e7a5eef
itest: add itest for externally funded taproot chans
2023-09-26 21:45:17 +02:00
Olaoluwa Osuntokun
6c3a55d89c
itest: add remote signer test case for taproot chans
...
This ensures that taproot chans can be used with the remote signer
configuration.
2023-09-18 11:42:20 -07:00
Olaoluwa Osuntokun
0c815af7ff
build: update lnd sub modules, and btcd + btcutil
2023-09-11 20:35:06 -07:00
Oliver Gugger
590dc0c3b3
itest: unify PSBT channel funding tests, add taproot
...
With this commit we unify three existing PSBT channel funding
integration tests into a single one with the goal of testing all three
cases with simple taproot channels as well.
2023-08-29 10:57:38 +02:00
P. Reis
5fc77b6ee5
doc: fix typo
...
Changed "chanenl" to "channel"
2023-08-23 12:55:01 -03:00
Olaoluwa Osuntokun
a87631c957
itest: add case for taproot chans to htlc timeout resolver itests
2023-08-22 17:43:51 -07:00
Olaoluwa Osuntokun
92da6b1d44
multi: fix linter warnings with updated linter
2023-08-22 16:34:47 -07:00
Olaoluwa Osuntokun
7506383074
itest: update zero conf multi-hop tests to remove extra blocks mined
...
In the master branch, the blocks are mined earlier, so we don't need to
mine an extra set.
2023-08-22 16:34:42 -07:00
Olaoluwa Osuntokun
5f1e0bf772
multi: add new SCB version for the taproot chan type
2023-08-22 16:34:34 -07:00
Olaoluwa Osuntokun
94f45b2b82
itest: use explicit chan type negotiation for taproot chan cases
...
The prior commit removed implicit negotiation, so we'll need to make
sure to use the explicit chan type feature vector when we go to
negotiate.
2023-08-22 16:34:31 -07:00
Olaoluwa Osuntokun
a2b277cf1d
multi: fix linter errors
2023-08-22 16:34:15 -07:00
Olaoluwa Osuntokun
d3e4bca772
itest: add taproot support to revocation itests
2023-08-22 16:34:12 -07:00
Olaoluwa Osuntokun
7c5be4d056
itest: add taproot support for all variants of runMultiHopHtlcClaimTest
2023-08-22 16:34:06 -07:00
Olaoluwa Osuntokun
5379823346
itest: add taproot chans to testChannelForceClosure
2023-08-22 16:34:00 -07:00
Olaoluwa Osuntokun
da3ab2728b
itest: add taproot chan support to basic channel funding
...
We keep in line with the existing test that uses implicit negotiation.
In the future, we should modify to also have explicit negotiation as
well.
2023-08-22 16:33:56 -07:00
yyforyongyu
0dd2aa0aef
multi: add itest to check race between channel_ready and update_add_htlc
...
This commit adds a new itest case to check the race condition found in
issue #7401 . In order to control the funding manager's state, a new dev
config for the funding manager is introduced to specify a duration we
should hold before processing remote node's channel_ready message.
A new development config, `DevConfig` is introduced in `lncfg` and will
only have effect if built with flag `integration`. This can also be
extended for future integration tests if more dev-only flags are needed.
2023-08-09 01:29:19 +08:00
Slyghtning
14be2cdae0
itest: batch channel fee params
2023-07-26 09:49:22 +02:00
Olaoluwa Osuntokun
9ed064be75
Merge pull request #7516 from hieblmi/utxo-funding
...
funding: fund channel with selected utxos
2023-07-25 19:19:42 +02:00
Matheus Degiovani
13399e9e81
itest: bind to local addr in network test
...
This makes the test work even if the local OS has no outside network
connections available or if DNS lookups are failing.
2023-07-24 08:47:26 -03:00
Slyghtning
396cffcd70
itest: anchor reserve test for SendOutputs
2023-07-24 13:07:01 +02:00
yyforyongyu
29124dd3b4
itest+lntest: add helper methods to manage temp miners
...
This commit adds several methods to easily spawn a temp miner and
connect/disconnect it from the original miner.
2023-06-19 14:04:24 +08:00
shaurya947
44fdd02ab4
lnrpc+itest: return channel Memo for Pending channels
...
In a previous PR we added a Memo field for channels that could be
specified when opening a channel. This was a reference note-to-self
with no bearing on the functioning of the channel. In that PR, the
memo value was returned only through ListChannels. This commit builds
upon that PR by also returning the Memo field for channels returned by
PendingChannels RPC.
2023-06-15 15:16:06 -04:00
Torakushi
77d3f00c3b
walletrpc+btcwallet: no custom account with various key scopes
...
Currently, a user can create a custom account with various key scopes.
This is not a desired behaviour.
2023-06-14 09:58:53 +02:00
Oliver Gugger
cf1f44ab10
Merge pull request #7689 from guggero/housekeeping
...
Housekeeping (fix small issues, take over stale contributor PRs)
2023-06-13 17:42:53 +02:00
Oliver Gugger
56dba2df03
multi: update linter, fix new issues
2023-06-13 11:58:33 +02:00
Maxwell Sayles
f7bdbb9e73
funding: integration test to verify the value of FundingExpiryBlock on
...
pending channels that are waiting for funding confirmation.
2023-06-12 10:04:04 -07:00
yyforyongyu
9ae4511a6f
itest: make sure invoice is settled in multi hop htlc test
2023-05-24 02:38:40 +08:00
Oliver Gugger
3d53d6909a
Merge pull request #7681 from yyforyongyu/btcwallet-mempool
...
mod: update btcwallet's version
2023-05-22 10:24:17 +02:00
yyforyongyu
0b64ba94c0
itest: cleanup channels for testSwitchOfflineDeliveryOutgoingOffline
2023-05-20 00:33:56 +08:00
yyforyongyu
931481c4fe
itest: make sure edges are updated in mpp tests
2023-05-20 00:33:56 +08:00
yyforyongyu
c6cfc425a0
lntest+itest: clean mempool in testHtlcTimeoutResolverExtractPreimageRemote
2023-05-20 00:33:04 +08:00
shaurya947
84fff6e0a7
itest: update channel creation itest with Memo field logic
...
We test both the happy path (valid memo is returned when querying),
as well as the unhappy path (invalid memo rejects the open action).
To accomplish this, we update the OpenChannelParams struct inside
the harness to accept the Memo.
2023-05-18 13:02:30 -04:00
Oliver Gugger
f9436ec05d
mod+cmd/lncli: use google.golang.org/protobuf package
2023-05-11 22:51:16 +02:00
yyforyongyu
1dc66302cd
itest: fix test flake in testHtlcTimeoutResolverExtractPreimageRemote
2023-05-10 02:01:54 +08:00
yyforyongyu
3f2675f10d
itest: remove potential parallel usage of the watchtower default port
2023-05-09 21:41:53 +08:00
yyforyongyu
cdc6f63f17
itest: reorder test cases to even out blocks per tranche
2023-05-09 21:41:53 +08:00
yyforyongyu
e018c02d40
itest: refactor createThreeHopNetwork
to open channels async
...
This will save us 6 blocks each time we call this function.
2023-05-09 21:41:53 +08:00
Carla Kirk-Cohen
019da315a8
itest: add coverage for custom features
2023-05-04 10:42:17 -04:00
Carla Kirk-Cohen
e41c65785f
multi: update node announcement features in feature manager first
...
Move merge of our features into the feature manager, rather than
updating our node announcement then retrospectively setting the
feature manger's set to the new vector. This allows us to use the
feature vector as our single source of truth for announcements.
2023-05-04 10:35:46 -04:00
Slyghtning
77322dddb8
itest: anchor reserve test for SendOutputs
2023-04-29 22:44:26 +02:00
yyforyongyu
e715b8ed1f
itest+lntest: add itest for mempool preimage watch
2023-04-19 01:18:19 +08:00
Oliver Gugger
1eebbe3f42
itest: update channel open test to send payment
...
This commit enhances the custom fee policy channel open test by adding a
second channel and testing forwarding payments through the channel with
the custom forwarding policies.
This was able to reproduce the bug reported in #5796 which was fixed in
a previous commit of this PR.
2023-04-18 09:52:14 +02:00
Oliver Gugger
ebf11bc2f1
itest: move lnd_custom_{message => message_test}.go
...
This recently added file didn't follow the golang naming convention for
tests.
2023-04-18 09:40:18 +02:00
Torakushi
0445fef7ad
funding: use p2tr by default for batch_open_channel
...
In LND v0.15.1, batch_open_channel used p2tr by default
for change output. However, in a later version, a breaking
change has been fixed in FundPSBT to make the change type
configurable (default to p2wkh). As batch_open_channel
uses FundPsbt, we need to put back p2tr as default for
change output
2023-04-17 17:37:51 +02:00
Slyghtning
ff45fc7e71
itest: respect the reserved wallet balance when using fundmax
2023-04-05 23:10:04 +02:00
Bjarne Magnussen
d7f578b0d9
lntest/itest: adds tests for fundmax
flag of cli:openchannel
2023-04-05 23:09:12 +02:00
ziggie
b649b552e6
itest: add test when signing without UTXO data
...
Adds a testcase in the itest suite which tests that psbt
input data needs its corresponding UTXO data when signing.
2023-03-31 08:56:15 +02:00
Oliver Gugger
d019c82f07
itest: assert change output type of SendCoins
2023-03-20 20:15:43 +01:00
Oliver Gugger
a266c3a4a9
itest: add assertion for PSBT change outputs
...
With this commit we add more specific assertions to our PSBT signing
test in order to make sure change outputs have the proper PSBT metadata
associated with them, depending on their address type.
2023-03-20 19:22:37 +01:00
Elle Mouton
6f4034f7d1
lntest/itest: add session deletion itest
2023-03-20 16:51:51 +02:00
yyforyongyu
c87da1ff01
itest: fix flake in testAnchorThirdPartySpend
2023-03-17 03:17:36 +08:00
yyforyongyu
20e53e85b4
itest+lntest: make sure states are cleaned when tests end
...
This commit changes how the node's state is updated to make sure the
test cleans up the node's state.
Also `testLookupHtlcResolution` is fixed with a cleanup.
2023-03-15 00:01:40 +08:00
Olaoluwa Osuntokun
251802d796
Merge pull request #7444 from bitromortac/2302-capacity-config
...
routing: configurable capacity fraction for apriori probability
2023-03-02 18:39:01 -08:00
yyforyongyu
70eede22dc
itest: use unreachable URL in testNetworkConnectionTimeout
2023-03-02 09:42:21 +08:00
yyforyongyu
c26917ee1f
multi: rename LookupHtlc
to LookupHtlcResolution
for clarity
2023-03-01 01:47:08 +08:00
yyforyongyu
38063a4720
itest+lntest: add testLookupHTLC
2023-02-27 16:59:16 +08:00
bitromortac
fce88e8b5d
lncli+routerrpc: dynamic capacity fraction config
...
Enable setting and getting of the apriori capacity fraction in lncli and
in the router rpc.
2023-02-24 15:28:55 +01:00
Slyghtning
4c198bdfde
itest: check peer alias in ListChannels
2023-02-24 10:49:11 +01:00
yyforyongyu
52dff48477
itest: fix flake in testOptionScidUpgrade
2023-02-24 01:35:17 +08:00
yyforyongyu
4fdce8b448
itest: fix flake in testChannelFundingPersistence
2023-02-24 01:35:16 +08:00
yyforyongyu
0c50d4379f
itest: fix test flake in testZeroConfReorg
2023-02-24 01:35:16 +08:00
yyforyongyu
eb57de2f0e
itest: fix context leak in testZeroConfReorg
2023-02-24 01:35:16 +08:00
yyforyongyu
1f636ad275
itest: add readme
2023-02-23 21:56:12 +08:00
yyforyongyu
d5af76cb29
itest+lntest: add a dedicated timeout for sending payments
...
This commit adds a new timeout `PaymentTimeout` that's used when sending
payments. A potential bug is also marked in the test.
2023-02-23 21:56:11 +08:00
yyforyongyu
f55f9dcb87
itest: increase sleep time when closing channels in mpp setup
2023-02-23 21:56:11 +08:00
yyforyongyu
92a2da52c5
itest: fix testGraphTopologyNtfns
and mark a bug in disconnectpeer
2023-02-23 21:56:11 +08:00
yyforyongyu
25a2e0f716
itest: temp fix testAddPeerConfig
2023-02-23 21:56:11 +08:00
yyforyongyu
05c82d918e
itest: remove file log_error_whitelist.txt
2023-02-23 21:56:11 +08:00
yyforyongyu
17f08a87db
lntest+itest: remove assertion while iterating mempool
2023-02-23 21:56:10 +08:00
yyforyongyu
28203fc77c
lntest+itest: fix testDataLossProtection
2023-02-23 21:56:10 +08:00
yyforyongyu
8288d3da8e
itest: add missing topology check in tests
...
This commit adds the missing topology checks.
2023-02-23 21:56:10 +08:00
yyforyongyu
2bc6aabf96
itest: fix make lint
...
This commit fixes the issues reported by the linter.
2023-02-23 21:56:10 +08:00
yyforyongyu
a080375b7d
itest: remove unnecessary shutdown
2023-02-23 21:56:09 +08:00
yyforyongyu
8b9ccfe310
itest: fix test async_bidirectional_payments
2023-02-23 21:56:09 +08:00
yyforyongyu
9d1d629001
itest+lntest: migrate lntemp
to lntest
...
This commit performs the takeover that `lntemp` is now promoted to be
`lntest`, and the scaffolding is now removed as all the refactoring is
finished!
2023-02-23 21:56:09 +08:00
yyforyongyu
ee0790493c
itest+lntemp: move calculation functions into lntemp
...
Functions that can be useful to other tests are now moved into the
package `lntemp`.
2023-02-23 21:56:09 +08:00
yyforyongyu
4a9c3449a6
lntemp+itest: move utils function into lntemp
2023-02-23 21:56:09 +08:00
yyforyongyu
edba938996
multi: add new build tag integration
...
This commit adds a new build tag `integration` and removes the old tag
`rpctest` for clarity. Multiple unnecessary usages of `build !rpctest`
is also removed.
2023-02-23 21:56:09 +08:00
yyforyongyu
94c64a886e
lntemp+itest: remove unused code to prepare lntemp
's takeover
...
This commit removes the old code living in `lntest` to prepare
`lntemp`'s takeover.
2023-02-23 21:56:08 +08:00
yyforyongyu
106fbeae85
multi: move timeouts into package wait
...
This commit moves the definition of timeout values into package `wait`,
preparing the incoming merging of `lntemp` and `lntest`.
2023-02-23 21:56:08 +08:00
yyforyongyu
0bc86a3b4b
multi: move itest
out of lntest
...
This commit moves all the test cases living in `itest` out of `lntest`,
further making `lntest` an independent package for general testing.
2023-02-23 21:56:08 +08:00