Commit Graph

11004 Commits

Author SHA1 Message Date
Oliver Gugger
d1b46211d8
itest: replace WaitForTxBroadcast with WaitForTxInMempool 2020-10-28 13:29:18 +01:00
Oliver Gugger
1714394add
itest: fix send payment flake
In some cases the router isn't yet fully aware of all newly opened
channels. We need to give it some time to process the updates. Therefore
we add a wait for sending payments to give it a few more changes to
catch up.
2020-10-28 13:22:48 +01:00
Oliver Gugger
e6b0141b10
itest: fix typos, formatting 2020-10-28 13:22:48 +01:00
András Bánki-Horváth
dc16869d72
Merge pull request #4725 from halseth/chaneventstore-race
chanfitness/chaneventstore:  stop ticker after goroutine
2020-10-28 11:26:30 +01:00
Oliver Gugger
ac16bd0fe3
Merge pull request #4699 from matheusdtech/failing-link-flake
itest: Fix flakes when payments cause chan closure
2020-10-28 09:10:35 +00:00
Johan T. Halseth
c1705a28da
chanfitness/chaneventstore: stop ticker after goroutine
Stop the ticker after the goroutine reading from it has exited, to avoid
triggering the race detector.
2020-10-27 12:29:05 +01:00
Matheus Degiovani
16a4687718
itest: Fix flakes when payments cause chan closure
This fixes itest flakes that happen when a payment is attempted that
ends up causing a channel closure.

completePaymentRequests() attempts to monitor the open channels after a
payment is attempted in order to identify that payment was actually
dispatched to a remote node before returning.

However, when the payment actually causes a channel closure (for
example, because the receiver sent an incorrect preimage) this logic
fails in that the channel will no longer the found in the list of open
channels. This could cause a flake when there was enough time for the
channel to close before performing the check.

One example of such a flaky test is failing_link.

This fixes the issue by also checking whether the total number of
channels was reduced, which indicates (assuming itest operations are
being executed serially) that one of the attempted payments affected at
least one channel.
2020-10-27 08:07:49 -03:00
Oliver Gugger
747bd674dc
Merge pull request #4716 from matheusdtech/fix-itest-comment
itest: Sync nodes to chain during singleHop tests
2020-10-27 09:36:46 +00:00
Matheus Degiovani
473f730eec
itest: Sync nodes to chain during singleHop tests
This ensures the Carol and Dave nodes created in the single_hop series
of tests are synced to the latest chain tip generated by the miner
before creating the route that will eventually be used for payments.

This prevents a flake during CI tests where slow processing of blocks by
Carol could cause the generated route to have a final CLTV delta too
short for Dave to accept.

