ThomasV
8b63f7176e
Add short channel id to tx labels
6 years ago
ThomasV
3c111471e9
Fix bug with save_funding_height, save_closing_height
...
(it would enter a state where only closing_height was saved)
6 years ago
SomberNight
931d961721
lnpeer/lnwatcher: include channel id in log lines
6 years ago
ThomasV
5785c2fa2f
Fix #5975 : Forget or redeem channels that are never funded.
...
- initiator: wait until double spent
- non-initiator: wait until timeout
6 years ago
ThomasV
20d8da7e24
db upgrade: store channel tx height and timestamps in 'channels'
6 years ago
ThomasV
9616333b39
add_future_tx should return success
6 years ago
ThomasV
874efc125d
(minor) trigger 'wallet_updated' callback when adding future tx
6 years ago
ThomasV
3329d9dd0e
lnwatcher: fix keep_watching if the wallet was not force-closed
6 years ago
ThomasV
fe4ca4c466
follow-up previous commit
6 years ago
ThomasV
c9e39d3a79
remove channel from channel_timestamps if funding_tx has been dropped from mempool
6 years ago
SomberNight
d1fc4399e6
lnwatcher: use is_mine(addr) instead of (addr in get_addresses())
...
small performance gain
6 years ago
ThomasV
72f4e83333
fix race in check_onchain_situation
6 years ago
ThomasV
6e6e829ef7
breach remedy: get spender transaction from LNWatcher's db
6 years ago
ThomasV
938fab86d1
detect redeemed channels ( fix #5963 )
6 years ago
ThomasV
f8da0f87a7
follow-up previous commit
6 years ago
ThomasV
3a35f90aa0
Do not use network callback to update channel states; call LNWorker methods directly instead.
...
A callback was used because a single LNWnwatcher object used to be shared for all wallets.
Since wallet now have their own LNWatcher instance, this can be simplified.
6 years ago
ThomasV
dba6cb8a96
lnwatcher: use height == TX_HEIGHT_LOCAL to determine channel onchain state
6 years ago
ThomasV
149cd9598a
Separate JsonDB and WalletDB
6 years ago
ThomasV
cded582fe9
Start watchtower if run_watchtower is set, even if lightning is not activated ( fix #5896 ).
...
Fix parameters of sweepstore.add_sweep_tx, rm dead code.
6 years ago
ThomasV
61dfcba092
Refactor channel states:
...
- persisted states are saved
- state transitions are checked
- transient states are stored in channel.peer_state
- new channel states: 'PREOPENING', 'FUNDED' and 'REDEEMED'
- upgrade storage to version 21
6 years ago
ThomasV
8e08ca7cb1
simplify network callbacks in lnworker
6 years ago
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
6 years ago
SomberNight
ccccaf099f
(trivial) logging "verbosity_filter" was renamed to "LOGGING_SHORTCUT"
6 years ago
SomberNight
75902f8e35
fix logic error in lnworker.on_channel_closed
6 years ago
ThomasV
215dc96de7
define LNWatcher.do_breach_remedy
7 years ago
SomberNight
befa8ea771
transaction: kill "name", "csv_delay", "cltv_expiry" fields
7 years ago
ThomasV
e5502a58ba
uncomment breach_remedy in watchtower
7 years ago
ThomasV
de29fe6930
remove unused import
7 years ago
ThomasV
740381e993
fix: remove unused parameter to add_sweep_tx
7 years ago
ThomasV
f7c05f2602
Synchronize watchtower asynchronously:
...
- remove remote_commitment_to_be_revoked
- pass old ctns to lnsweep.create_sweeptxs_for_watchtower
- store the ctn of sweeptxs in sweepStore database
- request the highest ctn from sweepstore using get_ctn
- send sweeptxs asynchronously in LNWallet.sync_with_watchtower
7 years ago
ThomasV
2be68ac4d2
Use one LNWatcher instance per wallet
7 years ago
ThomasV
c7b9bdc5f5
lnwatcher: wait until lnwatcher is fully synchronized before check_onchain_situation
7 years ago
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
7 years ago
ThomasV
238f3c949c
get rid of sql_alchemy
7 years ago
ThomasV
f2d58d0e3f
optimize channel_db:
...
- use python objects mirrored by sql database
- write sql to file asynchronously
- the sql decorator is awaited in sweepstore, not in channel_db
7 years ago
ThomasV
7be4cdaf18
redeem htlcs:
...
- fix bug in lnsweep: lnwatcher transactions were indexed by prev_txid
- add test for breach remedy with unsettled htlcs
- add timeout option to lnpay, and replace DO_NOT_SETTLE with SETTLE_DELAY
so that we can read intermediate commitment tx in regtest
7 years ago
SomberNight
930d21c31c
channel close handling: detect situation based on output addresses
...
WIP...
7 years ago
ThomasV
32e517f407
improve lightning_dialog GUI settings
7 years ago
SomberNight
cc57da704b
logging: adapt lightning branch to logging changes
7 years ago
ThomasV
e2182f5846
lnwatcher fixes
7 years ago
ThomasV
3abe30e9d8
basic watchtower synchronization
7 years ago
ThomasV
38f1436d78
post rebase fixes
7 years ago
ThomasV
02d013421a
lnwatcher: store transactions as binary
7 years ago
ThomasV
d8e9a9a49e
create parent class for sql databases
7 years ago
ThomasV
b861e2e955
lnwatcher: save sweepstore in sqlite database
7 years ago
ThomasV
43d9e0460e
follow-up previous commit
7 years ago
ThomasV
8aa4ce0704
improve watchtower gui
7 years ago
ThomasV
f04e10f61a
save channel timestamps, and show lightning payments in history tab
7 years ago
ThomasV
19e60f00bb
add watchtower_window
7 years ago
Janus
38396e8ed4
lnwatcher: fix incorrect tuple unpacking in do_breach_remedy
7 years ago