Commit graph

27 commits

Author SHA1 Message Date
SomberNight
0fbbc7b060
channel verifier: NetworkJobOnDefaultServer, and some error handling 2018-11-05 20:23:41 +01:00
SomberNight
2d24ac150a
fix lnwatcher: network triggers were renamed 2018-11-05 20:18:29 +01:00
SomberNight
f99de79da1
lnwatcher improvements
- only try sweeping csv-locked to_local if past timelock
- check if outputs are already spent
- no need to keep watching channels for which all outputs are spent and mined deep
2018-11-05 20:05:51 +01:00
SomberNight
082a83dd85
rename crypto.Hash to sha256d 2018-10-25 22:28:24 +02:00
SomberNight
a88a2dea82
split bip32 from bitcoin.py 2018-10-25 22:20:33 +02:00
SomberNight
81cc20039e
more type annotations in core lib 2018-10-22 16:41:25 +02:00
SomberNight
e8bc025f5c
verifier: fix race in __init__ 2018-10-19 18:10:04 +02:00
SomberNight
372921b423
mv NetworkJobOnDefaultServer to util
break ref cycles
2018-10-12 16:09:41 +02:00
SomberNight
37206ec08e
network: auto-switch servers to preferred fork (or longest chain)
If auto_connect is enabled, allow jumping between forks too.
(Previously auto_connect was only switching servers on a given fork,
not across forks)
If there is a preferred fork set, jump to that (and stay);
if there isn't, always jump to the longest fork.
2018-10-11 20:07:19 +02:00
SomberNight
02f108d927
restructure synchronizer
fix CLI notify cmd. fix merchant websockets.
2018-10-03 17:13:46 +02:00
SomberNight
952e9b87e1
network: clean-up. make external API clear. rm interface_lock (mostly). 2018-09-25 16:44:39 +02:00
SomberNight
1b95cced5d
verifier: perf optimisations
blockchain.read_header is expensive. do cheap tests first
on a wallet with 11k txns, that is synced except for spv proofs,
finishing sync now takes 80 sec instead of 180 sec
2018-09-17 18:31:25 +02:00
SomberNight
aee2d8e120
verifier: fix a race during reorgs
related: 41e088693d
If our guess of a txn getting confirmed at the same height in the new chain
as it was at in the old chain is incorrect, there is a race between the
verifier and the synchronizer. If the verifier wins, the exception will cause
us to disconnect.
2018-09-17 03:35:25 +02:00
SomberNight
dcab22dcc7
verifier: small clean-up 2018-09-16 22:21:49 +02:00
SomberNight
819044221b
verifier: need to wait for reorg
fixes race between verifier and block header download.
scenario: client starts, connects to server. while client was offline,
there was a reorg. txn A was not mined in the old chain, but is mined
after reorg. client subscribes to addresses and starts downloading headers,
concurrently. server tells client txn A is mined at height H >= reorg height.
client sees it has block header at height H, asks for SPV proof for txn A.
but the header the client has is still the old one, the verifier was faster
than the block header download (race...). client receives proof. proof is
incorrect for old header. client disconnects.
2018-09-13 19:00:21 +02:00
SomberNight
e829d6bbcf
wallet: put Sync and Verifier in their own TaskGroup, and that into interface.group 2018-09-11 20:24:01 +02:00
SomberNight
77d86f074f
verifier: don't try to request same chunk multiple times 2018-09-08 19:11:02 +02:00
SomberNight
c49e563881
verifier: if we fail to verify SPV proof, disconnect from server 2018-09-08 18:10:21 +02:00
SomberNight
26172686b8
restructure synchronizer/verifier <--> interface coupling 2018-09-07 19:34:28 +02:00
SomberNight
2187615c08
verifier: request proofs in batches 2018-09-06 14:17:43 +02:00
Janus
e9ceeb85af
async block headers 2018-09-06 14:17:41 +02:00
Janus
8f36c9167d
aiorpcx: remove callback based code, add session to Interface 2018-09-06 14:17:29 +02:00
SomberNight
531cdeffa9
blockchain.py: rename 'checkpoint' to 'forkpoint' 2018-08-03 18:25:53 +02:00
SomberNight
a29e2218c8
wallet: introduce namedtuples TxMinedStatus and VerifiedTxInfo 2018-07-31 17:10:15 +02:00
SomberNight
41e088693d
verifier: better handle reorgs (and storage upgrade) 2018-07-31 15:51:05 +02:00
SomberNight
d2abaf54e8
verifier: small refactor 2018-07-23 19:59:05 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00
Renamed from lib/verifier.py (Browse further)