Commit graph

301 commits

Author SHA1 Message Date
Jack Robison
2b035009ef
handle both urls and ip addresses for fixed nodes and reflector servers 2019-01-31 15:39:20 -05:00
Jack Robison
2335243de9
pylint 2019-01-31 15:39:20 -05:00
Jack Robison
fcda9500fe
add accumulate_peers to Node
simplifies collecting peers during a download by giving a queue of hashes to search for and a queue or peers as they are found
2019-01-31 15:39:20 -05:00
Victor Shyba
5ee4b2173a fix probes bugs, partial DHT refactor 2019-01-31 01:49:52 -03:00
Victor Shyba
3e1c3d1e4b use node_id parameter instead of your own 2019-01-31 01:11:09 -03:00
Jack Robison
8f7cf0b38f
verbose logging 2019-01-29 13:08:11 -05:00
Jack Robison
bfaebf0085
fix timeout error 2019-01-28 17:20:14 -05:00
Jack Robison
330862e487
fix https://github.com/lbryio/lbry/issues/1297 2019-01-28 16:00:37 -05:00
Jack Robison
778d3826ab
clean up settings and use them 2019-01-28 15:51:27 -05:00
Jack Robison
573285a5bb
fix error encoding find value response 2019-01-26 17:04:11 -05:00
Jack Robison
30689bbf8d update/add config
remove the following settings:
  peer_search_timeout
  sd_download_timeout
  run_reflector_server
  download_mirrors
  pointtrader_server

add the following settings:
  blob_download_timeout
  peer_connect_timeout
  node_rpc_timeout
2019-01-24 00:13:15 -05:00
Jack Robison
2fa5233796 async lbrynet.dht 2019-01-24 00:13:15 -05:00
Victor Shyba
9f0b1f3e25 fix pylint failures unveiled after astroid pin 2018-11-26 11:32:41 -05:00
Jack Robison
9bb91b126d
use midpoint id instead of random for refresh list 2018-11-16 10:59:12 -05:00
Jack Robison
6dbb00d8d5
populate buckets when joining the dht 2018-11-16 10:59:12 -05:00
Jack Robison
1d438f5d23
fixes https://github.com/lbryio/lbry/issues/1638 2018-11-14 15:35:59 -05:00
Jack Robison
2fba1f417f
less verbose logging 2018-11-12 14:47:11 -05:00
Jack Robison
d704336f20
absolute imports 2018-11-09 16:52:46 -05:00
Jack Robison
7b32e2ff7c
don't block the dht component on populating the routing table 2018-11-09 16:52:46 -05:00
Jack Robison
a6b643bb34
move files 2018-11-09 16:52:42 -05:00
Jack Robison
488b976734
move HashAnnouncer.py to extras 2018-11-09 14:16:33 -05:00
Jack Robison
253912b52e
fix skipping dht, peer_protocol_server, and hash_announcer components
-move PeerFinder and PeerManager initialization to the ComponentManager

