1
0
Commit Graph

41 Commits

Author SHA1 Message Date
ThomasV
2e4cfd0744 fix race in NetworkJobOnDefaultServer constructors 2019-12-06 20:17:52 +01:00
SomberNight
bafe8a2fff integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
SomberNight
f60f690ca9 change many str(e) to repr(e) as some exceptions were cryptic
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
2019-07-17 20:12:52 +02:00
SomberNight
72d06038a7 synchronizer: fix race in _on_address_status
Triggering needs two consecutive scripthash status changes
in very quick succession. Client gets notification from server,
but then response to "blockchain.scripthash.get_history" will already contain
the changed-again history that has a different status.

20190627T101547.902638Z |     INFO | synchronizer.[default_wallet] | receiving history mwXtx49BCGAiy4tU1r7MBX5VVLWSdtasCL 1
20190627T101547.903262Z |     INFO | synchronizer.[default_wallet] | error: status mismatch: mwXtx49BCGAiy4tU1r7MBX5VVLWSdtasCL
2019-06-29 06:03:14 +02:00
SomberNight
e8bc5bbec4 interface: follow-up 6cc70bc7a2 2019-05-15 19:56:16 +02:00
SomberNight
0e6cf153d7 synchronizer: show progress in GUI 2019-05-07 17:58:06 +02:00
SomberNight
a7b13f4876 logging: make console log lines shorter 2019-05-02 15:19:11 +02:00
SomberNight
3385a94753 logging: basics 2019-05-02 15:19:03 +02:00
SomberNight
2ad73050b3 wallet: towards restoring previous performance 2019-03-01 17:59:22 +01:00
ThomasV
791e680a96 abstract database away from wallet and address_synchronizer 2019-02-28 09:02:58 +01:00
SomberNight
5313591c28 synchronizer: disconnect from server if cannot deserialize txn 2019-02-15 17:22:24 +01:00
SomberNight
7b8114f865 synchronizer: allow server not finding txn sometimes
User has wallet file with history that includes some txid; corresponding
raw tx is not in the "transactions" dict in the file however.
When the synchronizer starts up, it requests this "missing" txn from
the server... but what if the server does not know about it?
Maybe it was reorged and is not in the new best chain,
and not even in mempool. This was not handled previously.

fix #5122
2019-02-14 20:54:55 +01:00
SomberNight
e37da62a1c fix most "scripts"
related: #4754
2018-11-02 20:14:59 +01: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
02f108d927 restructure synchronizer
fix CLI notify cmd. fix merchant websockets.
2018-10-03 17:13:46 +02:00
SomberNight
6b8ad2d126 fix some CLI/RPC commands 2018-09-27 18:01:25 +02:00
SomberNight
7cc628dc79 synchronizer: fix adding duplicate addresses race 2018-09-24 17:37:09 +02:00
SomberNight
1294608571 synchronizer: offload cpu-heavy address generation to other thread 2018-09-20 20:16:03 +02:00
SomberNight
002b8a99e2 synchronizer: make 'add' thread-safe, and some clean-up 2018-09-20 18:11:26 +02:00
SomberNight
cbd91ba5b1 synchronizer: fix race
The synchronizer would sometimes not send 'wallet_updated' triggers
if it was fast enough to do all the work between two 0.1 sec ticks.
(is_up_to_date() would return True both before and after)
2018-09-19 21:41:10 +02:00
SomberNight
96b699e534 synchronizer: fix refresh bug 2018-09-19 16:35:30 +02:00
SomberNight
af63913189 network triggers: rm 'updated'; more fine-grained instead
rm 'interfaces'
add 'wallet_updated', add 'network_updated'
2018-09-18 16:49:48 +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
a9197236a2 change 'new_transaction' notification to include wallet 2018-09-16 02:48:13 +02:00
SomberNight
2453872a09 synchronizer: rm redundant 'updated' notification 2018-09-16 02:31:56 +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
ThomasV
3b6af914e1 add multiplexing capability to NotificationSession, simplify interface 2018-09-11 17:06:41 +02:00
SomberNight
b279d351d8 interface.session: add default timeout to send_request 2018-09-10 17:12:05 +02:00
SomberNight
57cac47944 fix synchronizer: ask for missing txns on start
Previously it could happen that a wallet was fully synced,
except it had missing transactions, and it would not recover from this state.
2018-09-08 22:44:14 +02:00
SomberNight
b33b2c0945 synchronizer: more batching 2018-09-08 18:38:58 +02:00
SomberNight
136df7e5ee wallet: recreate Synchronizer and Verifier when switching servers
not that nice but solves races
2018-09-08 01:34:33 +02:00
SomberNight
32528d6aa6 rm dupe code 2018-09-08 01:10:41 +02:00
SomberNight
26172686b8 restructure synchronizer/verifier <--> interface coupling 2018-09-07 19:34:28 +02:00
ThomasV
5ef04a039b move NotificationSession 2018-09-06 15:53:41 +02:00
Janus
f12074397f aiorpcx: reintroduce periodic fee updates 2018-09-06 14:17:39 +02:00
Janus
9bfb5fe71f address synchronizer: use aiorpcx session object in network's interface,
request, fees
2018-09-06 14:17:36 +02:00
Janus
b120584f97 aiorpcx address synchronizer 2018-09-06 14:11:36 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00