While at it, we switch the test to use the default CLTV delta provided
by QueryRoutes which is now the global default CLTV.
2020-10-26 16:29:39 -03:00
Oliver Gugger
9e4cfa0182
Merge pull request #4718 from yyforyongyu/fix-rpc-format
trivial: fix make rpc-format
2020-10-26 08:40:00 +00:00
yyforyongyu
2cb42594a9
trivial: fix make rpc-format 2020-10-25 18:51:42 +08:00
Eugene
426db548dd
Merge pull request #4651 from Crypt-iQ/zpay32_fuzz
fuzz/zpay32: add Decode/Encode fuzz tests.
2020-10-22 10:23:24 -04:00
carla
c92b030652
multi: remove experimential build flag for assumechanvalid 2020-10-21 14:13:50 +02:00
carla
325deb36c0
sample-conf: add assumechanvalid to sample conf 2020-10-21 14:13:48 +02:00
eugene
bbe85f3c16 fuzz/zpay32: add Decode/Encode fuzz tests.
These can be expanded on in the future. Encoding is currently done
with a static key for test determinism.
2020-10-21 06:42:54 -04:00
Wilmer Paulino
1ad0dbade9
btcwallet: return chain best timestamp while backend is syncing
A while back, changes were made to the wallet such that it waits for the
backend to be synced before beginning to store the latest 10,000 blocks
of the chain. This inherently broke sync progress implementations based
on the best_header_timestamp result from the GetInfo RPC for
neutrino-based nodes as the wallet is no longer tracking all blocks in
the chain. To work around this, we now make sure to return the backend's
best header timestamp instead of the wallet's, allowing said sync
progress implementations to work again.
2020-10-19 13:57:30 -07:00
Oliver Gugger
d12f76fd6d
Merge pull request #4626 from guggero/sample-conf-check
GitHub workflow: Check all command line flags are described in sample-lnd.conf
2020-10-16 13:12:22 +02:00
Joost Jager
49df2d6f8b
lnrpc: expose forwarding channel for htlcs in ListChannels 2020-10-16 09:03:24 +02:00
Oliver Gugger
7ea4caa635
github: add sample-lnd.conf to PR checklist 2020-10-16 08:53:16 +02:00
Oliver Gugger
ab4f1c3b5a
github+make: check all CLI flags are in sample-lnd.conf
We add a GitHub action to our workflow that makes sure all command line
flags of lnd that are available with the default build tags are
contained in the sample-lnd.conf file.
2020-10-16 08:53:16 +02:00
Oliver Gugger
96379f3503
sample-lnd.conf: remove extra whitespaces 2020-10-16 08:53:16 +02:00
Oliver Gugger
b555357f9b
sample-lnd.conf: add all flags without build tag
Because we'll add a check that enforces all command line flags that are
available with the default build tags to also be contained in the
sample-lnd.conf file, we first add all that currently are missing.
2020-10-16 08:53:15 +02:00
Eugene
9e75c3eade
Merge pull request #4682 from Crypt-iQ/fuzz_ret_1009
fuzz: change return values to 1 rather than 0 or -1
2020-10-14 16:07:54 -04:00
Joost Jager
d13b813dbb
lnrpc: add htlc index to ListChannels pending htlcs 2020-10-14 17:44:22 +02:00
Joost Jager
856abade3d
routerrpc: map errors to grpc status code
The 'payment already exists' case is common in restart scenarios. With
this commit it is no longer necessary to string-match on the error
message. Implementation is identical to SendPaymentV2.
2020-10-14 16:15:08 +02:00
eugene
f82653cb06
fuzz: change return values to 1 rather than 0 or -1
This allows gofuzz to store the mutating input as coverage if it reaches
any new coverage, even if it didn't make it to the end of the test.
2020-10-13 15:17:57 -04:00
Johan T. Halseth
d26001a69a
Merge pull request #4688 from carlaKC/4686-paymenttimeout
lncli: allow configurable timeout in send payment
2020-10-13 13:06:47 +02:00
carla
0a76f87bd0
lncli: allow configurable timeout in send payment 2020-10-12 13:27:06 +02:00
Oliver Gugger
f98c74319c
Merge pull request #4617 from guggero/no-txindex-itest
itest: add bitcoind test without txindex enabled
2020-10-09 15:51:20 +02:00
Oliver Gugger
4dcdfd98bb
travis: add bitcoind test without txindex 2020-10-09 13:35:06 +02:00
Oliver Gugger
3e3618ae9a
lntest: add build flag for disabling txindex on bitcoind
We create a new build flag for running the bitcoind tests without the
txindex enabled. We don't want this to be the default so we use a
negated build flag.
2020-10-09 13:35:04 +02:00
Oliver Gugger
b7fc7c3dae
lntest: use extraArgs, fix linter issues 2020-10-09 13:35:02 +02:00
Oliver Gugger
43c2031fa8
lntest: extract common bitcoind code into own file
To prepare for running multiple tests on bitcoind with different options
each time, we extract the common code into its own file.
2020-10-09 13:35:00 +02:00
Oliver Gugger
902d7dd812
Merge pull request #4643 from guggero/make-fuzz
Add fuzzing commands to Makefile
2020-10-09 11:03:30 +02:00
Oliver Gugger
41d8d56354
gitignore: ignore fuzzing artifacts 2020-10-09 09:53:56 +02:00
Oliver Gugger
1a1a9a6744
mod: add auto-added go mod changes
When running the make DEPGET target for the go-fuzz binaries, this entry
is auto added, even though we don't have a direct reference to it in our
code. Not sure why this is needed in the first place.
2020-10-09 09:53:56 +02:00
Oliver Gugger
5189cb799a
make: add fuzz-build and fuzz commands 2020-10-09 09:53:55 +02:00
Oliver Gugger
916b75fd4e
Merge pull request #4680 from guggero/travis-bitcoind-speedup
Travis+GitHub: update bitcoind to 0.20.1, extract bitcoind binary from docker image to speed up download
2020-10-09 09:43:52 +02:00
Conner Fromknecht
33fe44f4ca
Merge pull request #4681 from guggero/itest-whitelist
itest: add error to whitelist
2020-10-08 17:19:57 -07:00
Oliver Gugger
e8253479d5
Travis+GitHub: update to bitcoind 0.20.1, remove cache
With this commit we use the same version of bitcoind in all tests and
also remove the caches for the binary as docker has its own cache.
2020-10-08 21:30:11 +02:00
Oliver Gugger
785e797ef8
scripts: install bitcoind binary from docker image
Because the bitcoind mirror is extremely slow, we spend at least 2 to 3
minutes of each bitcoind related test on just downloading the binary. We
can achieve the same result by just pulling the docker image and
extracting the binary from that.
2020-10-08 21:29:51 +02:00
Olaoluwa Osuntokun
7e1d825834
Merge pull request #4554 from Roasbeef/go-1-15
build: build and run CI against Go 1.15
2020-10-08 12:18:22 -07:00
Oliver Gugger
eb74011d5a
itest: add error to whitelist 2020-10-08 20:39:11 +02:00
Johan T. Halseth
22d7bb138c
Merge pull request #3131 from halseth/reliable-payments-switch-gc
[reliable payments] switch result store clean-up
2020-10-08 15:43:34 +02:00
Olaoluwa Osuntokun
6493a43c9d
Merge pull request #4668 from Empact/patch-2
[autopilot] change default heuristic to top_centrality
2020-10-07 16:48:12 -07:00
Olaoluwa Osuntokun
0f90bb638d build: build and run CI against Go 1.5 2020-10-06 15:30:50 -07:00
Olaoluwa Osuntokun
c7e948bb5a
Merge pull request #4673 from guggero/psbt-nested-segwit-fix
PSBT funding: don't include scriptSig field for nested SegWit inputs
2020-10-06 15:22:37 -07:00
Oliver Gugger
843efc324b
walletrpc: serialize TXID not outpoint
The txid_str field of a locked UTXO's outpoint shouldn't contain the
output index but only the reverse order hex serialized transaction ID.
2020-10-06 10:59:51 +02:00
Oliver Gugger
8e9f37b0fc
lncli+docs: fix outpoint serialization in JSON output
This commit fixes the JSON output of the outpoint field of locked UTXOs
in the response of the PSBT fund command.
2020-10-06 10:59:50 +02:00
Oliver Gugger
0c0d114d18
mod: bump btcwallet dep to fix scriptSig in PSBT bug
To fix a bug where the scriptSig field was mistakenly set on nested
SegWit inputs of a PSBT, we bump the btcwallet dependency that contains
said fix.
2020-10-06 10:59:46 +02:00