-remove dht component requirement from all but the hash_announcer component. This allows running the file manager component without either of the server components.
2018-11-09 14:16:33 -05:00
Victor Shyba
db898307b5 obey the rpcAttempts constant on retries 2018-11-05 15:16:39 -03:00
Victor Shyba
7e3512cbf2 retry on protocol level 2018-11-05 15:16:39 -03:00
Lex Berezhny
264e6744e1 updated references after moving conf to lbrynet.extras.daemon.conf 2018-11-04 20:25:24 -05:00
Lex Berezhny
f4c6dc90c9 updated references lbrynet.core -> lbrynet.p2p 2018-11-04 20:25:24 -05:00
Hugo
2e6c848c39 Upgrade Python syntax with pyupgrade --py36-plus 2018-10-23 12:02:10 -04:00
Hugo
3f704be85c Fix spelling 2018-10-18 14:40:37 +03:00
Victor Shyba
1331e2bbe6 fix DHT logging 2018-10-17 22:25:41 -03:00
Victor Shyba
d9fcc458dc refactor part of peer logic out of try/catch 2018-10-10 15:27:03 -04:00
Victor Shyba
24a11d3f21 make peer search asynchronous 2018-10-10 15:27:03 -04:00
Jack Robison
315a557019
Merge remote-tracking branch 'origin/1439' 2018-10-08 09:15:46 -04:00
Victor Shyba
50003d2600 restore delay on ping queue 2018-10-03 19:21:48 -03:00
Victor Shyba
ea6b2b98fb refactor ping queue 2018-10-03 19:21:48 -03:00
Victor Shyba
4890fdfb50 remove semaphore from ping queue 2018-10-03 19:21:48 -03:00
Victor Shyba
463cbde4b1 cast dict_keys to list before using as shortlist 2018-10-01 15:23:50 -03:00
Victor Shyba
1adce8b227 reduce routing table ping flood 2018-10-01 15:17:10 -03:00
Jack Robison
673d259d7a
Merge branch '1446' 2018-10-01 08:34:57 -04:00
Victor Shyba
b4aa51444c fix peer_ping for inexistent peers 2018-10-01 02:09:47 -03:00
Victor Shyba
9178ca701c nullify and refresh tokens 2018-09-28 14:19:51 -03:00
Victor Shyba
518c447fef
standardize distance.py to int.from_bytes 2018-08-24 11:42:35 -04:00
shyba
eab95a6246
DHT fixes from review and an attempt at removing hashing and equals (#1370)
* use int to_bytes/from_bytes instead of struct
* fix ping queue bug and dht functional tests
* run functional tests on travis
* re-add contact comparison unit test
* dont need __ne__ if its just inverting __eq__ result
2018-08-24 11:42:35 -04:00
Victor Shyba
3b88d2465d
fixes and refactors from review 2018-08-24 11:42:08 -04:00
Victor Shyba
3f6e928cc2
fix findValue result parsing 2018-08-24 11:40:43 -04:00
Lex Berezhny
10b34d6b33
unnecessary list() added during py3 port
instead of recursive bytes2unicode use a proper JSONEncoder to conver bytes->unicode for json.dumps()
removing excessive isinstance(data, bytes) checks
py3: / -> // and list() around .items() that gets modified in loop
moved lbrynet.undecorated to where its actually used and hopefully we can delete it eventually
removed build/upload_assets.py, travis can do all this now
2018-08-24 11:40:43 -04:00
Lex Berezhny
bc24dbea29
refactoring of DHT tests and fixed encoding bug when dealing with bytearray 2018-08-24 11:40:43 -04:00
Victor Shyba
31630a84be
reduce entropy on DHT test suite 2018-08-24 11:40:43 -04:00
Victor Shyba
b25d592d99
more dht fixes and most of functional tests 2018-08-24 11:37:53 -04:00
Lex Berezhny
a937aff80f
pylint fixes 2018-08-24 11:37:53 -04:00
hackrush
473d2eabfa
curl works with python3 now 2018-08-24 11:37:53 -04:00
Victor Shyba
78c8c8e64d
more porting, plus some functional tests working 2018-08-24 11:37:53 -04:00
Lex Berezhny
e718caca77
final pylint fixes (hopefuly) 2018-08-24 11:37:53 -04:00
Lex Berezhny
693a3346d2
pylint fixes 2018-08-24 11:37:53 -04:00
Lex Berezhny
4ece422f48
No longer inheriting from object and added proper use of super(). 2018-08-24 11:37:53 -04:00
Victor Shyba
e1e7be63b8
more fixes on dht functionals 2018-08-24 11:37:53 -04:00
Victor Shyba
e1314a9d1e
working functional test_contact_rpc + more string bans 2018-08-24 11:37:53 -04:00
Victor Shyba
1ee682f06f
make bencoding right for both py3+py2 2018-08-24 11:37:53 -04:00
Victor Shyba
cea3b7630c
partial dht functional tests porting to py3 2018-08-24 11:37:53 -04:00
Victor Shyba
19211d4417
make sure bencoding works for bytes, not strings 2018-08-24 11:37:53 -04:00
Victor Shyba
c312d1b3a6
all unit/dht green on py3 2018-08-24 11:37:53 -04:00
Victor Shyba
e4ea1ccbfb
test_node green on py3 2018-08-24 11:37:53 -04:00
Victor Shyba
5b35c4e8f0
port dht.distance ~> py3 2018-08-24 11:37:53 -04:00
Victor Shyba
9967857a57
port dht.encoding ~> py3 2018-08-24 11:37:53 -04:00
Victor Shyba
07a12b66e8
port dht.contacts ~> py3 2018-08-24 11:37:53 -04:00
Lex Berezhny
69446491b8
pylint and unit test fixes 2018-08-24 11:37:50 -04:00
Lex Berezhny
5520d518b5
DHT py3 compatibility, mostly commenting out implements() and fixing imports
cryptstream py3 support, mostly commenting out implements()
lbry_file py3 support, mostly commenting out implements()
file_manager py3 support, mostly commenting out implements()
core py3 support, mostly commenting out implements() and fixing imports
2018-08-24 11:37:25 -04:00
Jack Robison
37ddaeca12
fix ping queue bug 2018-08-23 11:18:28 -04:00
Jack Robison
2804fa4448
fix disabling the hash announcer 2018-08-09 12:04:14 -04:00
Jack Robison
917bae568d
fix disabling blob announcement by setting concurrent announcers to 0 2018-08-09 09:22:55 -04:00
Jack Robison
5fe8022b15
don't attempt to announce blobs until we we have contacts in routing 2018-08-09 09:00:36 -04:00
Jack Robison
26e32472d5
fix upnp and peer port setup
-bump txupnp requirement
2018-08-07 19:04:54 -04:00
Jack Robison
f1b19f10cc
Merge branch 'master' into greedy_search 2018-08-03 13:08:31 -04:00
Jack Robison
b06dcf0a0d
cancel starting components if the reactor is stopped before startup has finished
-don't block starting the dht component on having found enough peers, only on setting up the protocol
2018-07-24 20:01:38 -04:00
Jack Robison
c506fc5c75
lower peer finder timeout message to debug from warning 2018-07-18 15:32:45 -04:00
Jack Robison
d29f103910
pylint 2018-07-17 17:38:19 -04:00
Jack Robison
ec51333b56
allow node udp interface to be configured 2018-07-17 17:13:33 -04:00
Victor Shyba
562d23df11 remove nodes that went ignored during iteration 2018-07-16 17:22:46 -03:00
Victor Shyba
5c7d279104 prune failures during is_ignored calls 2018-07-12 18:24:59 -03:00
Victor Shyba
cfe8e17223 filter out the bad node in results instead of punishing the node we trusted to contact 2018-07-12 18:24:18 -03:00
Victor Shyba
c589e89bf0 greedy search with exclude filtering 2018-07-05 22:03:52 -03:00
Victor Shyba
1cc7ce69ab set the peer search timeout as configured and raise it to 30s 2018-07-03 13:47:00 -03:00
Victor Shyba
7e0784d8e0 log a warning when peer search times out for real 2018-07-03 12:20:33 -03:00
Victor Shyba
56613a71d5 let find value run until it finds a value 2018-07-03 11:51:39 -03:00
Jack Robison
929a0cc5af
exclude self and querying node from closest contacts 2018-07-02 14:54:03 -04:00
Jack Robison
b6289d101d
fix improper sorting when getting the closest peers to a hash 2018-07-02 14:54:03 -04:00
Jack Robison
7fe92d2df0
load all finished blobs into the node datastore 2018-07-02 14:31:09 -04:00
Jack Robison
03769b94b8
accept invalid store tokens for the first expire-time after startup
this is to better handle nodes storing to us after we've restarted our node
2018-07-02 13:26:38 -04:00
Jack Robison
e6df378e9e
fix token validation error when the dht node has just been started (https://github.com/lbryio/lbry/issues/1248) 2018-06-14 15:07:10 -04:00
Jack Robison
7f3ead67bf
disable forced bucket refresh during join 2018-06-07 15:02:47 -04:00
Jack Robison
b0e4fc4faa
fix iterative find lockup 2018-06-07 15:02:47 -04:00
Jack Robison
ae631f05c3
fix teardown error 2018-06-07 15:02:47 -04:00
Jack Robison
bc0da5e2d1
only use seeds in iterative bootstrap if no contacts are known yet 2018-06-07 15:02:47 -04:00
Jack Robison
44644673d7
add profiler 2018-06-07 15:02:47 -04:00
Jack Robison
e8b402f998
remove deferredLock from iterativeFind
-fire the first iteration right away
2018-06-07 15:02:47 -04:00
Jack Robison
4fbaaac3f3
default new contacts to protocol version 0 2018-06-07 15:02:47 -04:00
Jack Robison
db06191c33
reduce default concurrent announcers to 10
-lower rpc timeout to what it originally was
2018-06-07 15:02:47 -04:00
Jack Robison
b0a741b1f4
fix hash announcer semaphore 2018-06-07 15:02:47 -04:00
Jack Robison
537df6c8ad
log socket errors 2018-06-07 15:02:47 -04:00
Jack Robison
42eb172638
refactor announceHaveBlob
-add cached `token` to Contact objects to minimize findValue requests
-remove self_store, always store to remote contacts even if we're the closest known node to the hash
-move the store call and error handling from announceHaveBlob to a smaller function of its own
2018-06-07 15:02:47 -04:00
Jack Robison
9a63db4ec6
add protocol version to the dht and migrate old arg format for store 2018-06-07 15:02:47 -04:00