Commit Graph

131 Commits

Author SHA1 Message Date
Joost Jager
aabd68ebcd
multi: rename FailUnknownPaymentHash to FailIncorrectDetails
Align naming better with the lightning spec. Not the full name of the
failure (FailIncorrectOrUnknownPaymentDetails) is used, because this
would cause too many long lines in the code.
2019-08-08 11:04:17 +02:00
Wilmer Paulino
0431701262
multi: only allow specifying towers to TowerClient through RPC
With the introduction of the WatchtowerClient RPC subserver, the lnd
configuration flag to specify private watchtowers for the client is no
longer needed and can lead to confusion upon users. Therefore, we remove
the flag completely, and only rely on the watchtower client being active
through a new --wtclient.active flag.
2019-07-30 15:18:17 -07:00
Wilmer Paulino
8f010abac5
multi: add watchtower client RPC subserver 2019-07-30 15:18:15 -07:00
nsa
7762d55e80 itest+routing: updating tests to account for BlockPadding 2019-07-23 21:03:30 -04:00
Conner Fromknecht
807012f960
Merge pull request #3143 from Crypt-iQ/pipelining_settle_0525
htlcswitch: pipeline settles to switch
2019-07-19 18:12:59 -07:00
Olaoluwa Osuntokun
e2a35ae089
Merge pull request #3237 from orbitalturtle/auto-regenerate-cert
Unit test for autoregenerating expired cert pairs
2019-07-19 17:21:27 -07:00
nsa
00814dc7c1 htlcswitch: pipeline settles to switch
This commit makes the outgoing link pipeline the settle to the
switch as soon as it receives it. Previously, it would wait for a
revocation before sending it, which caused increased latency on
payments as well as possibly never settling on the incoming link.
A duplicate settle is still sent to the switch, but it is handled
gracefully. A new AckEventTicker was added to the switch which
acknowledges any pending settle / fail entries in an outgoing
link's fwd pkgs in batch. This was needed in order to reduce the
number of db txn's which would have been incurred by acking whenever
we receive a duplicate settle without batching.
2019-07-18 17:20:40 -04:00
Valentine Wallace
21c685d530
lnd_test: fix channel event subscription test flake.
This flake was caused by the rpcserver receiving a CloseChannel request
before Alice's channel event subscription request, causing Alice to miss one
notification. As a result, we move Alice's subscription to the beginning of the
test.

Additionally, we add a check to ensure the opening notifications are
received in the right order.
2019-07-12 14:47:28 -07:00
Johan T. Halseth
195a868455
lntest: add flag -goroutinedump 2019-07-11 14:44:44 +02:00
Johan T. Halseth
8d5430dae3
lnd_test: add lndHarness to harnessTest, dump goroutines on Fatalf
Co-authored-by: taketa <853211b@gmail.com>
2019-07-11 14:41:41 +02:00
Johan T. Halseth
314ba7db03
lntest/harness: add method SaveProfilesPages
SaveProfilesPages will write the active goroutines to files
pprof-n-*.log.

Co-authored-by: taketa <853211b@gmail.com>
2019-07-11 14:41:40 +02:00
Johan T. Halseth
6028722d71
lntest/node: make ProfilePort part of node config 2019-07-11 14:36:59 +02:00
Turtle
24ca95ab10 lnd_test: remove TLSAutoRegeneration test 2019-07-11 00:08:24 -04:00
Olaoluwa Osuntokun
ba5fbb3c27
Merge pull request #3156 from joostjager/extended-fail
routerrpc: add more failure reasons and route hints
2019-07-08 19:12:03 -07:00
Joost Jager
ae46fb00cb
routing+channeldb: add more failure reasons 2019-07-04 09:27:12 +02:00
Conner Fromknecht
ea311649b4
lnd: use distinct pubkey for watchtowers and server 2019-06-20 17:04:04 -07:00
Conner Fromknecht
f7da87acc4
lntest+make: build w/ watchtowerrpc tag, add grpc client to harness 2019-06-20 17:04:04 -07:00
Olaoluwa Osuntokun
a53323205c
Merge pull request #3133 from cfromknecht/wt-polish
watchtower: integrate altruist watchtower and watchtower client
2019-06-14 21:34:10 +02:00
Conner Fromknecht
72e355f933
lnd_test: add altruist watchtower itest 2019-06-13 19:54:20 -07:00
Turtle
37d0059d05 lntest: add new test for auto-generating expired certs 2019-06-13 20:55:47 -04:00
Turtle
f2ca4e1ea0 lntest: add getters for TLSCertPath and TLSKeyPath fields 2019-06-13 20:40:56 -04:00
Olaoluwa Osuntokun
41617187c4
lntest/itest: update itests due to ListPayments API change 2019-06-13 16:16:18 -07:00
Olaoluwa Osuntokun
41b7da9bd1
Merge pull request #3190 from halseth/listpayments-status-filter
ListPayments: filter out non-succeeded payments, include payment status
2019-06-14 00:41:35 +02:00
Johan T. Halseth
0aec3fd230
rpcserver: filter out non-suceeded payments, include payment status
Earlier versions of ListPayments only included completed payments. We
return to this behavior by ignore all other payments if the nonSucceeded
boolean is not set in the request.
2019-06-12 08:57:47 +02:00
Wilmer Paulino
638355b603
lntest: add CPFP integration test 2019-06-11 15:06:41 -07:00
Johan T. Halseth
f556b375ff
lnd_test: add testHoldInvoicePersistence
testHoldInvoicePersistence tests that a sender to a hold-invoice, can be
restarted before the payment gets settled, and still be able to receive
the preimage.
2019-06-07 16:53:32 +02:00
Joost Jager
7133f37bb8
routing: global probability based mission control
Previously every payment had its own local mission control state which
was in effect only for that payment. In this commit most of the local
state is removed and payments all tap into the global mission control
probability estimator.

