Commit graph

507 commits

Author SHA1 Message Date
Lex Berezhny
7c22111ae0 channel certificate and channel claim can be different accounts, also JSON RPC responses now include a field showing if the channel certificate is available 2019-09-16 13:21:45 -04:00
Alex Grintsvayg
2026848a77
default wallet server to LBC coin 2019-09-16 12:01:38 -04:00
Jack Robison
5fcca6ed0c
feedback
-add comment for the fetchall() that if removed will cause SQLITE_MISUSE
2019-09-10 15:03:17 -04:00
Jack Robison
a05c44ad1e
fix SQLITE_MISUSE
fixes https://github.com/lbryio/lbry-sdk/issues/2164
2019-09-09 22:38:53 -04:00
Victor Shyba
375c2a3363 fix rare edge cases on network 2019-09-09 12:25:16 -04:00
Victor Shyba
4839ca631a make restricted default 2019-09-02 15:10:16 -03:00
Victor Shyba
5018fe90de can also be protocolerror 2019-09-01 00:02:07 -03:00
Victor Shyba
379144bcfe fix restriction rules, minor refactor, translate error from transaction not found into returning none 2019-08-31 17:39:03 -03:00
Victor Shyba
d2cd0ece5f restore multi server, improve sync concurrency 2019-08-31 06:37:29 -03:00
Victor Shyba
10b7ccaa92 fix unordered history inconsistency 2019-08-31 06:37:29 -03:00
Victor Shyba
925eb618de failing test for unordered mempool 2019-08-31 06:37:29 -03:00
Victor Shyba
96800de052 switch tests and fixes + support for multiple servers 2019-08-31 06:37:29 -03:00
Victor Shyba
9df659b647 no chdir 2019-08-31 06:37:29 -03:00
Victor Shyba
9cfa9b2c57 use only the main session, dont cancel on connectionerror 2019-08-26 11:17:39 -03:00
Victor Shyba
b9b8178e30 use a semaphore to avoid false timeouts on large syncs 2019-08-26 11:17:39 -03:00
Victor Shyba
089cefb77b make it debug for now, there are false positives 2019-08-26 11:17:39 -03:00
Victor Shyba
ee9ea1faab get history only from main server 2019-08-26 11:17:39 -03:00
Victor Shyba
22b2cf8b0c warn when out of sync 2019-08-26 11:17:39 -03:00
Victor Shyba
10bd3c9dda fix misc reconnect scenarios 2019-08-26 11:17:39 -03:00
Victor Shyba
6c3147fcf4 simple address subs instead of batch 2019-08-26 11:17:39 -03:00
Jack Robison
5e8d169c50 debug 2019-08-26 11:17:39 -03:00
Jack Robison
8657a35fd7 switch_to_fastest 2019-08-26 11:17:39 -03:00
Victor Shyba
202861a900 fix unpack leftovers 2019-08-21 22:03:24 -03:00
Victor Shyba
4c41e7cb29 check headers bounds on access 2019-08-21 22:03:24 -03:00
Alex Grin
f7443061ef
less verbose logging 2019-08-21 09:54:10 -04:00
Jack Robison
c4e0c659a7
fix missing perf_counter 2019-08-20 19:22:22 -04:00
Jack Robison
f6ba09b171
mypy 2019-08-20 15:41:27 -04:00
Jack Robison
b827881024
mypy 2019-08-20 15:35:06 -04:00
Jack Robison
89e395b5f4
pylint 2019-08-20 15:26:00 -04:00
Jack Robison
c590954eb9
include connection latency in server selection 2019-08-20 15:11:01 -04:00
Jack Robison
a5af3866fd
time.time -> time.perf_counter 2019-08-20 14:56:13 -04:00
Jack Robison
1bef56f030
disconnect from duplicate servers (same ip, different dns) 2019-08-20 14:55:24 -04:00
Jack Robison
9045737504
track response time for server.version only 2019-08-20 14:54:55 -04:00
Jack Robison
0e48772c84
track connection latency 2019-08-20 14:45:53 -04:00
Jack Robison
72690b5cff
raise asyncio.TimeoutError 2019-08-20 14:19:50 -04:00
Jack Robison
07bae26fd3
close connection and reraise on CancelledError 2019-08-20 14:16:56 -04:00
Victor Shyba
7b0e4617d3 fix db test stability 2019-08-20 04:11:04 -03:00
Victor Shyba
af797296ed rolling averages on response time 2019-08-19 16:50:24 -03:00
Victor Shyba
c826c7da0d take load into consideration when picking fastest 2019-08-19 14:02:30 -03:00
Victor Shyba
20af1396b9 refactor stop 2019-08-19 14:02:30 -03:00
Victor Shyba
f567aca532 retry and batch requests, fix some loose ends 2019-08-19 14:02:30 -03:00
Alex Grin
ff73418fc1
Merge pull request #2371 from lbryio/basenetwork_refactor
refactor basenetwork so each session takes care of itself
2019-08-16 10:19:53 -04:00
Victor Shyba
ab6944b7b0 wallet server: dont fail to start on segwit txs 2019-08-14 10:26:02 -03:00
Victor Shyba
4d741bd200 update lbrycrd to 17, add option to disable segwit for now 2019-08-13 18:07:15 -03:00
Victor Shyba
f3a163b382 fix names and types 2019-08-12 18:16:58 -03:00
Victor Shyba
011b7f090f add urgent reconnect when api is called to bypass retry delay 2019-08-12 18:16:58 -03:00
Victor Shyba
4ead92cfbe fixes from review 2019-08-12 18:16:58 -03:00
Victor Shyba
9ee2f30df4 timeout instead of cancel + minor fixes 2019-08-12 18:16:58 -03:00
Victor Shyba
4a749f6c38 on timeout, restore latency to max 2019-08-12 18:16:58 -03:00
Victor Shyba
cf924373f6 make stream test an asyncio test 2019-08-12 18:16:58 -03:00
Victor Shyba
d1f5b25418 merge repeated subscription events 2019-08-12 18:16:57 -03:00
Victor Shyba
822f53c888 remove unused things 2019-08-12 18:16:57 -03:00
Victor Shyba
f04c5ee902 fix test reliability 2019-08-12 18:16:57 -03:00
Victor Shyba
022d60ec2c both exceptions can be raised, depending on when the call happens 2019-08-12 18:16:57 -03:00
Victor Shyba
8fce374cae race condition where the request is sent and connection lost right after 2019-08-12 18:16:57 -03:00
Victor Shyba
e78e2738ef basenet refactor 2019-08-12 18:16:57 -03:00
Victor Shyba
5728493abb refactor basenetwork so each session takes care of itself 2019-08-12 18:16:57 -03:00
Lex Berezhny
0d6248fbeb fix torba tests 2019-08-12 10:22:14 -04:00
Lex Berezhny
98d4d00f96 most commands now work across all accounts 2019-08-12 10:22:14 -04:00
Victor Shyba
0bb09ae91e use checkpoint to speed up 2019-07-23 17:44:13 -04:00
Victor Shyba
afeff61268 fix repair and tests 2019-07-23 17:44:13 -04:00
Victor Shyba
45fb673e49 dont fail when s3 is out of reach 2019-07-23 17:44:13 -04:00
Victor Shyba
df41a82b23 fix integration test 2019-07-22 11:31:45 -04:00
Victor Shyba
34500e07c6 change picking logic to probe the session before considering it a good session 2019-07-22 11:31:45 -04:00
Lex Berezhny
e4f802e5f4 when resolving inside channel break a tie of claims with same effective_amount by using height 2019-07-20 15:45:15 -04:00
Lex Berezhny
16fc2c456f moved executing create index queries outside of a tx 2019-07-20 15:45:15 -04:00
Lex Berezhny
f406db85dc pylint again 2019-07-18 19:54:38 -04:00
Lex Berezhny
71551058ce query interpolation 2019-07-18 19:54:38 -04:00
Victor Shyba
6997ea608d fix reconnect and timeouts 2019-07-16 23:59:28 -03:00
Jack Robison
d319761483
interrupt slow queries and log them for debugging
- add QUERY_TIMEOUT_MS env variable

