ThomasV
a8ce8109be
Perform breach remedy without sweepstore:
...
- add functions to lnsweep
- lnworker: analyze candidate ctx and htlc_tx
- watchtower will be optional
- add test for breach remedy with spent htlcs
- save tx name as label
2019-08-20 09:03:12 +02:00
SomberNight
acbb458ef7
set default to_self_delay to 1 day
2019-08-20 09:03:11 +02:00
ThomasV
8d77a7ecd8
save timestamps in htlc log
2019-08-20 09:03:11 +02:00
ThomasV
38f1436d78
post rebase fixes
2019-08-20 09:03:11 +02:00
ThomasV
8b12f481da
lightning: display forwarded payments as a single history item
2019-08-20 09:03:11 +02:00
SomberNight
3a2ab149b9
lnchannel: add_htlc and receive_htlc now take and return UpdateAddHtlc
...
also fix undefined vars in _maybe_forward_htlc and _maybe_fulfill_htlc
in lnpeer
2019-08-20 09:03:11 +02:00
ThomasV
3dce65dc73
Rename lnchan, lnchannel_verifier, lnbase
...
Auto-completions are a pain if files share a long prefix
2019-08-20 09:03:11 +02:00
Janus
e6bd3959e0
ln: handle channel limits better, show remote limits in details dialog, replace rusty's testnet peer (doesn't work currently)
2019-08-20 09:03:11 +02:00
Janus
e56e849505
lnchan refactor
...
- replace undoing logic with new HTLCManager class
- separate SENT/RECEIVED
- move UpdateAddHtlc to lnutil
2019-08-20 09:03:11 +02:00
Janus
2c1fcb2f54
ln: remove EncumberedTransaction
2019-08-20 09:03:11 +02:00
Janus
864d910888
qt: channel_details: add more info: sent/received, channel id, funding tx, short channel id, node id
2019-08-20 09:03:11 +02:00
SomberNight
595cfcbb65
move sweeping methods from lnchan.py to new file
...
also sweep "received" htlcs from "our" ctx
also sweep htlcs from their ctx (non-breach)
extract ctn; included_htlcs_in_their_latest_ctxs
2019-08-20 09:03:11 +02:00
Janus
e3409d32ef
channel details with list of htlcs
2019-08-20 09:03:11 +02:00
SomberNight
521fadb8cb
lnutil: restructure channel config namedtuples (local/remote config)
2019-08-20 09:03:11 +02:00
SomberNight
5b7c801ca4
after rebase fixes
2019-08-20 09:03:11 +02:00
Janus
c8dcf0b471
lnwatcher: more detailed logging, support notifying test suite of txs
2019-08-20 09:03:11 +02:00
Janus
001bb4ca09
remove incorrect docstrings, attribute docstring sources where applicable
2019-08-20 09:03:10 +02:00
SomberNight
449ec013fe
add licence headers to more files
2019-08-20 09:03:10 +02:00
Janus
15b0720f5e
lightning channel reserves
2019-08-20 09:03:10 +02:00
Janus
0dfc9e512b
fix co-op close
2019-08-20 09:03:10 +02:00
SomberNight
04ec7e9968
lnutil.make_funding_input: don't return payment pubkeys
...
order depends on who is initiator anyway
2019-08-20 09:03:10 +02:00
Janus
1f97a9753e
redeem htlc outputs of our local commitment transaction back to wallet
2019-08-20 09:03:10 +02:00
SomberNight
7edbd5682a
fix confusion re max path length
2019-08-20 09:03:10 +02:00
SomberNight
2fafd01945
protect against getting robbed through routing fees
2019-08-20 09:03:10 +02:00
SomberNight
d511ecdc00
start failing htlcs
2019-08-20 09:03:10 +02:00
Janus
eabe23f6b8
make function for determining who pays fee
2019-08-20 09:03:10 +02:00
ThomasV
a0acec9720
gather definitions of LN exceptions
2019-08-20 09:03:10 +02:00
ThomasV
409a336071
fix tests (follow-up previous commit)
2019-08-20 09:03:10 +02:00
ThomasV
445252284f
move transport code to its own file
2019-08-20 09:03:10 +02:00
Janus
b26dc66567
lnhtlc: only store feerate once, don't store heights since we do not roll back
2019-08-20 09:03:10 +02:00
Janus
e8471e483b
lnhtlc: merge config and state, remove unnecessary properties
2019-08-20 09:03:10 +02:00
SomberNight
eced61123d
clean up local/global features
2019-08-20 09:03:10 +02:00
ThomasV
11c3ca281c
create sweep transaction outside of lnwatcher
2019-08-20 09:03:10 +02:00
SomberNight
17457327ef
make key derivation reasonable
...
no more hardcoded secrets, no more key-reuse
2019-08-20 09:03:10 +02:00
Janus
5859054095
fix lnwatcher for channels initiated by remote
2019-08-20 09:03:10 +02:00
SomberNight
fb8deecb57
lnutil: missing import
2019-08-20 09:03:10 +02:00
Janus
efc8d50570
move connection string decoding to lnworker, fix test_lnutil
2019-08-20 09:03:10 +02:00
Janus
e23e0d6c6e
ln: avoid duplicated htlc filter code, support multiple htlcs better
2019-08-20 09:03:10 +02:00
Janus
e18a3b5a3d
lnutil: remove LI01 sort after Tx.from_io: fixup after rebase on da9d1e6001
2019-08-20 09:03:10 +02:00
Janus
224226f427
ln: cooperative close with remote peer initiating
2019-08-20 09:03:10 +02:00
Janus
d5d9270d0c
lnhtlc: save logs and feeupdates
2019-08-20 09:03:10 +02:00
Janus
eca5545004
lnhtlc: don't throw away fee updates or htlcs
...
also add inject_fees debug command
2019-08-20 09:03:10 +02:00
Janus
261fefb6f3
lnwatcher rebased
2019-08-20 09:03:10 +02:00
SomberNight
1b030fca78
rebase follow-up: use namedtuples from master in new code (TxOutput, TxMinedStatus)
2019-08-20 09:03:10 +02:00
SomberNight
4d1785799b
lnbase.pay: test if htlc can be added
2019-08-20 09:03:10 +02:00
SomberNight
c02cc9bb3b
persist recent peers. implement dns seed bootstrapping.
...
dns seeds are currently disabled though, as they always seem to return mainnet nodes.
2019-08-20 09:03:10 +02:00
SomberNight
bc06ded4b9
persist nodes in channel_db on disk
2019-08-20 09:03:10 +02:00
Janus
a841fa3602
ln: save htlc signatures
2019-08-20 09:03:10 +02:00
SomberNight
a5b44d25b0
persist channel db on disk. verify channel gossip sigs.
2019-08-20 09:03:10 +02:00
Janus
9853cc6f31
ln: do not use mSAT accuracy for commitment fees
2019-08-20 09:03:10 +02:00