Christian Decker
1463797c61
pytest: Stabilize test_funding_close_upfront
...
Reconnections and unsynchronized states where causing us some issues.
2021-01-29 10:29:09 +10:30
Christian Decker
3d4c111721
pytest: Stabilize test_multiple_channels
...
If we're quick (or the node is slow) we end up reconnecting before our
counterparty has realized the state transition, resulting in an
unexpected re-establish.
2021-01-29 10:29:09 +10:30
Christian Decker
04ed93f5f8
pytest: Stabilize test_funding_external_wallet_corners
2021-01-29 10:29:09 +10:30
Christian Decker
18483ca582
pytest: Disable test_v2_open if not developer
...
It requires `--dev-force-features` which isn't available without
`DEVELOPER=1`
2021-01-29 10:29:09 +10:30
Christian Decker
c0f06f2779
pytest: Simplify and stabilize test_reconnect_no_update
2021-01-29 10:29:09 +10:30
niftynei
7e324177de
df-tests: simultaneous openchannel_init (while in progress)
...
Reject a peer's request to open a channel while we're already in progress
2021-01-10 13:44:04 +01:00
niftynei
a357e75c5d
df-tests: test_disconnect_half_signed + test_reconnect_signed
2021-01-10 13:44:04 +01:00
niftynei
fec1d9b707
df-tests: test_reconnect_openingd
2021-01-10 13:44:04 +01:00
niftynei
7eb6213fca
df-tests: test_reconnect_sender_add1, others
...
We're still ignoring multifundchannel failure tests, but now we use the
'dual-fund' flag instead of a blanket true.
2021-01-10 13:44:04 +01:00
niftynei
d9c68a708a
df-tests: test_reconnect_receiver_add
2021-01-10 13:44:04 +01:00
niftynei
96c42262ab
df-tests: test_peerinfo
2021-01-10 13:44:04 +01:00
niftynei
135cd178f7
df-tests: test_channel_persistence
2021-01-10 13:44:04 +01:00
niftynei
a82bfa83ff
df-tests: have the df_accepter plugin keep track of attempts
...
Test connection/reconnection handling for v2 opens. We needed to fixup
the accepter plugin so that we were freeing up inputs on
disconnect/failure.
2021-01-10 13:44:04 +01:00
niftynei
88b4b5b2bb
df-tests: test_disconnect_opener
2021-01-10 13:44:04 +01:00
niftynei
c055198869
df-tests: test_fail_unconfirmed, duplicate with correct wires
2021-01-10 13:44:04 +01:00
niftynei
dfa0eb0f2f
df-tests: test_shutdown_awaiting_lockin check correct state
2021-01-10 13:44:04 +01:00
niftynei
5c7cc15a75
df-tests: adjust logsearch/features for test_dataloss_protection
2021-01-10 13:44:04 +01:00
niftynei
e661d87440
df-tests: fixup expected features for dual-funding channels
2021-01-10 13:44:04 +01:00
niftynei
08200f03a7
df-tests: test_multifunding_v2_v1_mixed update to use flag
...
Now that we've got a fancy flag to enable dual funding, let's use it
2021-01-10 13:44:04 +01:00
niftynei
f4b7904ce5
tests: don't enforce daemon name on opening logline
2021-01-10 13:44:04 +01:00
niftynei
99a621dd99
df-reconnects: allow tx-sigs in channeld iff we're reconnecting
...
There's a case where a dropped funding_locked will result in the peer
moving onto channeld, while we stay in dualopend. As we haven't
received their funding_locked, we retransmit tx_sigs, which channeld
will need to handle.
With the patch the peer drops it on the floor; the peer will resend
funding_locked on reconnect, which will correctly advance us to
channeld and CHANNELD_NORMAL
2021-01-10 13:44:04 +01:00
Christian Decker
94820ad559
pytest: Disable test_funding_cancel_race on slow machines
...
The CI regularly trips up on this very taxing test (100 nodes) so only
run it if we have the required horsepower.
2021-01-04 11:25:50 +01:00
Christian Decker
eae49727b1
pytest: Disable flaky test_fundchannel_start_alternate
...
This test has been causing most CI runs to fail. See tracking issue #4265
for discussion on fixing and re-enabling it.
Changelog-None
2020-12-08 09:14:25 +10:30
niftynei
b23c6c50a0
df-tests: use multifundchannel pathways instead of custom plugin
...
Since fundchannel/multifundchannel now handles v2 opens, we use that
instead of this hacked together plugin.
2020-12-02 14:19:08 +10:30
niftynei
405453859c
mfc-df: add 'happy path' tests for the v1+v2 things
...
We can't test disconnects et.al. quite yet because the 'cancel' flow for
openchannelv2 still needs to be resolved
2020-11-23 12:41:05 -06:00
niftynei
7e60ef6974
tests: make connection details correct
2020-11-16 20:00:51 -06:00
niftynei
4a3ee19a22
connectd: Update connection list with new address
...
If we're already attempting to connect to a peer, we would ignore
new connection requests. This is problematic if your node has bad
connection details for the node -- you can't update it while inflight.
This patch appends new connection suggestions to the list of connections
to try.
Fixes #4154
2020-11-16 20:00:51 -06:00
Michael Schmoock
183f7698c3
chore: reduce CI load merging a testcase
2020-11-13 14:25:02 -06:00
Michael Schmoock
4134c24cc9
pytest: fix a probable flake on test_channel_opener
2020-11-13 14:25:02 -06:00
ZmnSCPxj jxPCSnmZ
0fd87b85da
openingd/: Fail fundchannel_start
if we already are, or will become, the fundee.
...
Fixes : #4108
Changelog-Fixed: Network: Fixed a race condition when us and a peer attempt to make channels to each other at nearly the same time.
2020-11-07 17:18:49 +00:00
ZmnSCPxj jxPCSnmZ
712e0796fc
tests/test_connection.py: Test for #4108 .
2020-11-07 17:18:49 +00:00
Michael Schmoock
67f4970eb1
pytest: test opener and closer of listpeers
2020-11-06 14:47:04 -06:00
niftynei
ede5f5be3c
mfc: blackbox test for commitment vs funding tx feerates
...
Liquid is excluded because the mempool entry doesn't contain a 'weight'
field.
2020-10-21 11:24:16 +10:30
niftynei
a7d4b8780e
elementsd: disable dual-funding test; don't add non-witness utxo
...
Elementsd needs to be updated to v0.20.0 in order for this to work as
expected
2020-10-20 12:50:31 +10:30
niftynei
5fbd25f938
dual-fund: test (turned off) and plugin for executing an openchannel
...
Proof that v2 openchannel works, plus a plugin for sewing all the
requisite bits together
2020-10-20 12:50:31 +10:30
niftynei
8f253b2adc
test: simplify test for close_to
...
Since `fundchannel` now supports the 'close_to' argument, we can remove
all the logic needed to call fundchannel_start here.
Underneath, we're still calling `fundchannel_start`, we're just one (or
two, if you count multifundchannel) call levels away from it now.
2020-10-16 13:51:57 +10:30
niftynei
de34f08b82
tests,fundchannel: return the result from the fundchannel rpc call
...
We need this so we can verify the 'close_to' result
2020-10-16 13:51:57 +10:30
Rusty Russell
a3c30441d3
channeld: order htlcs by id before retransmission.
...
We had one report of this, and then Eugene and Roasbeef of Lightning
Labs confirmed it; they saw misordered HTLCs on reconnection too.
Since we didn't enforce this when we receive HTLCs, we never noticed :(
Fixes : #3920
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Protocol: fixed retransmission order of multiple new HTLCs (causing channel close with LND)
2020-10-14 19:58:57 +10:30
Rusty Russell
d04597cbb6
pytest: add test for HTLC ordering.
...
[ Includes tidyups by Christian Decker ]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-10-14 19:58:57 +10:30
Rusty Russell
d5c91a347a
channeld: log broken message if we receive HTLCs out of order.
...
We didn't care, but other implementations (particularly lnd) do. And it
does violate the spec.
(We need to use skip not xfail on the test which catches this, since
xfail doesn't seem to stop errors reported by cleanup)
(Includes Christian's typo fix!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-10-14 19:58:57 +10:30
Christian Decker
9f8c9d6406
pytest: Check for connection close and reset errors in timeout test
...
I get both errors from time to time, seems like a timing issue.
2020-10-13 14:30:45 +02:00
Rusty Russell
79a21755c4
pytest: fix flaky test if one side hasn't processed close yet.
...
```
@unittest.skipIf(TEST_NETWORK != 'regtest', "External wallet support doesn't work with elements yet.")
def test_funding_close_upfront(node_factory, bitcoind):
...
# check that you can provide a closing address upfront
addr = l1.rpc.newaddr()['bech32']
> _fundchannel(l1, l2, amt_normal, addr)
...
pyln.client.lightning.RpcError: RPC call failed: method: fundchannel_start, payload: {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'amount': 100000, 'announce': True, 'close_to': 'bcrt1qctx2k9cu9fd7nk449mzphqjcvvpyc4rxh6826x'}, error: {'code': -1, 'message': 'They sent error channel 2a1ca624cd1127761cb7a4395df2c3fd6d0abb3732c1f85a5345b0da716540d0: Multiple channels unsupported'}
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-10-12 13:14:39 +02:00
Christian Decker
9021bb26d1
pyln: Decode process output once before storing it
2020-10-07 09:36:30 +10:30
Jan Sarenik
a777d21fb7
pytest: Rename all fund_channel to fundchannel
2020-09-25 21:04:56 +02:00
Rusty Russell
f658dd0d78
pytest: test connection timeout.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-09-11 21:27:45 +09:30
ZmnSCPxj jxPCSnmZ
9587425f2d
plugins/spender/fundchannel.c: Make fundchannel a thin layer around multifundchannel.
...
Changelog-Changed: protocol: `fundchannel` now shuffles inputs and outputs, and no longer follows BIP69.
2020-09-10 15:28:50 +09:30
niftynei
6607f1d629
openingd: pull out common code, rename some things
...
We're going to reuse all this code for dualopend, which is coming soon.
2020-09-09 19:54:20 +09:30
ZmnSCPxj jxPCSnmZ
45e1b3828a
plugins/multifundchannel.c: Add minchannels flag to multifundchannel.
...
[ changed from best_effort binary to minchannels counter -- RR]
2020-09-09 16:45:56 +09:30
ZmnSCPxj jxPCSnmZ
c9f78d4e0a
tests/test_connection.py: Add more complex multifunding tests.
2020-09-09 16:45:56 +09:30
ZmnSCPxj jxPCSnmZ
1162655b0e
tests/test_connection.py: Add simple multifunding tests.
2020-09-09 16:45:56 +09:30