ThomasV
672326bd12
lnwatcher: a bit less verbose
4 years ago
ThomasV
56659c550e
lnwatcher: fix another broadcast-too-early error
4 years ago
ThomasV
e99a5a7703
fix lnwatcher broadcast logic, follow-up b9f01a86fe
4 years ago
ThomasV
b9f01a86fe
lnwatcher: check that parent transaction is confirmed in CSV test
4 years ago
ThomasV
44f29331bf
lnwatcher: in inspect_tx_candidate, match witness scripts against HTLC templates
...
fixes #7781
4 years ago
bitromortac
ff61020dd2
watchtower: watch new channels
4 years ago
ThomasV
763ee86028
lnwatcher: trigger 'verified' callback with the main wallet object.
...
This is a temporary fix; we should not use an extra synchronizer, and persist results.
5 years ago
ThomasV
aa1fcc784e
wallet: store wanted_height in future_tx, instead of remaining blocks
5 years ago
ThomasV
bbb9ce2430
lnwatcher.try_redeem: output log only the first time a tx is seen
5 years ago
ThomasV
aba0bad30c
lnwatcher: try_redeem must return if tx is None
5 years ago
ThomasV
cd025c5553
inspect_tx_candidate: tx output must be of address type
5 years ago
SomberNight
3c019c2f9c
daemon/wallet/network: make stop() methods async
5 years ago
SomberNight
9380b331e4
LNWatcher: implement diagnostic_name; for nicer log lines
5 years ago
SomberNight
2c962abe51
network: randomise the order of address subscriptions
...
Before this, we were subscribing to our addresses in their bip32 order,
leaking this information to servers. While this leak seems mostly harmless,
it is trivial to fix.
6 years ago
ThomasV
782f9ed273
lnwatcher: use generic callbacks
6 years ago
SomberNight
62be1cc367
small clean-up re "extract preimage from on-chain htlc_tx"
...
related: #6122
6 years ago
ThomasV
8ba7e68064
fix #6122 : extract preimage from on-chain htlc_tx
6 years ago
ThomasV
123b8c1792
(minor) rename chan.sweep_htlc
6 years ago
SomberNight
2b1a150c52
multi-wallet: properly stop lnworker/lnwatcher
6 years ago
ThomasV
bdb870af00
follow-up c454564ed6
6 years ago
ThomasV
9224404108
Move callback manager out of Network class
6 years ago
SomberNight
8e8ab775eb
lnchannel: make AbstractChannel inherit ABC
...
and add some type annotations, clean up method signatures
6 years ago
ThomasV
8f41aeb783
Replace wallet backup with channel backups
...
- channels can be backed up individually
- backups are added to lnwatcher
- AbstractChannel ancestor class
6 years ago
ThomasV
aa32e31a3d
follow-up previous commit
6 years ago
ThomasV
06dfe1699c
LNWatcher: Distinguish between blockchain-triggered channel state
...
transitions, and actions taken as a result.
- state transitions are performed in lnchannel.update_onchain_state()
- peer actions are in LNWorker.on_channel_update()
6 years ago
SomberNight
79d57784c1
lnchannel: add more type hints
6 years ago
SomberNight
ec6be665d5
lnwatcher: unwatch deeply mined channels
...
reduces log spam generated by "REDEEMED" channels...
6 years ago
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