Commit graph

387 commits

Author SHA1 Message Date
SomberNight
faafb70d4c
follow-up prev
(committed wrong raw tx literal)
2020-06-28 17:45:00 +02:00
SomberNight
29534dcf3d
commands: allow setting custom 'nsequence' in 'serialize' cmd
closes #6297
2020-06-28 17:26:52 +02:00
SomberNight
10c2183461
handle_error_code_from_failed_htlc: omg brainfart :(
follow-up 85841ba20d
2020-06-24 21:33:44 +02:00
SomberNight
662d0d92bd
remote watchtower: enforce that SSL is used, on the client-side 2020-06-24 16:57:50 +02:00
SomberNight
d5f368c584
LN invoices: support msat precision
fixes #6250
2020-06-22 22:48:13 +02:00
SomberNight
b6db201570
util: small clean-up for format_satoshis 2020-06-22 02:46:16 +02:00
SomberNight
2eec7e1600
network: smarter switch_unwanted_fork_interface
Previously this function would not switch to a different chain if the
current chain contained the preferred block. This was not the intended
behaviour: if there is a *stronger* chain that *also* contains the
preferred block, we should jump to that.

Note that with this commit there will now always be a preferred block
(defaults to genesis). Previously, it might seem that often there was none,
but actually in practice if the user used the GUI context menu to switch
servers even once, there was one (usually genesis).

Hence, with the old code, if an attacker mined a single header which
then got reorged, auto_connect clients which were connected to the
attacker's server would never switch servers (jump chains) even
without the user explicitly configuring preference for the stale branch.
2020-06-21 11:31:54 +02:00
SomberNight
2580832a88
fix travis: regtest tests were failing with bitcoind 0.20
see https://github.com/bitcoin/bitcoin/pull/16524
2020-06-17 18:15:59 +02:00
SomberNight
725b6f1564
crypto: chacha20-methods: make associated_data param optional 2020-06-17 17:32:51 +02:00
SomberNight
e59eb147c0
lnchannel.available_to_spend: LOCAL now respects "fee spike buffer" 2020-06-15 15:43:41 +02:00
SomberNight
23ea64808d
fix tests: follow-up prev 2020-06-13 18:53:50 +02:00
Jin Eguchi
4a18100e6b
Fix typos 2020-06-12 05:48:19 +09:00
SomberNight
3509343447
ln: make 'to_self_delay' CSV configurable
needed for tests
2020-06-09 18:36:34 +02:00
SomberNight
7bcb59ffb5
wallet: when sweeping, do network reqs in parallel, and don't block GUI 2020-06-05 20:30:25 +02:00
SomberNight
e07d5d8422
fix tests: follow-up psbt changes
follow-up e058ee2957

the difference for each tx here is that
- the old ones had witness utxo but not utxo
- the new ones have utxo but not witness utxo
2020-06-03 21:24:05 +02:00
SomberNight
1978bba915
fix tests: follow-up 154b9cab50 2020-06-03 19:00:28 +02:00
SomberNight
e6e587b7da
trustedcoin: use psbt format on wire. rm psbt to legacy tx conversion.
closes #6123
2020-05-29 18:58:30 +02:00
ThomasV
2adbbee5fe Add extra state to distinguish shutdown negotiation from post-
negotiation, where channel should not be reestablished. See #6182
2020-05-29 18:00:52 +02:00
SomberNight
f9de6a5354
tests: lnpeer: make debug htlc failure hooks more uniform 2020-05-14 19:15:32 +02:00
ThomasV
d3fb68575d daemon.py: Add authentication to Watchtower.
Define abstract class AuthenticatedServer
2020-05-12 10:12:30 +02:00
ThomasV
2fed218452 follow-up prev commit (fix regtest) 2020-05-12 09:22:39 +02:00
ThomasV
11aaa0b66f Simplify services (watchtower, payserver):
- Do not expose services settings in GUI
 - Use a single netaddress configuration variable.
2020-05-10 14:52:50 +02:00
SomberNight
619f8555f5
follow-up prev: trivial rename
Just realised that the "diamond" graph is actually defined in Graph Theory
but it has an extra edge. What we have here is apparently called a "square" graph.
Not that it matters much but might as well name it as such then...
2020-05-06 11:27:50 +02:00
SomberNight
cc4029c335
test_lnpeer: add some multi-hop payment unit tests 2020-05-06 11:06:44 +02:00
SomberNight
63b18dc30f
lnrouter: add PathEdge/LNPaymentPath for (node_id, scid) 2020-05-06 11:06:37 +02:00
SomberNight
04d018cd0f
test_lnpeer: some clean-up, make it easier to add "num_node>2" tests 2020-05-06 11:06:33 +02:00
ThomasV
5c05c06bf0 follow-up prev commit: fix test_lnpeer 2020-05-05 21:18:17 +02:00
ThomasV
7cbb102c81 add test with fail_malformed_htlc to forwarding regtest 2020-05-05 09:04:17 +02:00
ThomasV
ab188ff375 add config variable to test update_fail_malformed_htlc 2020-05-04 20:31:44 +02:00
ThomasV
8ba7e68064 fix #6122: extract preimage from on-chain htlc_tx 2020-05-03 16:03:27 +02:00
SomberNight
6f7a4ab048
lnpeer: add get_channel_by_id, for small speed-up 2020-04-30 21:13:29 +02:00
SomberNight
b9b53e7f76
lnworker: fix threading issues for .channels attribute
external code (commands/gui) did not always take lock when iterating lnworker.channels.
instead of exposing lock, let's take a copy internally (as with .peers)
2020-04-30 21:08:26 +02:00
SomberNight
223b62554e
lntransport: use network proxy if available
fixes #4824
2020-04-15 21:44:09 +02:00
SomberNight
b5811e8072
lnworker.peers: fix threading issues 2020-04-15 21:43:58 +02:00
SomberNight
1600241b02
fix tests: follow-up prev few commits 2020-04-15 17:39:39 +02:00
ThomasV
ef2ff11926 fix tests (follow-up prev commit) 2020-04-14 18:35:50 +02:00
SomberNight
54e1520ee4
ln: check if chain tip is stale when receiving HTLC
if so, don't release preimage / don't forward HTLC
2020-04-13 17:04:27 +02:00
SomberNight
12283d625b
(trivial) rename lnchannel.channel_states to ChannelState 2020-04-13 16:02:05 +02:00
ThomasV
e50f6d29ed export channel backup from kivy gui 2020-04-10 20:04:24 +02:00
SomberNight
7dabbdd082
tests_lnpeer: trivial fix 2020-04-08 13:18:56 +02:00
SomberNight
1ea89af012
crypto.pw_decode: fix one case of raising incorrect exception 2020-04-08 12:49:50 +02:00
ThomasV
d2a58a2ec3 lnpeer: do not assume our privkey is the same as lnworker's privkey. 2020-04-06 19:06:27 +02:00
ThomasV
f3995350e8 localconfig: rename seed to channel_seed 2020-04-06 16:53:48 +02:00
ThomasV
0ea21c59d2 Save channel seed in localconfig 2020-04-04 13:28:19 +02:00
SomberNight
71635216df
ln feature bits: validate transitive feature deps everywhere 2020-04-01 21:49:19 +02:00
SomberNight
1be0a710c3
ln: implement option payment_secret 2020-04-01 21:49:12 +02:00
SomberNight
4b78bf94d4
lnaddr: add feature bit support to invoices
see https://github.com/lightningnetwork/lightning-rfc/pull/656
2020-04-01 21:42:52 +02:00
SomberNight
a66437f399
lnonion: implement basis of varonion support 2020-04-01 21:42:48 +02:00
SomberNight
6ba08cc8d4
ln feature bits: flatten namespaces, and impl feature deps and ctxs
This implements:
- flat feature bits https://github.com/lightningnetwork/lightning-rfc/pull/666
- feature bit dependencies https://github.com/lightningnetwork/lightning-rfc/pull/719
2020-04-01 21:41:24 +02:00
SomberNight
c69937395e
lnmsg: add more tests (for encode_msg, decode_msg) 2020-04-01 21:40:13 +02:00