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
78488ebcbf
aiosafe safety belts
...
traceback.print_exc was raising, and self.exception did not got set,
and the whole trace was lost. arghhhh
2018-09-16 22:17:20 +02:00
SomberNight
4360a785ad
blockchain: blockchains_lock needed to write/iterate global dict
2018-09-16 18:26:40 +02:00
SomberNight
7dc5665ab1
interface: faster bootstrap of backwards search
2018-09-16 18:18:49 +02:00
SomberNight
4d502eb2bf
qt tx notifications: wait until sync finishes
...
Comment is no longer relevant. Also, actually it was incorrect.
Each txn is only downloaded once, though 'added' multiple times to the wallet.
The triggers are only sent out by the Synchronizer, once, when downloaded.
The actual reason for the inconsistency was that get_wallet_delta can only
give complete results once the wallet is synced.
2018-09-16 09:40:07 +02:00
SomberNight
9c919e6478
interface: fix off-by-one in request_chunk
...
was harmless; usually we just downloaded an extra individual header after the chunk
2018-09-16 09:01:53 +02:00
SomberNight
1d711eeadc
interface: split up 'step'; binary search of headers
2018-09-16 08:29:01 +02:00
SomberNight
58a5346d72
network: switch lagging interface
2018-09-16 07:59:36 +02:00
SomberNight
27e42b4826
interface: if header is on other chain already, just switch (regression)
2018-09-16 07:42:25 +02:00
SomberNight
3fc9326c43
interface: try hard not to infinite loop while getting headers
2018-09-16 07:35:11 +02:00
SomberNight
da23e71db1
interface: block header search simplifications
2018-09-16 07:34:05 +02:00
SomberNight
ab94a47b8e
network: mv request_chunk to interface
...
this is a bugfix: the old code always tried to connect the chunk to
network.blockchain(). the correct behaviour is to connect to the
blockchain of the interface.
2018-09-16 06:09:14 +02:00
SomberNight
1635bc8cb3
blockchain: use HEADER_SIZE named constant instead of magic numbers
2018-09-16 03:06:21 +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
6f5a4a5502
fix prev: rm incorrect assert
2018-09-15 08:23:49 +02:00
SomberNight
482259df8b
interface: further clean-up in 'step'
2018-09-15 07:26:36 +02:00
SomberNight
beb37aafc5
interface: clean-up 'step'; backwards search
2018-09-15 06:44:18 +02:00
SomberNight
2a958499b6
fx: disable checking mime type in get_json
...
looking at you, CoinDesk..
2018-09-15 00:30:43 +02:00
SomberNight
f38ec93ae9
qt fx settings: restore selected exchange in combobox if list changes
2018-09-14 23:07:13 +02:00
SomberNight
6ccd83397c
fx: asyncio.Event is not thread-safe; also the 'timeout' field was removed
2018-09-14 23:01:28 +02:00
SomberNight
d1f11f5fe9
fix #4717
2018-09-14 16:12:47 +02:00
SomberNight
2e61359d50
network: stop pending connections when stopping network
2018-09-13 21:20:55 +02:00
SomberNight
23f56ffa8a
network: avoid infinite reconnect loop to same server
2018-09-13 21:02:37 +02:00
SomberNight
e4bd445a38
network.new_interface: clarify how timed out interfaces are closed
2018-09-13 20:50:32 +02:00
SomberNight
64ab8222f7
interface: if request times out, no need to dump trace
2018-09-13 20:17:58 +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
78e9152723
network: get_servers to always include recent servers
2018-09-13 16:06:41 +02:00
SomberNight
43664d5f11
fixes for stdio/text gui
2018-09-13 15:11:28 +02:00
SomberNight
1f14894c43
network: add server to recent_servers only after checks
2018-09-13 03:45:21 +02:00
SomberNight
c93d137c5e
interface: minor clean-up split out _set_proxy from init
2018-09-13 01:20:20 +02:00
SomberNight
c40468a8d3
interface: disable bw rate limiting done by aiorpcx
2018-09-12 22:58:36 +02:00
SomberNight
2e18e3c62b
adapt to aiorpcx 0.8.1: rm report_crash kwarg from group.spawn
2018-09-12 22:09:59 +02:00
SomberNight
a3fb865db0
follow-up prev
...
this is already running inside interface.group
2018-09-12 21:22:46 +02:00
SomberNight
6452582a17
network: batch requests in request_server_info
2018-09-12 21:18:08 +02:00
SomberNight
e7fa42ce3e
wallet: don't write to disk when switching servers
2018-09-12 20:25:13 +02:00
SomberNight
cad4fb80c1
interface: throttle messages
2018-09-12 20:17:12 +02:00
SomberNight
47a97279af
rename CustomTaskGroup to SilentTaskGroup
2018-09-12 19:24:58 +02:00
SomberNight
2039c07a2d
interface.mark_ready: handle cancellation
2018-09-12 18:45:15 +02:00
SomberNight
1419a5c60d
interface: change how GracefulDisconnect is handled
2018-09-12 18:43:50 +02:00
SomberNight
3842205b8a
keystore: add note regarding xpubkeys
2018-09-12 18:22:34 +02:00
SomberNight
152c6abb86
network: fix another race in session.subscribe
...
key in session.subscriptions does not imply key in session.cache
2018-09-12 16:58:15 +02:00
SomberNight
9505a203d8
util: rm dead network code
2018-09-12 16:57:12 +02:00
ThomasV
15b21abc99
fix fee_histogram notifications
2018-09-12 12:56:51 +02:00
ThomasV
ce4608ae76
add help text to bump fee dialog
2018-09-12 12:18:27 +02:00
SomberNight
8cd08cc0fa
network: rm dead code; simplify
2018-09-12 01:40:54 +02:00
SomberNight
ab3c3c5ed7
interface: small clean-up
2018-09-11 22:16:30 +02:00
SomberNight
a5b3f809ce
blockchain.py: add type annotations
2018-09-11 22:14:57 +02:00
SomberNight
014c0d3a41
network: update UI when downloading chunks
2018-09-11 21:44:17 +02:00