Furthermore the decay time of pruned edges and nodes is extended, so
that observations about the network can better benefit future payment
processes.

Last, the probability function is transformed from a binary output to a
gradual curve, allowing for a better trade off between candidate routes.
2019-06-04 10:00:25 +02:00
Conner Fromknecht
a826d85dac
lntest/itest/lnd_test: assert payreq in listpayment matches paid invoice 2019-05-30 14:18:04 -07:00
Joost Jager
dff0387363
lntest: move itest into package 2019-05-28 21:43:23 +02:00
Johan T. Halseth
ca1e9dcecb
lntest: skip zeroConf ListUnspent for neutrino 2019-05-27 09:29:03 +02:00
Johan T. Halseth
2d49ee56e2
lntest: add Name() to BackendCfg 2019-05-27 09:29:03 +02:00
Johan T. Halseth
8f5a4beaad
lntest: add NeutrinoCfg 2019-05-27 09:29:02 +02:00
Johan T. Halseth
8e8bb9ff09
lntest+lnd_test: build flag btcd for BtcdBackendCfg 2019-05-27 09:29:02 +02:00
Johan T. Halseth
aec00b1277
lntest+lnd_test: add Connect and Disconnect miner for BackendCfgs
This commit gives the current chainbackend the ability to connect and
disconnect the chain backend at will. We do this to let the chain
backend initiate the connection to the miner, not the other way around.

This is a preparation for using Neutrino as a backend, as it only allows
making outbound connections.

We must also move the setup of the chainbackend to after to miner, to
know the address to connect to.
2019-05-27 09:29:02 +02:00
Johan T. Halseth
b917820c5b
lntest/node: set up InvoicesClient for HarnessNode 2019-05-15 14:42:04 +02:00
Wilmer Paulino
1ad4528975
lntest: use test subscription to prevent SubscribeChannelGraph race
This race was possible due to us making a subscription request before
the ChannelRouter has started. We address it by creating a dummy
subscription before proceeding to the real one to ensure we can do so
successfully. We use a dummy one in order to not consume an update from
the real one. This addresses the common "timed out waiting for opened
channel" flake within the integration test suite since the subscription
was never properly created, so we'd never be notified of when new graph
updates were received.
2019-04-25 18:53:36 -07:00
Johan T. Halseth
7f4d1cee6d
lntest: don't return from ensureConnected on non-error
This would casue the method to return before the peer list check was
performed.
2019-04-24 09:44:15 +02:00
Olaoluwa Osuntokun
b451536483
lntest: extend the restore/restart methods to also accept optional SCBs
In this commit, we modify the `RestoreNodeWithSeed` and `RestartNode`
methods to also accept an SCB. This will be useful in new integration
tests to properly exercise the various restore/restart scenarios using
static channel backups.
2019-03-28 17:54:07 -07:00
Olaoluwa Osuntokun
d9c9d6ed73
lntest: add new ChanBackupPath method to expose channels.backup for node 2019-03-28 17:53:50 -07:00
Olaoluwa Osuntokun
b419179c86
lntest: extend RestartNode to also unlock node if password is present 2019-03-28 17:53:49 -07:00
Olaoluwa Osuntokun
e929142ff7
lntest: add new Unlock method to allow unlock of fresh node
In this commit, we convert the Unlock method to accept the
`lnrpc.UnlockWalletRequest`. This makes things a bit more generic as we
no longer need to continue to add params to the method each time a new
field is added to the Unlock method.
2019-03-28 17:53:48 -07:00
Olaoluwa Osuntokun
b62dd09430
lntest: exend newNode method to accept wallet password 2019-03-28 17:53:47 -07:00
Olaoluwa Osuntokun
441f010295
lntest: add new initClientWhenReady to connect RPC then init client 2019-03-28 17:53:46 -07:00
Conner Fromknecht
f3f4093ef0
lntest/timeouts: split into darwin and non-darwin timeouts 2019-03-27 19:00:39 -07:00
Conner Fromknecht
34e36e9daa
lnrpc+rpcserver: rename ScriptPubkey to PkScript on Utxo msg 2019-02-11 13:02:25 -08:00
Conner Fromknecht
3fa9d81a41
lntest/harness: assert unconfirmed utxos in ListUnspent during sendCoins 2019-02-11 13:02:11 -08:00
Wilmer Paulino
8d7879bab1
Merge pull request #2496 from halseth/itest-print-btc-amount
[trivial] lntest/node: print amounts in same format
2019-02-01 13:01:05 -08:00
Conner Fromknecht
9d20ca4a51
Merge pull request #2495 from halseth/itest-dont-shadow-prederr
[trivial] lnd_test: don't shadow predErr
2019-01-31 18:26:11 -08:00
Moshe Shababo
8ed4e887be lntest: FetchNodeInfo/initLightningClient docs update 2019-01-27 17:05:30 +02:00
Johan T. Halseth
0714ffa0d7
lntest/harness: add WaitNoError 2019-01-22 13:38:05 +01:00