SomberNight
7bcb59ffb5
wallet: when sweeping, do network reqs in parallel, and don't block GUI
6 years ago
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
6 years ago
SomberNight
1978bba915
fix tests: follow-up 154b9cab50
6 years ago
SomberNight
e6e587b7da
trustedcoin: use psbt format on wire. rm psbt to legacy tx conversion.
...
closes #6123
6 years ago
ThomasV
2adbbee5fe
Add extra state to distinguish shutdown negotiation from post-
...
negotiation, where channel should not be reestablished. See #6182
6 years ago
SomberNight
f9de6a5354
tests: lnpeer: make debug htlc failure hooks more uniform
6 years ago
ThomasV
d3fb68575d
daemon.py: Add authentication to Watchtower.
...
Define abstract class AuthenticatedServer
6 years ago
ThomasV
2fed218452
follow-up prev commit (fix regtest)
6 years ago
ThomasV
11aaa0b66f
Simplify services (watchtower, payserver):
...
- Do not expose services settings in GUI
- Use a single netaddress configuration variable.
6 years ago
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...
6 years ago
SomberNight
cc4029c335
test_lnpeer: add some multi-hop payment unit tests
6 years ago
SomberNight
63b18dc30f
lnrouter: add PathEdge/LNPaymentPath for (node_id, scid)
6 years ago
SomberNight
04d018cd0f
test_lnpeer: some clean-up, make it easier to add "num_node>2" tests
6 years ago
ThomasV
5c05c06bf0
follow-up prev commit: fix test_lnpeer
6 years ago
ThomasV
7cbb102c81
add test with fail_malformed_htlc to forwarding regtest
6 years ago
ThomasV
ab188ff375
add config variable to test update_fail_malformed_htlc
6 years ago
ThomasV
8ba7e68064
fix #6122 : extract preimage from on-chain htlc_tx
6 years ago
SomberNight
6f7a4ab048
lnpeer: add get_channel_by_id, for small speed-up
6 years ago
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)
6 years ago
SomberNight
223b62554e
lntransport: use network proxy if available
...
fixes #4824
6 years ago
SomberNight
b5811e8072
lnworker.peers: fix threading issues
6 years ago
SomberNight
1600241b02
fix tests: follow-up prev few commits
6 years ago
ThomasV
ef2ff11926
fix tests (follow-up prev commit)
6 years ago
SomberNight
54e1520ee4
ln: check if chain tip is stale when receiving HTLC
...
if so, don't release preimage / don't forward HTLC
6 years ago
SomberNight
12283d625b
(trivial) rename lnchannel.channel_states to ChannelState
6 years ago
ThomasV
e50f6d29ed
export channel backup from kivy gui
6 years ago
SomberNight
7dabbdd082
tests_lnpeer: trivial fix
6 years ago
SomberNight
1ea89af012
crypto.pw_decode: fix one case of raising incorrect exception
6 years ago
ThomasV
d2a58a2ec3
lnpeer: do not assume our privkey is the same as lnworker's privkey.
6 years ago
ThomasV
f3995350e8
localconfig: rename seed to channel_seed
6 years ago
ThomasV
0ea21c59d2
Save channel seed in localconfig
6 years ago
SomberNight
71635216df
ln feature bits: validate transitive feature deps everywhere
6 years ago
SomberNight
1be0a710c3
ln: implement option payment_secret
6 years ago
SomberNight
4b78bf94d4
lnaddr: add feature bit support to invoices
...
see https://github.com/lightningnetwork/lightning-rfc/pull/656
6 years ago
SomberNight
a66437f399
lnonion: implement basis of varonion support
6 years ago
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
6 years ago
SomberNight
c69937395e
lnmsg: add more tests (for encode_msg, decode_msg)
6 years ago
SomberNight
85d7a13360
lnmsg: implement tests from BOLT-01
6 years ago
SomberNight
3a73f6ee5c
lnmsg.decode_msg: dict values for numbers are int, instead of BE bytes
...
Will be useful for TLVs where it makes sense to do the conversion in lnmsg,
as it might be more complicated than just int.from_bytes().
6 years ago
SomberNight
900a7631cf
commands: add new cmd "getprivatekeyforpath" to export a WIF for a path
...
related: #6061
6 years ago
SomberNight
79d57784c1
lnchannel: add more type hints
6 years ago
SomberNight
db84de5493
trivial: use "chunks()" for htlc_sigs in lnchannel
6 years ago
SomberNight
8ad6d5ddda
lnchannel: clean-up docstrings a bit
...
Removed lnd copyright as by now everything covered in this file
has been rewritten.
6 years ago
SomberNight
acb0d7ebac
lnchannel: better checks for "update_add_htlc"
...
I believe this now implements all the checks listed in BOLT-02 for
update_add_htlc, however, the BOLT is sometimes ambiguous,
and actually the checks listed there IMO are insufficient.
There are still some TODOs, in part because of the above.
6 years ago
SomberNight
5c8455d00b
lnchannel: when adding HTLCs, run checks for both directions
6 years ago
SomberNight
01207316aa
storage upgrade: move "htlc_minimum_msat" to base channel config
6 years ago
SomberNight
53c6fc8cf1
lnchannel: test for max htlc value (needs to be below protocol maximum)
6 years ago
SomberNight
777e350fae
lnchannel: partly fix available_to_spend
...
we were looking at inconsistent ctns
and we were looking at the wrong subject's ctx
all the FIXMEs and TODOs here will still warrant some attention.
(note that test_DesyncHTLCs was passing incorrectly:
the "assertRaises" was catching a different exception)
6 years ago
SomberNight
2cc76fbbbd
lnworker: fix type error re pending_payments, and impl malformed htlcs
...
In old code, in lnpeer.htlc_switch(), "error" in lnworker.pending_payments
had incorrect type.
TODO: we need tests for payment failures...
6 years ago
SomberNight
5e59d1a0ed
lnonion: use random starting bytes in Sphinx packet as in updated BOLT4
...
see https://github.com/lightningnetwork/lightning-rfc/pull/697
6 years ago