- return sqlite timeout errors, jsonrpc error code -32000
2019-07-16 20:05:45 -04:00
Lex Berezhny
dd9bf04e35 default to HOST for WEBSOCKET_HOST if not set 2019-07-16 12:05:43 -04:00
Victor Shyba
f96443515a optimize header check 2019-07-16 00:58:36 -04:00
Lex Berezhny
e02a4e44c0 working resolve/search caching 2019-07-16 00:57:53 -04:00
Lex Berezhny
03a58cf50a added lrucache to search/resolve 2019-07-16 00:57:53 -04:00
Lex Berezhny
7d2ad5e4ed added TRACK_METRICS env variable to torba wallet server 2019-07-16 00:57:53 -04:00
Lex Berezhny
8ca74d3de2 env variables to set websocket host and port 2019-07-16 00:57:53 -04:00
Victor Shyba
8749c78622 close daemon connector on server close to avoid errors on tests 2019-07-14 00:33:57 -04:00
Victor Shyba
d9460dcd9e refactor and clean up 2019-07-13 01:21:26 -04:00
Victor Shyba
d0607b6fec make header component use torba headers 2019-07-13 01:21:26 -04:00
Victor Shyba
2481305a1a make integrity check faster 2019-07-13 01:21:26 -04:00
Victor Shyba
9990889cce add repair ability to baseheaders 2019-07-13 01:21:26 -04:00
Victor Shyba
a4d8508b40 update remote height on demand 2019-07-13 01:21:26 -04:00
Victor Shyba
f109aa1f73 make header access synchronous for now 2019-07-13 01:21:26 -04:00
Victor Shyba
f09c18539b add test for concurrent header access 2019-07-13 01:21:26 -04:00
Lex Berezhny
cc098f3090 refactored wallet server db reader to support thread pool and process pool 2019-07-11 14:04:49 -04:00
Lex Berezhny
68b29d9529 multi-process query executor 2019-07-11 14:04:49 -04:00
Lex Berezhny
57f069d750 added ability to customize SessionManager to torba 2019-07-11 14:04:49 -04:00
Alex Grintsvayg
5176feed81 let daemon be shut down before it has fully started. fixes #2231 2019-07-09 16:55:48 -04:00
Lex Berezhny
8c63033461 tx parsing speedup and faster wallet sync 2019-07-09 02:20:56 -04:00
Lex Berezhny
8c878f8e25 claim search uses different tag filtering approaches depeding on query type 2019-07-08 16:33:24 -04:00
Victor Shyba
c1c7e30ec9 test boundaries, make limit a constant 2019-07-08 12:03:24 -04:00
Victor Shyba
28ae7f81e9 closes 2281 - fix too many sql variables + tests 2019-07-08 12:03:24 -04:00
Jack Robison
d5183123fa
fix uvloop being ignored 2019-07-01 11:42:16 -04:00
Jack Robison
8b0d96acba
reuse lbrycrd connector 2019-07-01 11:40:13 -04:00
Jack Robison
66122a45ed
remove zombie sessions on uncaught socket errors 2019-07-01 11:36:26 -04:00
Jack Robison
c51db5294f
typing 2019-07-01 11:36:26 -04:00
Jack Robison
8cba43bfed
add method_counts field to getinfo 2019-07-01 11:36:23 -04:00
Jack Robison
4b1c7aa6c5
fix getinfo command 2019-07-01 10:41:36 -04:00
Jack Robison
8a5b803788
add first 32260 blocks of bitcoin headers for torba unit tests 2019-06-28 15:09:49 -04:00
Lex Berezhny
894e86d3ee fix intermittent test_queries failure in torba due to non-unique TX generated 2019-06-25 01:33:04 -04:00
Lex Berezhny
21f02d3e6d fix torba test_sync test reliability 2019-06-23 22:40:41 -04:00
Lex Berezhny
c54373bd9c moved enum into script to avoid weird import conflict with Python built-in enum module 2019-06-22 23:24:56 -04:00
Lex Berezhny
27c36a4dce fix get_spendable_utxos 2019-06-21 03:27:22 -04:00
Lex Berezhny
2f74611844 pylint 2019-06-21 03:27:22 -04:00
Lex Berezhny
d8265add2d added coin selection strategy for both prefer_confirmed and only_confirmed 2019-06-21 03:27:22 -04:00
Lex Berezhny
8350b42c1b require python 3.7 2019-06-20 22:50:39 -04:00
Lex Berezhny
16215d5b96 preparing for moving torba into lbry sdk repo 2019-06-20 13:45:46 -04:00
Jack Robison
190304344c
v0.5.7 2019-06-19 10:55:57 -04:00
Alex Grintsvayg
24e8a3c62e
more accurate coin selection strategy name 2019-06-19 10:39:11 -04:00
Lex Berezhny
4a24cc0095 pylint & mypint fixes 2019-06-19 06:12:57 -04:00
Alex Grintsvayg
f2bd0edc51 add option to only use confirmed utxos 2019-06-19 06:12:57 -04:00
Lex Berezhny
c30e905e19 undo backup_txs method signature change 2019-06-19 01:49:47 -04:00
Lex Berezhny
f5650c1b13 minor refactor of reorg integration test 2019-06-19 01:49:47 -04:00
Lex Berezhny
ecebbc86c6 fixed reorg issue with headers 2019-06-19 01:49:47 -04:00
Lex Berezhny
794eac0519 0.5.6 2019-06-10 23:49:04 -04:00
Victor Shyba
b75139662b refactor pick_fastest_session 2019-06-10 23:25:38 -04:00
Victor Shyba
9e24f4ca54 fix mypy, add types 2019-06-10 23:25:38 -04:00
Victor Shyba
1b5281c23e connect to multiple servers 2019-06-10 23:25:38 -04:00
Lex Berezhny
be15601a67 pylint 2019-06-10 01:44:07 -04:00
Lex Berezhny
35cd42bfea ledger.wait() accept timeout argument 2019-06-10 01:44:07 -04:00
Lex Berezhny
03e48c0968 0.5.5 2019-06-05 17:07:36 -04:00
Victor Shyba
3ea92c0d6e pylint 2019-06-04 11:04:47 -04:00
Victor Shyba
8e43e40810 fix reconnect and improve test 2019-06-04 11:04:47 -04:00
Victor Shyba
ca0a3dbf9e minor cleanups on test spurious exceptions 2019-06-03 16:04:15 -04:00
Victor Shyba
9d0b9f0ded improve server picking tests 2019-06-03 16:04:15 -04:00
Victor Shyba
8911af58cf pick fastest server on client start 2019-06-03 16:04:15 -04:00
Lex Berezhny
d23920cc61 added get_public_key methods 2019-05-29 01:38:53 -04:00
Lex Berezhny
ee353ca776 0.5.4 2019-05-22 09:35:23 -04:00
Lex Berezhny
bba4c6e4f4 added __gte sql criteria and pass header to wallet server advance_txs 2019-05-18 00:03:23 -04:00
Lex Berezhny
1d126913e9 added __or and __and to sql query generator 2019-05-18 00:03:23 -04:00
Lex Berezhny
31983fbb8e support in db for constraints that reference the same column by appending a # followed by some unique string 2019-05-18 00:03:23 -04:00
Lex Berezhny
ba8870823c added network.get_transaction_height 2019-05-18 00:03:23 -04:00
Lex Berezhny
5f1bc01636 swap advance_txs arguments 2019-05-18 00:03:23 -04:00
Lex Berezhny
ffa9e508e9 block_processor passes height on to advance_txs 2019-05-18 00:03:23 -04:00
Lex Berezhny
cfb051396a sql __in uses proper escaping instead of putting values directly in SQL 2019-05-18 00:03:23 -04:00
Lex Berezhny
2626a28e6d 0.5.3 2019-05-09 18:10:27 -04:00
Lex Berezhny
fb2d7cbe28 pylint 2019-05-09 18:05:17 -04:00
Lex Berezhny
874b3faf8c use a cache when loading TXs in db.get_txos() 2019-05-09 18:05:17 -04:00
hackrush
a54a11dca0 Making tests work on OS X 2019-05-05 16:16:00 -04:00
Lex Berezhny
e7beb6b1a7 fix for adding new account from private_key_string 2019-04-29 14:14:31 -04:00
Lex Berezhny
30edd53f3e 0.5.2 2019-04-24 00:11:14 -04:00
Lex Berezhny
fe446862c2 txo.hash added 2019-04-19 08:42:12 -04:00
binaryflesh
6788e09ae9 PEP-257 docstrings
Signed-off-by: binaryflesh <logan.campos123@gmail.com>
2019-04-16 06:24:08 -04:00
Lex Berezhny
f0c2d16749 changed account list to use is_default instead of is_default_account and improved blockchain deamon port settings 2019-04-06 15:27:58 -04:00
Lex Berezhny
9b21bd1a6f 0.5.1 2019-03-29 21:11:13 -04:00
Lex Berezhny
169ef00b9e + txo.pubkey_hash property 2019-03-29 17:59:18 -04:00
Lex Berezhny
aa93b94b61 fix unit tests 2019-03-25 22:27:52 -04:00
Lex Berezhny
d7dadc2f0e + __not_like db condition 2019-03-25 22:04:48 -04:00
Lex Berezhny
33ac9eea13 fix is_valid_address 2019-03-24 21:53:52 -04:00
Lex Berezhny
9ff41f748e upgrades 2019-03-24 17:09:55 -04:00